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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.