Page 1 of 1

Sdl sidescroller

Posted: Wed May 09, 2012 12:59 pm
by Indie Tom
Hi, I have a question. What do I need to know to crearte a sidescroller in c++ and sdl?

Thanks.

Re: Sdl sidescroller

Posted: Wed May 09, 2012 1:22 pm
by lalacomun
Well as your question sais you need a good knowledge of C++ and SDL, but if you are asking specially what you need to know i think with this will be enought:
C++:
-Pointers
-Arrays
-Inheritance
-Funtions
-Subrutines
-References
-Data Structures

SDL:

-Loading/Render images
-Events handling
-Text rendering (SDL_ttf)
-Effects/Music load & play (SDL_mixer)

AND THE MOST IMPORTANT THING:

-Good understanding of game logic!! ;)

Re: Sdl sidescroller

Posted: Wed May 09, 2012 4:06 pm
by dandymcgee
Start making one. When you get stuck ask yourself what you don't understand that is holding you up. Go learn that, continue work, rinse and repeat.

Re: Sdl sidescroller

Posted: Thu May 10, 2012 3:41 pm
by OmenFelix
Indie Tom wrote:Hi, I have a question. What do I need to know to crearte a sidescroller in c++ and sdl?

Thanks.
By sidescroller do you mean a platformer? As in one that would require gravity? If so, then you're going to be needing the necessary statistics and calculations for such a thing in order to implement a gravity algorithm. :) Like the gravitational-acceleration constant is 9.81m/s^-2 etc. :3

I'm not going to add anything else as the other reps seem to have pretty much covered it.

Re: Sdl sidescroller

Posted: Thu May 10, 2012 3:43 pm
by thejahooli
OmenFelix wrote:9.81ms^2
9.81ms^-2

Re: Sdl sidescroller

Posted: Thu May 10, 2012 4:13 pm
by OmenFelix
thejahooli wrote:
OmenFelix wrote:9.81ms^2
9.81ms^-2
Hah! Forgot about that. My bad. :P

Re: Sdl sidescroller

Posted: Thu May 10, 2012 5:40 pm
by dandymcgee
thejahooli wrote:9.81ms^-2
More often written as 9.81 m/s^2

Regardless, these numbers are not useful for a general platformer game. Acceleration in a game is in pixels / frames not meters per second. You can define some arbitrary conversion factor from meters to pixels, but that's generally overkill unless you're trying to create an extremely accurate physics simulation which generates usable experimental data.