The Daily Click ::. Forums ::. Klik Coding Help ::. Genesis Camera
 

Post Reply  Post Oekaki 
 

Posted By Message

xXBlazefirelpXx



Registered
  14/06/2010
Points
  45
30th December, 2010 at 20:16:05 -

Okay, so. I've tried many methods for this but non of them have ever worked good enough to be a usable camera. I'm trying to make a Genesis styled camera. Where it has the boundaries on 320 x 240 window like in Sonic 3 for example.

I've tried everything else I can think of but, I really am at a loss. Does anyone have any methods they think will work?

Ps: This camera is actually going to be like a Sonic Advance 3 camera since my real engine screen is 240x160 pixels.

Thanks in advance.

 
-----------------------------------------------

monkeytherat

Hero of Time Jr

Registered
  07/11/2010
Points
  1293

VIP MemberI donated an open source project
30th December, 2010 at 20:22:00 -

What do you mean by "camera"?

 
If you put a million monkeys at a million keyboards, one of them will eventually write a Java program.
The rest of them will write Perl programs.

Jon Lambert

Administrator
Vaporware Master

Registered
  19/12/2004
Points
  8235

VIP MemberWii OwnerTDC Chat Super UserI am an April FoolSSBB 3265-4741-0937ACCF 3051-1173-8012360 Owner
30th December, 2010 at 20:25:18 -

Surely you don't mean that you want the window to be 240x160 so I'm thinking you mean the way that the camera scrolls slightly ahead of you when you move fast. To do that, you would set the window frame to scroll at an X position equal to the x position of the character plus or minus some modification of their speed. If for example their greatest speed is 100 and you want it to scroll 50 pixels ahead when you're moving at that speed, you would set it to scroll at X("Sonic")+(Speed/2). If your speed can't have a negative value (when I store speed I store it as a positive value for right and negative for left) then you'll have to do two separate events, one for facing left and one for facing right, or however you differentiate between moving left and moving right.

Otherwise you'll have to be a bit clearer in what you're asking.

 
Sandwich Time!Whoo!

JoyCheck & KeyCheck Widgets
For easy implementation of customizable joystick and keyboard controls.
http://www.create-games.com/download.asp?id=8364

xXBlazefirelpXx



Registered
  14/06/2010
Points
  45
30th December, 2010 at 20:38:45 -

lol. I can make a camera and all that fine. I mean, in a sonic camera. there is boundaries. Like an invisable box that lets the camera move freely before it starts moving.
Like in this video, you can clearly see how the Y axis reacts to the boundary box.
http://www.youtube.com/watch?v=GdZ1oiZadCg

And the same applys to the X axis.

 
-----------------------------------------------

monkeytherat

Hero of Time Jr

Registered
  07/11/2010
Points
  1293

VIP MemberI donated an open source project
30th December, 2010 at 20:52:07 -

What part of the video? I don't wanna watch a 5 minute sonic tutorial right now...

 
If you put a million monkeys at a million keyboards, one of them will eventually write a Java program.
The rest of them will write Perl programs.

xXBlazefirelpXx



Registered
  14/06/2010
Points
  45
30th December, 2010 at 20:57:35 -

Look about 0:40 seconds

 
-----------------------------------------------

monkeytherat

Hero of Time Jr

Registered
  07/11/2010
Points
  1293

VIP MemberI donated an open source project
30th December, 2010 at 20:59:39 -

I didn't see anything special...

Unless you mean the pause while the text appears

Edited by monkeytherat

 
If you put a million monkeys at a million keyboards, one of them will eventually write a Java program.
The rest of them will write Perl programs.

xXBlazefirelpXx



Registered
  14/06/2010
Points
  45
30th December, 2010 at 21:00:59 -

Look at the camera dude.......

 
-----------------------------------------------

monkeytherat

Hero of Time Jr

Registered
  07/11/2010
Points
  1293

VIP MemberI donated an open source project
30th December, 2010 at 21:06:18 -

Oh... the way the camera centers on the text for a second?

 
If you put a million monkeys at a million keyboards, one of them will eventually write a Java program.
The rest of them will write Perl programs.

xXBlazefirelpXx



Registered
  14/06/2010
Points
  45
30th December, 2010 at 23:21:11 -

Forget about the text. The text has nothing to do with it. Look at the exact moment I said. 0:40. Look how Sonic jumps up but for a breif moment the camera doesn't move until sonic goes a bit further up, then it starts scrolling with sonic. then as he goes down it stays still once again untill he reaches a point where it continues scrolling again.

Edited by xXBlazefirelpXx

 
-----------------------------------------------

GamesterXIII



Registered
  04/12/2008
Points
  1110

I am an April Fool
1st January, 2011 at 04:37:44 -

Hey, Blaze. Perhaps try explaining it one more time.

I think I understand what you're trying to say. Basically the camera seems to make the same movements as sonic, but lags behind him (similar to how tails does in Sonic 2.)

Correct me if I'm wrong. There are a bunch of tgf/mmf files showing how to make tails follow sonic, perhaps you could search for one and adapt that into a camera?

 
n/a

Jon Lambert

Administrator
Vaporware Master

Registered
  19/12/2004
Points
  8235

VIP MemberWii OwnerTDC Chat Super UserI am an April FoolSSBB 3265-4741-0937ACCF 3051-1173-8012360 Owner
1st January, 2011 at 05:55:39 -

What I believe Blaze is saying is that there is a bounding box that Sonic has to enter before the camera begins to scroll vertically.

 
Sandwich Time!Whoo!

JoyCheck & KeyCheck Widgets
For easy implementation of customizable joystick and keyboard controls.
http://www.create-games.com/download.asp?id=8364

GamesterXIII



Registered
  04/12/2008
Points
  1110

I am an April Fool
1st January, 2011 at 07:35:29 -


Originally Posted by Jon Lambert
What I believe Blaze is saying is that there is a bounding box that Sonic has to enter before the camera begins to scroll vertically.




Yeah, but I'm not seeing it

 
n/a

xXBlazefirelpXx



Registered
  14/06/2010
Points
  45
1st January, 2011 at 14:58:23 -

Jon. You are absolutely right. Except there is also one in the X axis. Just smaller width for the camera to stop.
I've actually tried something I thought up while thinking about my static engine and it's collisions I did for it.

http://dl.dropbox.com/u/5505419/MMF2360Base.mfa

I managed to come up with this. But As you can see. It's not very efficient and isn't completely secure in terms of sticking to pixel perfect positions so it goes do that laggy position set thing that mmf2 does when you set an object to another when the object is moving.

Edited by xXBlazefirelpXx

 
-----------------------------------------------

Mark McCauley



Registered
  18/02/2009
Points
  291

Has Donated, Thank You!VIP Member
5th January, 2011 at 11:36:15 -

u can create an activeobject(named camera object) thats always invisible and make the window centre scrolled to this object





camera flag is off set position of activeobjectcamera to x,y of character



event where text appears- start movement1 of camera object(which youve preset as a path movement to go up and down )


always centre scrolling window to camera object,0,0

you could also set the (activeobjectcamera's x position) to (x position of character + speed of character) while right is pressed or x position of character - speed of character) while left is pressed

which will increase your view ahead depending on how fast u go
a little tweak using variable values inc while right dec while left so that u get a smoother return
do u get me?


hope this helps

Edited by Mark McCauley

 
http://www.reddwarf.co.uk/forum/messages.cfm?threadid=44227736-C46F-AC56-02EBA05285818C14
   

Post Reply



 



Advertisement

Worth A Click