Josh-CO Dev

Solving the worlds problems one line of code at a time.

Tile Engine Platformer Tutorial Series

I know when I was coding heavily in XNA, tutorials were really hard to find. When you did find one, it seemed like you only got one piece of the puzzle and then you had to figure out everything else the hard way. I have pulled out some of my old code and am trying to work through a set of tutorials aimed at creating your own platform engine from scratch and creating a full game. In the end, you should have a fully working game that you can modify and expand as you wish.

If you see any areas of improvement, please let me know and I will do my best improve these tutorials. Starting with part 4, all code will be optimized as opposed to using my original code.
Part 1 – Creating our Tile class
Part 2 – Creating our Map class
Part 3 – Creating the base class for our animated sprites
Part 4 – Creating our player class

BONUS: Dug out some old code from the archives that actually builds upon this.
Bonus 1 – Changing the player to an animated sprite sheet

Please check back often for updates. I am trying to get 2 or 3 new posts done each week.

Advertisements

2 thoughts on “Tile Engine Platformer Tutorial Series

  1. Hey, just wanted to say, thank you for putting these tutorials up; they’ve been very helpful. Just wanted to ask, how can I implement jumping?

    • I don’t have any code any longer, but the basics are to set a variable to control the gravity. Basically, there should be a constant force pushing the player down. If there is collision between the players feet and the ground, set the players lower y position to the upper y position of the object. When the player jump, start a timer that will move the player up so many pixels every tick for however long you set the timer for. After the timer stops, let the gravity pull the player back down. To me, this is much simpler than some of the math others use and is pretty easy to implement with some trial and error. There is also a very basic article up at xnadevelopment.com

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s