Pick a scenario; the sliders stay editable.
Flat above the lower critical temperature (28 °C, assumed), rising linearly below it. The dot is the current garden temperature.
Play with a toy to see its position trace.
The science
Energy budget. Basal metabolic rate follows Kleiber’s law BMR = 70 M0.75 kcal/day (M in kg): 293 kJ/day for 1 kg and about 271 kJ/day for the 0.9 kg hedgehog (real hedgehogs run somewhat below the all-mammal line; this is the textbook value). The day’s cost is BMR times an activity factor (sleep 0.9, rest 1.2, idle 1.4, eating 1.5, social 1.8, collecting 2.5, play 3.0; typical, simplified) plus a cold surcharge. Hunger in the HUD is the filled fraction of an energy buffer of Emax = 1.5 BMR.
Thermoregulation. Scholander–Irving: above the lower critical temperature Tlc = 28 °C (assumed) the rate equals BMR; below it M = C (Tb − Ta) with C = BMR / (Tb − Tlc) and Tb = 35 °C. Real European hedgehogs also enter torpor and hibernate in cold weather; that is not modelled.
Walking. Explore trips cost the net cost of transport of Taylor et al. (1982), COT = 10.7 M−0.316 J per kg per metre, about 11 J/(kg m) for a 0.9 kg animal walking at a typical 0.35 m/s, so a 1 km trip costs about 10 kJ on top of metabolism. Food: raspberries 2.2, apple 2.2, mealworms 8.5, beetles 6.5 kJ/g (typical values; portions 45, 60, 30, 18 g).
Water. Turnover is taken as 100 mL per kg per day, rising 5 % per °C above 20 °C and faster while active; a drink adds 24 mL of a 60 mL buffer (all typical, illustrative). Needs. Energy (stamina) falls with activity and recovers while resting or asleep (23:00–05:00); fun and social decay with time; health relaxes towards a target built from satiety, water, stamina, diet balance (fruit-only diets lower it) and comfort; Accessories Love relaxes towards 28 + 14 per worn item; happiness is a weighted mean. These weights and rates are game-design choices, not measurements. Real hedgehogs are nocturnal and eat mainly insects, worms and slugs; the game day is shifted to be family-friendly. Never feed real hedgehogs milk or bread, and never dress a real one.
Toys. A rolling ball slows under rolling resistance, dv/dt = −Crr g, so it stops after v0/(Crr g) having rolled v0²/(2 Crr g); one scene unit is 0.19 m. The page integrates it with a fixed step and compares with this closed form.
Checks. (1) Kleiber scaling; (2) a 12-hour cold-room bill against the closed form; (3) a 1.2 km foraging trip against COT · M · d plus metabolism; (4) rolling-ball stopping distance; (5) a 1440-step day returning to the same clock time; (6) eating then resting conserves energy. Simplifications: one animal, no illness or hibernation, fur and spines are not thermally modelled, prices and rewards are illustrative game numbers.
The hedgehogs, cottage, burrow and props are models made in Blender; the model and the game logic run in the page.