Thursday, May 24, 2012

The guide to implementing 2D platformers

Did you ever wanted to develop you own platform game, or simply wondered how platform games are made?
Rodrigo Monteiro from Higher-Order Fun wrote the most complete guide I ever found in internet, with a tons of suggestions to let us create our platform game and gives me the permission to share it with you.
It’s a very long topic, so take your time because this is an incredible journey into the world of platformers.
Having previously been disappointed by the information available on the topic, this is my attempt at categorizing different ways to implement 2D platform games, list their strengths and weaknesses, and discuss some implementation details.
The long-term goal is to make this an exhaustive and comprehensible guide to the implementation of 2D platform games. If you have any sort of feedback, correction, request, or addition – please leave it in the comments!
Disclaimer: some of the information presented here comes from reverse engineering the behavior of the game, not from its code or programmers. It’s possible that they are not ACTUALLY implemented in this way, and merely behave in an equivalent way. Also note that tile sizes are for the game logic, graphical tiles might be of a different size.
Four Ways of Implementing
I can think of four major ways in which a platform game can be implemented. From simplest to most complicated, they are:
Type #1: Tile-based (pure)
Character movement is limited to tiles, so you can never stand halfway between two tiles. Animations may be used to create the illusion of smooth movement, but as far as the game logic is concerned, the player is always right on top of a specific tile. This is the easiest way to implement a platform game, but it imposes heavy restrictions on the control of character, making it unsuitable for traditional action-based platformers. It is, however, popular with puzzle and “cinematographic” platformers [...]
Read more: The guide to implementing 2D platformers

No comments:

Post a Comment