Animals: generated creatures, herds and flocks, and which animals live where
Notes compiled 2026-11-05 for Elsewhere and the Tycho study. Target: plain JavaScript on a phone, a 320×180 isometric frame with eight inks, deterministic from a seed. Sibling notes and pages cover overlapping ground: sprites_characters_items.md and sprites.md (mask sprites, Bollinger, zfedoran, Caves of Qud tiles), animation.md and motion.md (walk cycles, the IK creature), settlements_paths_vegetation.md and settling.md (Helbing’s active walkers, which also make animal trails from dens to water), realistic_world_generation.md and geography.md (biome tables). This file covers what an animal looks like, how groups move, where species live and how many there are.
Note on sourcing: Hecker et al. 2008 (Spore), Couzin et al. 2002 and Krebs et al. 2001 were downloaded and read in full text (PDF to text with mutool). Other items come from fetched web pages or, where marked “(search summary)”, from search-result summaries only; treat those as less certain.
1. Generated creature design
Spore (Hecker et al. 2008)
- Paper: Hecker, Raabe, Enslow, DeWeese, Maynard, van Prooijen, “Real-time Motion Retargeting to Highly Varied User-Created Morphologies”, ACM TOG 27(3), article 27, August 2008. Companion GDC 2007 talk “How To Animate a Character You’ve Never Seen Before” (Hecker’s page; PDF mirror).
- A creature is a “malleable clay-like torso containing the spine” plus limbs and parts (mouths, eyes, graspers, feet, spikes). Each part carries capabilities (“a body with a hand mesh has the grasper capability”). Animations are authored against queries over capabilities (grasper, mouth, spine, root, foot), with modifiers such as front/back half-space and “walk up to the spine segment” to find a clavicle. So motion is written in a body-independent form and bound to a specific body at runtime.
- Bind phase predicates choose animation branches:
HasGraspers,HasFeet, whether the spine is prone or upright. A creature with no graspers picks things up with its mouth. - Gaits. “A leg is defined as a path through the tree of connected limb segments with a foot body at the leaf and a spine segment at the base.” Legs are clustered into groups of roughly equal length; group length ratios are approximated by small rational numbers, which set the relative gait frequency per group. Each foot gets a duty factor (fraction of the cycle on the ground, citing Alexander 2003) and a step trigger (phase offset, citing Rotenberg 2004). Animators author speed→gait parameter maps for groups with 1 to 6 feet; 7+ feet are generated. Footless creatures either float or crawl: “some spine bodies [are] converted into pseudo-feet and an inch-worm-like gait is generated.”
- Numbers. “A procedurally animating character with 25 bodies currently takes approximately 0.2ms per frame on a 1.7Ghz Pentium-M”; about 35% of that in the IK solver. Testing: several hundred creatures × a thousand animations, pass rate “~90%”. The authors say a generalizing system is still not “competitive with a Maya animation on a single fixed character.”
- Creature Creator budget: a DNA budget (2,000 points to start) and a complexity meter that stops adding parts (search summary: Spore tutorials, StrategyWiki). The lesson for a generator: cap complexity, so the body stays readable.
No Man’s Sky
- Fauna, like the rest of the galaxy, comes from deterministic procedural generation (Wikipedia mirror). Sean Murray’s GDC 2017 talk was “Building Worlds Using Math(s)” (Thumbsticks).
- A data-miner (gregkwaste, 3dgamedevblog) found each creature family is one model holding every candidate part, “a horrific mess of potential body parts and contradicting geometries”; “each geometrical object has a name that points to a descriptor”, descriptors are drawn from pools and combined until a valid creature results, and “each piece seems to have a relatively equal chance of selection” (Kotaku). So NMS is a kit (sprites.md’s term): authored skeletons and parts, toggled by seed. The original blog post was not reachable.
Dwarf Fortress: forgotten beasts and creature tokens
- Forgotten beasts are random: most resemble animals with extra features (extra eyes, feathers) or removed parts; generic forms are shelled blobs, quadrupeds and humanoid golems; the threat notes list blob, worm/slug/nematode, quadruped/humanoid and insect/spider (spiders usually web). Materials range from flesh to ash, steam, rock, gem, metal; attacks are generated syndromes (venom, poisoned blood, gas, dust) or breath (fire, webs, spittle). One beast per underground region; minimum
BODY_SIZE10,000,000 in the generator script (DF wiki: Forgotten beast). - Description template visible in examples: size word + body plan + “composed of” material, then feature sentences, then “Beware its …!”: “A gigantic snail composed of grime and filth. It has an enormous shell and it squirms and fidgets. Beware its deadly spittle!” (DF wiki).
- Creature raws give placement tokens a game can copy (DF2014: Creature token):
BIOME(any number),FREQUENCY(0 to 100, default 50, “uses the FREQUENCY value as a weight”),POPULATION_NUMBER:min:max(per world-map tile of its region, default 1:1),CLUSTER_NUMBER:min:max(per spawned group, default 1:1),LARGE_ROAMING(may spawn as a wild animal),LOOSE_CLUSTERS(scatter rather than tight packs),UBIQUITOUS(every region with the right biome).- Alignment:
SAVAGE,GOOD,EVILrestrict to those biome flavors. - Time of day (adventure mode):
DIURNAL6:00 to 20:00;NOCTURNALafter 22:05 and before 4:30;CREPUSCULARdawn 4:30 to 6:00 and evening;MATUTINALdawn only;VESPERTINEabout 20:00 to 22:05. - Seasons:
NO_SPRING,NO_SUMMER,NO_AUTUMN,NO_WINTER. Some vermin fish use cluster numbers and temperate water biomes to “perform seasonal migrations”. - Behavior:
LARGE_PREDATOR(“will attack things that are smaller than it”),BENIGN,MEANDERER(“slowly stroll around”). - Vermin:
VERMIN_GROUNDER,VERMIN_SOIL(near dirt or mud),VERMIN_FISH,VERMIN_ROTTER(attracted to rot and loose food).
- Worldgen seeds wildlife in its late “regions” stage, after biomes (geography.md, quoting Adams).
Starbound
- Monsters are assembled from parts by type: quadrupeds get head, body, legs, tail; bipeds head, body, legs, arms and sometimes tail; flyers head, body, wings; fish head, body, fins. The order (type, then parts, then tier stats, planet colors, skills) is one blogger’s inference (Ruud Schouten).
- A modding tutorial says each part’s sprite has six palette colors randomized at spawn; fixed colors (black eyes) must be drawn in non-palette colors; neck length must match so the head connects (search summary of the Starbound forum tutorial, now redirecting). Community packs add 86 and 300+ parts.
Caves of Qud
- Tiles in three color roles from 18 fixed colors (see sprites.md). Monsters can be generated with random mutations (two heads, four arms), mechanized, or given random equipment (search summary of a Steam forum reply, low authority). Legendary creatures attach to historic sites (Qud wiki).
Rain World
- Creatures carry optional AI modules: PreyTracker (hunts nearby prey), ThreatTracker (flees nearby predators), FriendTracker (squads), ItemTracker, DenFinder (“a home base to return to after certain tasks”), DiscomfortTracker (places/objects to avoid). Each creature “is given a table cataloging its relationships to other creatures, objects, and locations” (Unity blog).
- Emergence needed hand tuning: a Daddy Long Legs fixated on tiny worms and ignored the player; the team “eventually gave in and created a tool where certain rooms could be assigned as more attractive to certain creatures” (Unity blog).
- “Outside of your frame they’re all still alive” (James Therrien); creatures “exist there for themselves” (Joar Jakobsson). No fixed patrols; regions tuned by running them 15 to 20 times. 12 regions, about 1,600 rooms (Game Developer). Jakobsson: “Ironically an entity that is stupid enough can be difficult to outsmart.”
- The GDC 2016 Animation Bootcamp talk (Jakobsson and Therrien) covered the procedural animation (Game Developer).
Red Dead Redemption 2, Far Cry
- RDR2: about 200 species of animals, birds and fish; Rockstar’s site: animals “form part of a complex ecosystem and must continually fight for their place on the food chain” (via Twinfinite, GameRevolution). Phil Hooker (Rockstar North) said they try to populate the world so it feels natural, with scavengers drawn to carcasses, not only bait (GamesRadar, search summary). GDC 2020 talk: Alex O’Dwyer, “Breathing Life into the Wild West: Animating the Animals of Red Dead Redemption 2”, on how the ecosystem was planned and how it grew from GTA V’s animals (GDC). A 2021 Exeter study found RDR2 players better at identifying real wildlife (Exeter). No public account of its spawning rules was found.
- Far Cry 4 (GDC 2015, Konieczny and Pelletier, Ubisoft): quadrupeds on rocky ground by “additive animation, environment detection, IK and character physics” (GDC Vault). Far Cry Primal companions: Chris Seddon, nucl.ai 2016 (search summary).
Eco, Equilinox
- Eco (Strange Loop): “thousands of plants and animals simulating 24/7”; species counts are tracked and species can vanish (store pages and a hosting wiki; no technical write-up found).
- Equilinox (ThinMatrix, Karl Wimble, 2018): each plant and animal has needs (food, biome quality, nesting plants); healthy animals pay “Diversity Points”; the developer cut the number of animals to keep each distinct (Game Developer Q&A).
Pixel generators
- Bollinger’s masks and zfedoran’s port: in sprites.md. zfedoran’s demo includes a dragon mask; creaturejs is an older seeded-looking canvas creature package (not checked) (npm creaturejs). Nothing found that does quadruped, bird and fish pixel bodies with walk loops and seeds; the demo here does it with authored body plans (a kit) and a seeded genome.
2. Anatomy and coloring
- Bilateral symmetry and a fixed body plan (head, trunk, limbs) carry the read; noise only varies inside a silhouette that works (sprites.md, inference there).
- Legs and size. McMahon 1973 elastic similarity: bone length ∝ M^0.25, diameter ∝ M^0.375, so limbs get relatively thicker in big animals; ungulates (bovids) fit it best, but Biewener 1983 (32 species) found mammal long bones near geometric similarity (both ∝ M^0.33), and larger mammals instead stand more erect to hold bone stress constant (arXiv physics/0303074; JEB, Biewener 2005). For a sprite: big animal → thicker, straighter, more columnar legs; small → thin, crouched legs (inference).
- Gait by size. Froude number Fr = v²/(gL); geometrically similar animals change gait at the same Fr; walk to run near Fr ≈ 0.5 for birds and humans (JEB, search summary). So leg length L sets speed: v_walk,max ≈ √(0.5 g L), and a small animal must use a faster cadence for the same look (inference: cycle frequency ∝ √(g/L)).
- Countershading. Thayer 1896, “The law which underlies protective coloration”: darker on surfaces lit by the sky, lighter below, so the gradient cancels self-shadow (Wikipedia; Rowland 2009, PMC2674085). Cuthill et al. 2016 (PNAS) showed optimal countershading aids concealment (PMC5135326).
- Aposematism. “Many species use red, yellow, and orange, often combined with black” to advertise unprofitability to visual predators (Endler and Mappes 2004); luminance contrast drives initial detection, while red and yellow and color contrast speed avoidance learning; distinctiveness alone can deter birds (search summaries via Mappes, Marples, Endler 2005, TREE and Frontiers 2014).
- Camouflage by biome (inference from the above): prey take their main ramp from the ground’s ramp, one step off it; predators and the poisonous break it.
3. Group movement
Boids (Reynolds 1987)
- “Flocks, Herds, and Schools: A Distributed Behavioral Model”, SIGGRAPH ‘87. Separation “steer to avoid crowding local flockmates”; alignment “steer towards the average heading of local flockmates”; cohesion “steer to move toward the average position of local flockmates”. Neighborhood: a distance and an angle from the heading. Naive cost O(n²); “a spatial data structure” makes it nearly O(n). Used in Batman Returns (1992) bats and penguins (red3d.com/cwr/boids).
- Steering behaviors (Reynolds, GDC 1999): point-mass vehicle with mass, max_force, max_speed; update: clip steering to max_force, divide by mass, add to velocity, clip to max_speed, integrate. Seek, flee (inverse of seek), pursuit and evasion (seek or flee a predicted position T ahead), arrival (slow inside a radius), obstacle avoidance, containment, flow field following (desired velocity = field at the predicted position), leader following, wander (a target jittered on a circle ahead; “twitchy” without state) (red3d.com/cwr/steer/gdc99).
Zones (Couzin et al. 2002)
- J. Theor. Biol. 218: 1–11. Three zones: repulsion (radius rr; if anyone is inside, only move away), orientation (width Δro) and attraction (width Δra). Table 1 values: N 10–100; rr = 1; Δro and Δra 0–15; field of perception 200–360°; turning rate 10–100°/s; speed 1–5 units/s; error s.d. 0–0.2 rad; time step 0.1 s (PDF).
- Four states as Δro grows: swarm (attraction and repulsion, little alignment), torus (milling round an empty core; Δro small, Δra large), dynamic parallel, highly parallel. The state depends on history (“collective memory”): the same parameters give torus or parallel depending on the past.
Topological neighbors (Ballerini et al. 2008)
- PNAS 105(4): 1232–1237. Up to 2,600 starlings reconstructed in 3D; each bird interacts with about 6 to 7 nearest neighbors regardless of distance; topological interaction gives higher cohesion under disturbance than metric (arXiv 0709.1916; PMC2234121).
Murmurations (Hemelrijk)
- StarDisplay adds banking turns and simple aerodynamics to attraction, alignment, avoidance. “Waves of agitation” come from orientation changes, not density: a bank shows more wing, so a dark band runs through the flock at about 13.4 m/s, faster than the flock’s 10.6 m/s (Behav. Ecol. Sociobiol. 2015, search summary). For pixels: draw a banked bird with a longer, darker wing, and propagate a “bank” flag from neighbor to neighbor (inference).
Selfish herd (Hamilton 1971) and fleeing
- “Geometry for the selfish herd”, J. Theor. Biol. 31: 295–311. Each animal’s domain of danger is its Voronoi cell; risk scales with its area; the rule “move toward your nearest neighbor” condenses the herd. James, Krause and Bennett 2004 limited the domain and found a time-minimizing rule beats nearest-neighbor. King et al. 2012 (GPS sheep and a sheepdog) found sheep move toward the flock center under threat (Wikipedia).
Flow fields
- Dijkstra from the goal gives an integration field; each cell points to its lowest neighbor of 8; agents sample bilinearly and steer toward max_speed along it; one field serves every agent heading to that goal; tiling for big maps as in Supreme Commander 2 and Planetary Annihilation (howtorts). Elijah Emerson, “Crowd Pathfinding and Steering Using Flow Field Tiles”, Game AI Pro 360, ch. 7.
- For animals: one field per attractor class (water, shelter, den) per map, rebuilt only when the terrain changes (inference).
Cost in JS
- hughsk/boids without a grid: 1,000 boids at 60 fps on a MacBook; ticks fall from about 34,000/s at 50 boids to 95/s at 1,000 (github). Grid with cells the size of the vision radius and linked lists (head and next arrays) scales to thousands (Bird cloud, search summary). 10,000+ needs WebGPU or WASM.
- Measured in the
herdsdemo (this study, Chrome on a laptop): 309 agents (26 deer, 170 birds, 70 fish, 40 bats, 3 wolves), 8-pixel grid, at most 7 neighbors: 0.2 to 0.5 ms per step. Creature genome 0.008 ms; genome plus four painted frames 0.14 ms (Node).
4. Ecology and placement
- Ten percent. Lindeman 1942, “The Trophic-Dynamic Aspect of Ecology”, Ecology 23(4): 399–418: about 10% of a level’s energy passes to the next; he cited efficiencies from 0.1% to 37.5% and never called it a law (Wikipedia; EBSCO).
- Carnivores per prey. Carbone and Gittleman 2002, Science, “A Common Rule for the Scaling of Carnivore Density”: about 90 kg of a carnivore species per 10,000 kg of prey, whatever the carnivore’s size, across 25 species; numbers per prey biomass fall with carnivore mass (search summary; core.ac.uk).
- Density by size. Damuth 1981 (Nature, 307 herbivorous mammals): population density ∝ M^−0.75, so population energy use is roughly size-independent (“energetic equivalence”) (PDF); contested (Marquet et al. 1995; Isaac and Carbone 2011).
- Cycles. Krebs, Boonstra, Boutin, Sinclair 2001, “What Drives the 10-year Cycle of Snowshoe Hares?”, BioScience 51(1): 25–35: HBC lynx fur returns 1821–1910 cycle on average every 9.6 years (Elton and Nicholson 1942); all hare predators “showed strong numerical changes that lagged behind the hare cycle 1–2 years”; “predation is clearly the dominant process”; food acts indirectly; the cycle is “often cited as one of the few examples of Lotka-Volterra predator–prey equations” (PDF).
- Lotka–Volterra. dx/dt = αx − βxy, dy/dt = δxy − γy: neutral cycles; adding prey logistic growth (Rosenzweig–MacArthur) damps them; explicit Euler steps spiral outward, so integrate with small steps or semi-implicit updates (Wikipedia). Raising the prey’s carrying capacity K turns a steady state into growing cycles: Rosenzweig’s “paradox of enrichment”, Science 171, 1971 (Wikipedia). In the
ecologydemo, prey growth 2.7/yr, attack 12, handling 0.2, efficiency 0.3, predator death 0.75/yr, seasonal swing 15%, step 0.002 yr give cycles of about 8 to 9 years at K = 1.6. - Activity times. Bennie et al. 2014, PNAS 111(38): 4,477 mammal species: 69% nocturnal, 20% diurnal, 8.5% cathemeral, 2.5% crepuscular; nocturnal share highest in arid regions; cathemerality in the northern Holarctic (PMC4183310).
- Water and fear. Valeix et al. 2009 (Behav. Ecol. Sociobiol., Hwange): lion-preferred prey avoided risky waterholes; all species avoided waterholes at night when lions were near; animals spent longer drinking under high risk (vigilance). Most herbivores visit waterholes by day (Valeix 2011, J. Trop. Ecol.) (HAL; Cambridge). So “everyone drinks at dusk” is a game convention; prey drink by day, predators wait by water at night.
- Migration. Merkle et al. 2016, “Large herbivores surf waves of green-up during spring”, Proc. R. Soc. B 283: 20160456: 10 populations of five species (bighorn, mule deer, elk, moose, bison) time movement to green-up; Aikens et al. 2017: 98% of mule deer surfed better than random, 31% as well as a perfect surfer (eScholarship).
How games place wildlife
- Minecraft (Java) (Minecraft Wiki: Mob spawning): caps per category: monster 70, creature 10, ambient 15, water creature 5, water ambient 20, axolotl 5, underground water creature 5; global cap = cap × chunks / 289 (17×17 chunks per player). Passive mobs attempt only every 400 ticks (20 s), hostiles every tick. Spawns within 128 blocks, not within 24 of the player; passive needs light ≥ 9, monsters ≤ a random 0–7. Packs: most up to 4, horses 2–6, wolves and cod up to 8; members within ±5 blocks (triangular). Chunk generation seeds animals once per chunk with probability 0.1 (badlands 0.03, snowy 0.07), from the biome’s weighted list, ignoring caps. Bedrock: 9×9-chunk caps of 8 monsters, 4 animals.
- Dwarf Fortress tokens above: weights, cluster sizes, time and season flags per creature, biome lists.
- Rain World: dens, relationship tables, attractive rooms per species.
- RDR2: 200 species, scavengers, carcasses; no published rules.
5. What fits a phone
- A few hundred boids with a uniform grid: a few ms per step in plain JS (measured in the demo). Topological k = 6–7 is a cheaper and steadier rule than a radius when density varies (inference from Ballerini).
- Flow fields per attractor: one Dijkstra over the map grid when the map is made (a 64×48 grid is 3,072 cells: well under a millisecond).
- Creature sprites: painted once per species per facing per frame into a sheet (prebake), then drawImage per animal.
- Population: an off-screen aggregate per species per region (counts, Lotka–Volterra step per day), with individuals spawned only near the player, as Minecraft does (inference).