Tutorial for platformer?

Hello everyone -

I’ve been asked to mentor a young teenager who wants to learn programming. He went to a gaming camp the past summer, but was frustrated because all they did was a kind of modding, and not really programming. He told me he wanted to learn c++, but I thought that would be too much. I think java is the best solution for where he’s at ( and where I’m at ). I do PHP programming, and I’m doing my best to stay one step ahead of this kid :slight_smile:

We’ve found several tutorials on Asteriod and Space Invaders-type games, and those are straightforward enough. But this kid wants to write a programming, and I want to make sure he can accomplish his goal. Can anyone recommend a tutorial for how to write a platformer, in any language? Specifically I’m wondering how you store the map of the level, and how you handle jumping and the main guy resting on a platform.

I suppose by default, the guy falls, unless there’s a collision with a platform surface. That’s a guess; it might give you an indication of where I’m at.

Any help is appreciated!

Hmm, if you just look for a tile based game tutorial, then you can easily convert it to a platformer.

Search up the video tutorials on http://www.nickontech.com/2008/09/tile-engine-series-new-home/, they teach you how to create a 2D tile engine, so that should help you understand more about storing maps and what not. I used them to create my own tile engine and am now using it to create a platformer also.

Basically its like a 2D tile based game except, if there is no tile that you can stand on directly below your character, apply gravity to the character.

For example, the maps would look something like

0 0 0 0 0
0 0 1 1 0
1 1 1 1 1

And if the poition directly below the character is not a 1 (1 would represent a solid square, 0 would be background or w.e), move the character lower…

Sorry if the post is a bit random or confusing ???, but if you have any questions just ask…

very well ;D Shop your high quality Discount AC Parts - A/C Compressor for your Suzuki model cars at affordable prices. Order your Suzuki AC Compressor and get placed by us!Mitsubishi parts at discount pricing.Buy Mitsubishi OEM Parts and Mitsubishi Raider Parts and Mitsubishi Performance Parts.Free Shipping - One Year Lower Price Guarantee on Mitsubishi Accessories & Parts.

Brackeen’s book is pretty good, and it builds up a simple platformer. You might look there for ideas.

The book he’s talking about is called “Developing Games in Java”, and I’m pretty sure you can get it cheap from Amazon.com if you buy it from a marketplace seller.

This is a great place to find general info on tile based games and platformers:
http://www.tonypa.pri.ee/tbw/start.html

This is where I got my inspiration for my platformer:
http://www.harveycartel.org/metanet/tutorials.html

One of these days i’ll make a platformer tutorial. :slight_smile: