Home / Game development
✚

Game development

Game loop, engines, physics, collisions, sprites, enemy AI, audio and input.

The 2D camera: following, dead zone and screen shake

How to program a 2D camera that follows the player smoothly: dead zone, damping, look-ahead, level bounds, screen shake and parallax background layers.

4 min

A* pathfinding on a grid: helping enemies find their way

How the A* algorithm works for pathfinding in video games: costs, heuristics, diagonal movement, optimisations and flow fields for many units at once.

4 min

Collisions in 2D games: AABB rectangles, circles and points

How to detect collisions in a 2D game with axis-aligned rectangles, circles and points: formulas, example code and the common mistakes to avoid.

5 min

Behavior trees: modular enemy AI that is easy to extend

What behavior trees are in video game AI: sequence and selector nodes, decorators, the blackboard, and how they compare with finite state machines.

4 min

Broad phase: spatial grids and quadtrees for many collisions

When objects number in the hundreds, checking every pair costs too much: how spatial grids, quadtrees and sweep and prune cut collision checks.

4 min

Choosing a game engine: practical criteria before you start

Godot, Unity, Unreal or a lightweight framework: concrete criteria for picking the right game engine based on your project, platforms and skills.

4 min

Coyote time and input buffering: the invisible game feel tricks

Coyote time, input buffering, corner correction and hit stop: small invisible tricks that make a game's controls feel responsive, precise and fair.

4 min

Entity Component System: organising a game's code

What the Entity Component System architecture is, why it is preferred over deep inheritance, and how entities, components and systems work together.

4 min

Finite state machines: giving enemies their behaviour

How to use finite state machines for enemy AI: states, transitions, enter and exit actions, perception, hysteresis and hierarchical state machines.

4 min

Game audio: sound effects, music and the in-game mixer

How to handle audio in a video game: sound effects with variations, voice limits, mixer buses, looping music, file formats and streamed loading.

4 min

Handling input in games: keyboard, gamepad and abstract actions

How to design input handling in a video game: events and polling, abstract actions, gamepads and dead zones, key remapping and accessibility options.

4 min

The game loop: update, rendering and fixed timestep

How a video game loop works: input, update and rendering, a fixed timestep with an accumulator, and interpolation for smooth on-screen movement.

5 min

Game performance: profiling, draw calls and object pooling

How to improve a game's performance: frame budget, profiling, reducing draw calls, object pooling and the allocations to avoid inside the game loop.

4 min

Save systems in video games: what to save, formats and versions

How to design a game's save system: which data to store, text or binary formats, save file versions, safe writing to disk and automatic saving.

4 min

Game interfaces: HUD, menus and adapting to resolutions

How to design a video game's HUD and menus: essential information, anchoring and scaling for every resolution, gamepad navigation and readability.

4 min

Simple game physics: gravity, velocity and a good jump

Gravity, velocity and acceleration in a 2D game: semi-implicit Euler integration, a jump tuned by height and duration, friction and speed limits.

4 min

Networked multiplayer: latency, prediction and authority

The technical basics of online multiplayer: authoritative server, latency and tick rate, client-side prediction, reconciliation and entity interpolation.

4 min

Particle systems: smoke, sparks and explosions in games

How a particle system works in video games: emitters, lifetime, curves over time, additive blending, performance and particles that serve gameplay.

4 min

Tile collisions in a platformer: separate axes and slopes

How to handle collisions between the character and a tile map in a 2D platformer: per-axis movement, one-way platforms, slopes and visual debugging.

4 min

Positional audio and adaptive music: sound that reacts to play

Panning, distance attenuation, occlusion and layered or segmented adaptive music: how to make sound react to the player's position and in-game actions.

4 min

Procedural level generation: seeds, noise and dungeons

How to generate levels procedurally: seeded pseudorandom generators, Perlin noise, cellular automata for caves, and dungeons of rooms and corridors.

4 min

Raycasts and projectiles: instant hits versus physical bullets

Instant raycast hits versus simulated projectiles: the DDA grid algorithm, continuous collisions, projectile gravity and the design choices behind them.

4 min

Sprite sheets and frame-by-frame animation in 2D games

How to organise sprite sheets and texture atlases, time frame-by-frame animation and link it to a character's states in a 2D game, avoiding bleeding.

4 min

Steering behaviors: seeking, fleeing and moving as a flock

How steering behaviors work for autonomous movement in games: seek, flee, arrive, wander, obstacle avoidance and flocks of boids built from simple rules.

4 min

Tilemaps: building efficient, flexible tile-based levels

How tilemaps work in 2D games: tilesets, multiple layers, autotiling, tile properties, chunk-based rendering and level editors for faster design.

4 min