Posts
A friend wanted a Secret of Evermore remake and I just wanted to pull the assets. I ended up letting the emulator render the game for me.
A square that moves four pixels per frame runs at a different speed on every machine. With delta time it doesn't.
The simplest game loop depends on the speed of the machine. With a fixed timestep it doesn't.
Logic runs in fixed steps, drawing happens in between. Interpolation turns choppy motion into smooth motion.
Is the cursor inside the shape? A ray to the right, count the crossings, and what happens when it hits a corner exactly. Ray casting and winding number to try o…
Which 3D object is under the mouse? Pixel to ray, ray against sphere and box, the nearest hit wins. With a demo to try.
One ray per pixel, three balls on a checkerboard, shadows and reflections you can switch on and off. With a ray counter so you can see what each feature costs.
From a PNG file to a pixel on screen: chunks and CRC, an SDL_Surface with pixel format and pitch, a texture with nearest or linear scaling, and a CPU loop that…
Circles and boxes with impulses: collision normal, penetration depth, restitution, friction and why a stack of crates shakes. With a demo to play with.
A basin, a tap and sand sinking through water. Falling sand with water on a pixel texture, plus the update order trap, why water slides further than one cell, a…
Two arrays, three lines of wave equation on the CPU and a shader that turns the height field into water with refraction and a specular highlight. With adjustabl…
Six Gerstner waves in the vertex shader, exact normals from the derivatives, foam from the Jacobian determinant and a buoy that the CPU floats on the water with…
No triangles, just a distance function: a fragment shader walks through the scene in steps for every pixel, merges a sphere, a box and a torus and gets normals,…
Scatter points, every pixel belongs to the nearest one. Brute force in the fragment shader, border distance instead of a difference, three metrics, Lloyd relaxa…
How much XP does the next level cost? Linear, polynomial, exponential and the RuneScape curve to tweak, plus the play time per level and a player climbing the c…
How does something move smoothly from A to B? Eleven easing families as a gallery, the formulas and where their constants come from, and a tween that hands its…
One random number per pixel gives only grain. Value noise and gradient noise side by side, the fade curve that hides the grid, and why only the sum of several o…
The same noise, shaped differently: a curve you can drag makes plains and steep summits, terraces with a slope instead of a cliff, and ridges only where the mou…
One fBm looks the same everywhere. Continent, mountains and detail as three layers, four blend modes (add, multiply, mask, lerp) and a number that shows why mou…
Offset, axial, cube and doubled side by side on a hex board. With neighbors, distance as the largest absolute cube difference, and the trap of just counting col…
Which hex tile is under the mouse? Turn pixels into fractional cube coordinates, round them, and why rounding all three values on their own gives no hex on a qu…
BFS, Dijkstra, greedy and A* on the same map, with walls, mud and a bucket as a trap. Which cells each search touches, what the path costs and what the heuristi…
200 enemies, one goal, a single search: a breadth first search from the goal gives a distance map and arrows that every agent simply follows. With a demo and a…
An agent follows the mouse, and one rule turns it into seek, flee, arrive, wander and path following: desired velocity minus velocity, capped. With a second age…
Three rules that only look at neighbors turn a pile of birds into a flock. With a predator on the mouse and a neighbor search that makes n squared bearable with…
Projects
Turbo Mage is a small game that came together during a Gamedev Gathering. You play a mage fighting through levels. The whole thing was hacked together over a we…
A local knowledge graph for my game-design ideas. Concepts, mechanics and monetization patterns end up as connected nodes in a graph database, become semantical…
One of my older reverse-engineering tools. It generates a proxy DLL that sits between a game and the original DLL, so every call goes through your own DLL first…
Small game dev demos in C++ with SDL3. Every folder is one demo, and each one runs natively and in the browser. I've wanted to write down small game dev things…
I wanted to play Starship Troopers: Terran Ascendancy, Blue Tongue's real-time strategy game from 2000, on usagi, my XP machine for retro LAN parties. First it…
Krater is a small first-person shooter demo where the terrain does not stay put. Every rocket tears a hole into the rock, sticky charges blast tunnels, the dril…
usagi, my Windows XP box for retro LAN parties, now has a bit over 200 games as shortcuts on the desktop, sorted into folders like Shooter, Aufbau and Strategie…