Inside a fish’s head, and a 1,500-fish school
CreaturesTECH
Sep 19
TECH
Fish behaviour is decided by a purely computational part, kept separate from how the fish look. It switches between four states, “idle → notice → tense → flee”, timed in milliseconds (Sep 19).
Sep 19 – Oct 8Sometime in this period
TECH
Even the timing window for landing a spear was set only after brute-force testing many different ways of approaching and measuring the results.
Oct 2
TECH
The school’s swimming path is driven on the rendering (shader) side, and the CPU only computes each fish’s position and speed within the school. Each fish looks at its 6 nearest neighbours to decide whether to separate, align or cohere: classic boids (prototype Oct 2, on the main branch Oct 4).
Oct 6
TECH
When I increased the sardines to 1,500, hit detection broke from the 1,024th fish on. The fish index used for sorting had only 10 bits; I widened it to 16 bits, so it can now handle up to 65,535 fish (Oct 6).
Oct 8
TECH
On Oct 8 I also gave ordinary fish quirks, on six levels: some come closer out of curiosity, some burrow into the sand, some turn all at once as a school, and so on.