![]() It’s no wonder that the majority of the best action platformers of all time are based on this type. It’s very flexible, relatively easy to implement, and gives you the most control of all four types. If you’re unsure which type of platformer you want to implement, and you want to do an action game, I suggest going for this one. It also allows for slopes and smooth jump arcs. This is the most common form of implementing platformers in 8-bit and 16-bit consoles, and remains popular today, as it is still easy to implement and makes level editing simpler than more sophisticated techniques. Type #2: Tile Based (Smooth)Ĭollision is still determined by a tilemap, but characters can move freely around the world (typically with 1px resolution, aligned to integers, but see the note at the end of article regarding smoothing of movement). For example, the tiles can be a bit smaller than the player (say, a player is 2×6 tiles), or you can allow a visual-only movement to take place inside a given tile, without affecting the logic (which is the solution that I believe that “Lode Runner – The Legend Returns” takes). In principle, this system doesn’t allow steps of less than one tile, but that can be mitigated in a few different ways. Implementing certain mechanics (such as grabbing ledges and one-way platforms) becomes a breeze, compared to more complex movement styles – all you have to do is check whether the player tiles and the background tiles are aligned in the one specific way that allows for a given action. ![]() ![]() Since the games are more deterministic, glitches are much less likely, and the gameplay experience is more controlled, with less of a need to tweak values depending on circumstances. This kind of movement is very ill-suited for traditional arc-shaped jumps – so games in this genre often have no jump at all (Toki Tori, Lode Runner), or only allow vertical or horizontal jumps (Prince of Persia, Flashback), which are nothing but special cases of linear movement.Īdvantages of this system include simplicity and precision. Move character there, optionally playing an animation so the transition looks smooth. If an intersection is found, the character’s movement is blocked.Check that copy for intersection with the background and other characters.Create a copy of the character where he’d like to move to (e.g., if moving one tile to the right, make a copy where every tile of the character is shifted 1 tile to the right).Likewise, he will likely only move one tile at once, but multi-tile movement can be done as multiple steps of one tile, if needed (in Flashback, you always move two tiles at once). In this kind of game, the player will rarely – if ever – be moving diagonally, but, if he is, the movement can be decomposed in two separate steps. In Flashback, which is unusual due to the smaller size of its tiles, the player is two tiles wide and five tiles tall (see image above) when standing, but only three tiles tall when crouching. In Lode Runner, for example, the player is a single tile. The player and other characters are represented by a set of one or more tiles that move together. The map is a grid of tiles, each one storing information such as whether it’s an obstacle or not, what image to use, what kind of footstep sound to use, and so on. It is, however, popular with puzzle and “cinematographic” platformers.Įxamples: Prince of Persia, Toki Tori, Lode Runner, Flashback 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. 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. From simplest to most complicated, they are: Type #1: Tile-based (pure)Ĭharacter movement is limited to tiles, so you can never stand halfway between two tiles. I can think of four major ways in which a platform game can be implemented. Also note that tile sizes are for the game logic, graphical tiles might be of a different size. It’s possible that they are not ACTUALLY implemented in this way, and merely behave in an equivalent way. If you have any sort of feedback, correction, request, or addition – please leave it in the comments!ĭisclaimer: some of the information presented here comes from reverse engineering the behavior of the game, not from its code or programmers. The long-term goal is to make this an exhaustive and comprehensible guide to the implementation of 2D platform games. 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.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |