Making a 2D Platformer in C++/SDL. Looking for tutorials/examples/resources

  • Making a 2D Platformer in C++/SDL. Looking for tutorials/examples/resources firyice

    I have a lot of experience with C++, but I have no experience with game programming. This summer I plan to create a 2D platformer from scratch using C++/SDL for the learning experience. I am looking for as many resources as possible to help me get started. Good source code, tutorials, anything.

    One of the best tutorials I've found are the inactive jump 'n' run dev tutorials by the late Florian Hufsky. Any similar tutorials?

  • If you're a C++/object-oriented kinda guy, you might find SFML easier to work with. It's very similar to SDL, except that is has an OO interface. It's not as widespread as SDL, but still has quite a large following.

    As for tutorials, since you're experienced with C++ you can probably get away with reading tutorials aimed at other engines and languages and apply the high level concepts, referencing your API and its help forums for specific issues you encounter along the way.

    • Here's a random SFML tutorial from their forums

    • Flash Game Dojo is aimed at Flixel & Flashpunk users, but has a lot of "beginning game programming" type of material.

    • GPWiki has a massive amount of info on game programming.

    • is another huge resource (look at their articles and wiki)

    • Also look at the FlipCode archives. These generally cover more advanced topics, but you may find them useful in the future.

  • Airstrike is a small and simple game to start from. The source code is short and simple. It's not a platformer, but that may be a good thing, since you may not want your architecture to have outside influence. Every low-level action you may want is implemented - there aren't many (load resources, play sounds, display sprites...)

c++ 2d sdl platformer
Related questions and answers
  • I'm looking into building a cross-platform opensource 2D RPG style game engine for ChaiScript. I want to be able to do all of the graphics with SVG and need joystick input. I also need the libraries I use to be opensource and compatible with the BSD license. I'm familiar with allegro, ClanLib, and SDL. As far as I can tell, none of these libraries have built in or obvious integration for SVG... not seem to have joystick input support, which would require that SDL or some other library also be used. So my question can be summed up as this: What is the best way to get SVG and joystick

  • I'm new to Game programmming and SDL, and I have been following Lazyfoo's SDL tutorials. My question is related to time based motion and frame rate based motion, basically which is better or appropriate depending on situations?. Could you give me an example where each of these methods are used?. Another question I have is that, in lazyfoo's two Motion tutorials (FPS based and time based... position when you compare the two programs. As beginner which method should I stick to?(all I want is smooth animations).

  • ++ or java I just dont have much experience using the jni. Ive built some sample projects where I pass primitives like floats and perform operations on them on the native side and then passed them back but I cant figure out how to create a scene in opengl in c++ and then pass it to java. Ive been looking at writing everything using java but Im not sure if the java bindings make for some performance...Ive been reteaching myself opengl so I can make a game on android. However Ive been struggling with how to build objects and scenes in opengl using c/c++ and passing them through the jni

  • I been working in the animation of a 2D platformer game in C++/SDL/OpenGL, and my team and I reach the point where we need to establish that every animation of the player (Walking, Running, etc..) needs a different framerate for our concept, but I use as a guideline the Game Programming All In One as a example for the smooth animation, and in the book recommend have variables that limits the movement and the changes of frames. To clarify what I mean I have in my Sprite class these parameters: std::vector< Vector2f > delayMovementSprite; std::vector< int > frameDelayPerAnimation

  • My team and I are currently developing a 2D platformer with SDL/OpenGL and we want to add support to the Xbox360 Gamepad with the XInput library from Microsoft, but we are currently having a problem. First of all, the method for reading the key states it's this one: bool InputMapping::Gamepad::checkKeyState(WORD button) { DWORD dwResult; DWORD idPlayer = playerID - 1; XINPUT_STATE state... and I can't controlled. There is a way to limit the time between polling inside of the XInput or I should do it by myself? or what you recommend me? If I didn't explain me clearly don't hesitate

  • My team and I are developing a 2D platformer with C++/SDL/OpenGL, and we already defined a collision system, but we have a problem checking collisions with the tilemap. The tiles of the tilemap are 32x32, so we try to define that the max speed in X and Y of the player it's less than 32 because in this case we found the problem that if the speed it's bigger than the tile size, when checking the collisions the position it's updated with the speed which it's more than 32, so in that case, the position skip a tile which causes a huge problem for verification, so at the momento we limit the X

  • I would like to know if there is a C++ game engine that I can use for free to prototype some ideas I have. I have experience in C++ and have spent some time now playing around with different rendering engines such as Ogre3d and irrlicht. I don't want to re-invent the wheel and spend the time building my own engine. I have some ideas for a game that I would like to prototype and would be looking for a free engine to experiment with. I would be open to paying for the engine if I can make my idea work but as I don't have a great deal of time or resources I would need the engine to not have

  • this summer and I have a good grounding on the web side of things. I've also done some very basic c++ (what i would consider basic). My c++ skills basically comes down to different tutorials on things... of this then why would I be here asking this question? The reason is as shocked as I am about this. I don't like to lose. I have my own queries on how appealing this project would be to someone looking... for. By this I mean I've always heard that graphics programming is hard. So for someone with basic c++ skills and an OK level of discrete mathematics, is it feasible to complete this project spec

  • I have the book iPhone 3D Programming; this book taught be a lot about overall c++ iPhone application architecture and iPhone OpenGL ES. But a lot of the book is obviously about 3D, so most of the book wasn't that useful to me. I also have Game Coding Complete 3rd Edition; this book taught me a lot about game engine architecture but the emphasis is on c++ windows desktop game programming. I am looking for c++ 2D game engine architecture books. I'm not looking to use any frameworks; I want something more geared towards 2d c++ game engine architecture. Any suggestions? Thanks.

Data information