Need platform game tutorial or working code example

I’m new to game dev and just completed the SlickOut and SlickBlocks tutorials by Spiegel. I’d like to understand about Platformers viz, side-scrolling, mario/sonic style games. Any leads to working code examples or tutorials would be great.

Wow, thats not exactly specific… at all. I am assuming you are using Slick2D (based on the tutorial names you mentioned), so this is what I have used and wish someone told me when I started.

You don’t need any direct OpenGL calls, if you do use a different library.
Animation class works just like the image class and can be replaced later. Use the Animation class 99% of the time unless you are certain you won’t ever need to add an animation - the performance cost on a side-scroller is negligible.

Running a platform, use velocities, don’t bother with fancy timers for jumps, because you will replace it later. Here’s an example of what it might look like in the update method. For the full sourcecode of my platformer that you can play around with, look at http://www.java-gaming.org/topics/2d-shooter-difficulty/27419/view.html. This includes some basic AI, although extremely basic. [I used an AStar algorithm, ironically, for my pacman game.]

If your IDE supports it, make the background for hard-coded number REALLY UGLY. EG In eclipse Window -> Preferences -> Java -> Editor -> Syntax Coloring -> Numbers -> Red + Underlined + Italics. You should only see this color in constant static fields.

Besides those tips, don’t get frustrated and avoid restarting. And don’t try to make it multiplayer until you are certain you have singleplayer games down and have competed in a few 48 hour competitions (these will really push your game understanding)

Thanks so much for the reply. Apologies if I wasn’t specific. Yes, I’m looking for tutorials using Slick 2D, but will also be okay if it’s general high level guidelines - like how to get the scrolling background with animated clouds and trees etc, implementing the jump, firing bullets, climbing mountains etc. And yes, I’m very new to this, so I’m not sure what Jump timer means. And at the moment, I’m not even going near LWJGL or direct opengl calls but sticking to slick2D. The animation class is a god-send for me :D.

Thanks for sharing your source code. It has a lot of things I’m looking for, I’ll go through it.

48 hr game contests sound scary. I don’t think I’ve reached that point yet, still have to constantly switch back to example code to get a bearing.