Get the latest tech news

Guide to implementing 2D platformers (2012)


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.

Collision 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). This allows finer detailing, but significantly increases complexity, memory usage, and requires something akin to an image editor to create levels. There are other possible complicating factors, such as one-way platforms (dealt in the exact same way as for tiled (smooth)) and sliding down steep inclines (which is fairly complex and beyond the scope of the article).

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Guide

Guide

Photo of 2D platformers

2D platformers

Related news:

News photo

How to turn on advanced voice mode in ChatGPT – a guide to new AI feature

News photo

iPhone 16 vs. iPhone 16 Pro Buyer's Guide: All Differences Compared

News photo

A guide to iOS 18’s hidden features and smaller updates