Jump to content
  • Advertisement
Sign in to follow this  
alyks42

Making a side-scroller, give me a point in the right direction?

This topic is 4849 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, my name is Alex, and I so far been making command line games. My most recent one was a Snake clone: http://www.cplusplus.com/doc/tutorial/tut3-3.html (I don't know any html tags) and I want to step it up a bit, only I don't have any clue as to where I should begin with 2d graphics, I know I might use directX, or maybe SDL. Where to begin for a side-scroller?

Share this post


Link to post
Share on other sites
Advertisement
I suggest SDL, as it is the most reasonable thing to do for a beginner. You'll have to first learn the basics of it, essentially creating a window, loading images from files, and drawing these images to the screen each frame.

Short spoiler:

You will then, as usual, create a game loop where the game logic (movement) is performed in a device-independent way (using SDL_GetTicks to measure time, for instance) and rendering is performed whenever possible.

Rendering is no different than what you did before, except that you will draw entire images at screen locations instead of characters. So is game logic. The main difference will be that:

- The character will probably be moving between map tiles, making collision detection a little bit harder.
- The screen will move around the map, forcing you to keep at all times the X (and Y) offsets at which to draw the tiles on the screen (they change based on your movement).

Share this post


Link to post
Share on other sites
A side scroller is not a good first graphical project. Its a lot harder than you think.

I recommend starting out with SDL(its much easier than DX), then you should get your feet wet with a black jack or tic tac toe game. Then make something more advanced like tetris or galaga.

Then you should move on to OpenGL with SDL, and then a side scroller is up your alley.

Lazy Foo's SDL tutorials.

My aim with the tutorials was to help people starting out with SDL and graphical game programming. They're not finished yet, but most of the important content is there.

[Edited by - Lazy Foo on August 9, 2007 7:01:32 PM]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!