Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Camera for a 2D Game

Author
Message
Poof Master
14
Years of Service
User Offline
Joined: 14th Jan 2010
Location:
Posted: 17th Mar 2010 05:28
I was wondering if anyone knew a good way for making a camera for a 2d side scroller. I'm looking for something along the lines of Mario at least to start off with.I know it has to do with vectors but I haven't come across anything for c++ or Dar GDK. Anyone have maybe a tutorial they found or an explanation on the best way to go about making a camera?

Any help would greatly be appreciated!
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 17th Mar 2010 09:00
There is no camera for 2D game (unless you make it 3D and try to look like 2D). If you use sprites, then the way to follow the character movement is to move the world around your character, you need to calculate the new coordinates of every sprite on the screen according to how much the character moved.

If you want, you can have a look at the 2D side-scroller code that I posted in the coding challenges thread:

http://forum.thegamecreators.com/?m=forum_view&b=22&t=150933&p=2

Look for my post dated 10th Oct 2009 12:06, you can download the code from there. It has no collision but it has a scrolling system.

Login to post a reply

Server time is: 2024-10-02 01:23:34
Your offset time is: 2024-10-02 01:23:34