Posts
Filtered by “gamedev”: 29 Reset filter
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 a grid.
An agent follows the mouse, and one rule turns it into seek, flee, arrive, wander and path following: desired velocity minus velocity, cappe…
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…
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 a…
Which hex tile is under the mouse? Turn pixels into fractional cube coordinates, round them, and why rounding all three values on their own…
Offset, axial, cube and doubled side by side on a hex board. With neighbors, distance as the largest absolute cube difference, and the trap…
One fBm looks the same everywhere. Continent, mountains and detail as three layers, four blend modes (add, multiply, mask, lerp) and a numbe…
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…