Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Side Scrolling Game
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
threatbinder




PostPosted: Wed Dec 09, 2009 11:49 pm   Post subject: Side Scrolling Game

How do you make it so that your background picture will "move" with your sprite (character)? (for example, in this video, the background moves as super mario moves) http://www.youtube.com/watch?v=wl9VgSaCanI&feature=related

Also, how long do you think it would take to make a game like super mario with around 2-3 levels?
How do you keep track of time (for example the time it takes for the user to complete a level).

Any help is appreciated, thanks~
Sponsor
Sponsor
Sponsor
sponsor
DemonWasp




PostPosted: Thu Dec 10, 2009 2:24 am   Post subject: RE:Side Scrolling Game

Moving the background picture just means you re-draw it in a new location every "frame", generally with it moving in a direction opposite the character relative to the screen.

Super Mario may prove deceptively challenging. You have at least 4 different kinds of platform (basic, powerups, coins, falling/moving) and they can be invisible. You have at least 2 different models for the main character. You have (simple) AIs or scripts for enemies in the game. You have a lot of collision-checking to do. You have win / lose messages. You have level design and implementation (hint: it's easier to make levels if you designate a good file format to read from).

To track time, use Time.ElapsedMS or similar. See the Turing help.
threatbinder




PostPosted: Thu Dec 10, 2009 7:58 am   Post subject: Re: RE:Side Scrolling Game

DemonWasp @ Thu Dec 10, 2009 2:24 am wrote:
Moving the background picture just means you re-draw it in a new location every "frame", generally with it moving in a direction opposite the character relative to the screen.

Super Mario may prove deceptively challenging. You have at least 4 different kinds of platform (basic, powerups, coins, falling/moving) and they can be invisible. You have at least 2 different models for the main character. You have (simple) AIs or scripts for enemies in the game. You have a lot of collision-checking to do. You have win / lose messages. You have level design and implementation (hint: it's easier to make levels if you designate a good file format to read from).

To track time, use Time.ElapsedMS or similar. See the Turing help.


Thanks, that pretty much answers all my questions except I'm still confused about the background moving part. Won't I have to have a different background for each frame of background I draw, because the background is supposed to be different? And when the character moves backwards, I have to draw the one previously drawn, so how will I distinguish what to draw, and how what type of code do I even use to draw a background every frame (or will it be relative to character movement?) I understand the direct opposite concept to the character concept though, Very Happy
mirhagk




PostPosted: Thu Dec 10, 2009 9:34 am   Post subject: RE:Side Scrolling Game

use a picture file that's like 1500 pixels wide, and looks seamless if put side by side. then have the background move opposite the character and tile the background so that creates an endless background. There's better ways to do it of course but you could start with that.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: