Programming Platformers

Introduction

I’ve always had a soft spot for platformers. Maybe it’s because they were some of the first games I’d ever played. Or maybe it’s because they focus on the core elements of movement and exploration. There’s just something about the freedom of navigating virtual worlds that I intrinsically enjoy to this day.

In modern games, platforming continues to play a key role, whether as the main mechanic or as a supporting one. It defines the fundamental ways in which characters interact with their environment. Good platforming can make the difference in how players connect with the rest of the game, whereas bad platforming can seriously detract from a game experience.

Programming platformers is for anyone looking to build a solid platforming foundation for their game or experience.

Simple Primitives

It can come as a surprise that all platformers are built on top of simple primitives.

Characters are represented by a sphere or capsule and interact with a world made up of triangles and other simple shapes. Visuals and animations are then layered overtop of these shapes to create the illusion of something far more complex. The best games do this so convincingly that a player would never know that what they’re really playing is a glorified sphere simulator.

The main reason for using simple shapes is that it is fast: movement logic can run not just in realtime but in a fraction of a tick. The second reason is that platformers can make decisions on how to resolve collisions in ways that create more compelling gameplay than if they were constrained to a physically accurate simulation. The crux of a good platformer is in how we refine the interactions between simple shapes to create great feeling movement.


Home