Game Development
Engines, loops, navigation, and the systems that make simulated worlds tick.
Engine Architecture
Simulation
Integration: Forces into Motionin review
core · ~25 minA particle on a spring, stepped three ways: explicit Euler spirals out, semi-implicit Euler holds its orbit, Verlet hugs the exact curve. Why the order of two updates decides it.
Collision Detectionin review
core · ~25 minJudge every pair of bodies by the boxes around the shapes first, give only the survivors the test their shapes need, and record each hit with the normal and depth a response pushes along.
Spatial Hashingin review
core · ~20 minFile every point under the grid cell its coordinates floor to, then find who is near here by probing only the cells a radius can touch: the neighbour search behind flocks, collisions, and fluids.
Quadtreesin review
core · ~20 minA box that holds a few points and splits into four when it holds one too many: a tree fine where points crowd and coarse elsewhere, so a range query skips whole quarters of the field at once.
Steering Behaviorsin review
core · ~20 minOne body, one target, and one recipe: the behaviour names a desired velocity, the push is that minus the current velocity, capped. Seek, flee, arrive, wander, and pursue fall out of it.
Boids: Flocking Behaviorin progress
core · ~20 minThree local rules, each a capped steering force read off the neighbours in a circle, turn a scatter of boids into flocks nobody leads, splitting and merging round walls and obstacles.
Cellular Automatain progress
intro · ~20 minA grid of cells, one born/survive rule, every cell deciding from its eight neighbours at once: Conway's Life with its gliders, Seeds that burns through everything, and a majority rule that smooths.
Binary Space Partitioningin progress
core · ~20 minOne wall's line splits the map in two, and each half again, until every side is an empty convex region: a tree built once that gives the painter's order from any eye in a single walk, with no sorting.
Noise
Perlin Noisein progress
core · ~20 minA lattice of random gradient arrows, four dot products, a fade curve, and a blend: smooth noise that is zero at every corner, never repeats, and follows from one seed.
Voronoi Noisein progress
core · ~20 minOne feature point per lattice cell, nine cells scanned per pixel, the nearest two distances kept: bowls around each point, ridges between them, and flat cells painted by the nearest point.
Fractal Noise: Octavesin progress
core · ~20 minOctaves of gradient noise summed, each finer by the lacunarity and fainter by the persistence: broad hills, then ridges on the hills, then rocks on the ridges, the grain of real terrain.
Procedural Generation
Terrain from Noisein progress
core · ~20 minTwo fractal fields read as height and moisture, an island mask that drowns the edges, a sea level, and a ten-entry biome table: numbers become water, sand, grass, forest, rock, and snow.
Caves from Cellular Automatain progress
core · ~20 minFill a map with rock at random, run the majority rule a few passes, then flood-fill the chambers it left and keep the largest: a cave level a player can walk all of, from one seed.
Maze Generationin progress
core · ~20 minA perfect maze is a spanning tree of the grid: carve one wall fewer than there are cells, never closing a loop. Three ways to pick the walls, three textures of maze.
BSP Dungeonsin progress
core · ~20 minCut the map in two, and the halves in two, until the boxes are small; put a room in every leaf; then climb back up the tree joining a room of each half. Connected by construction.
Rooms and Corridorsin progress
core · ~20 minScatter rooms at random and reject the ones that overlap; join the survivors by a minimum spanning tree over their centres, keep a few loops, and carve an L corridor per link. The roguelike level.
Wave Function Collapsein progress
advanced · ~25 minEvery cell could be any tile; observe the least-entropy cell, collapse it to one, let the collapse propagate, repeat. Local socket rules alone grow a grid where every neighbour fits.
L-Systemsin progress
core · ~20 minA string rewritten by the same rules every generation, then read by a turtle that steps, turns, and branches: plants, snowflakes, and dragon curves from a one-line grammar.
Shape Grammarsin progress
advanced · ~25 minCut a lot into roof, floors, and ground; cut floors into tiles; let each tile choose window or wall. Three kinds of rule, applied breadth-first, derive a building facade from one box.
Game AI
Navigation
Navigation Meshesin progress
core · ~25 minCut the floor into cells, block the ones a wall touches, merge the rest into convex rectangles, and join neighbours with portals: the graph of rooms and doors a game agent plans its route over.
Pathfinding on a Nav Meshin progress
core · ~25 minA* where the nodes are rooms and the edges are doors: cost a room by the walk to the door it was entered through, estimate the rest as a straight line, and get back a corridor, not yet a path.
The Funnel Algorithmin progress
core · ~25 minPull a string tight through the corridor's doors: a funnel narrows to each door's ends, leaves a corner where it would cross itself, and yields the shortest path in the corridor, radius included.
Multiplayer
Snapshot Interpolationin review
core · ~25 minBuffer the server's snapshots, render remote players a little in the past, and blend between them - the loop that keeps online games smooth over a jittery, lossy network.
Client-Side Prediction & Reconciliationin review
core · ~25 minYour own character cannot wait a round trip for every key. The client moves at once, keeps the inputs the server has not yet seen, and replays them on each state, so only a real disagreement snaps.
Lag Compensationin review
core · ~25 minA shooter aims at a picture of the past, so the server keeps a short history and rewinds the target to the moment the shooter saw before testing the shot. Hence hits after reaching cover.
Rollback Netcodein review
advanced · ~30 minTwo machines run the same game, so a frame needs both players' presses. Guess the late one, run anyway, and when the guess was wrong, roll back and run every frame since again.