Posts
Filtered by “gamedev”: 23 Reset filter
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 mountains should only stand where the land is high.
The same noise, shaped differently: a curve you can drag makes plains and steep summits, terraces with a slope instead of a cliff, and ridge…
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…
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 t…
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 p…
Scatter points, every pixel belongs to the nearest one. Brute force in the fragment shader, border distance instead of a difference, three m…
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 tor…
Six Gerstner waves in the vertex shader, exact normals from the derivatives, foam from the Jacobian determinant and a buoy that the CPU floa…
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 highl…
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 furt…
Circles and boxes with impulses: collision normal, penetration depth, restitution, friction and why a stack of crates shakes. With a demo to…
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,…