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