Moondog, day 14 (3 Nov): gardens, a forest, weather, and a hole in the ground
34 commits, all over the map: farming, trees, weather, two boss models and the shell of the first dungeon.
Garden beds
A Garden Bed is outdoor furniture that holds one crop. You can have 4, 8 or 12 by plot size. You plant from a seed picker, water from a pail (filled at the lake), and harvest when it's ripe. Watering keeps a bed wet for 24 hours, and a crop only grows while it's wet. It dies 72 hours after its last watering unless it's already ripe. Anyone can water; planting and harvesting belong to the household unless the bed is set Public.
Flax, turnips and potatoes to start. Flax goes on to rope, thread and cloth, and there's a well. Crop stages are worked out from timestamps every ten minutes, and only plots that changed are sent again.
A forest, and what it cost
I planted a forest round the spawn village: tall variants, three new woods, then ancient oaks, giant beeches and spruces, and ancient yews.
The 400-tree forest took a test view from 6.4 ms a frame to 51 ms. Texture size and draw calls barely mattered. The real cost was the shadow map drawing every alpha-clipped leaf card of every tree into each cascade, plus the cards overdrawing each other on screen. Each tree is now four meshes:
- bark and leaves, drawn to 150 m, the leaves casting no shadow and using a soft foliage material (which also fixed crowns that shaded themselves near-black)
- a ~150-triangle crown drawn only into the shadow map
- a billboard picture of the tree past 150 m
Trees got volumetric fog to stand in, and the settings screen went to tabs.
Weather by region
Weather regions are circles with a climate: temperate, wet, dry or cold. Each moves through its own Markov chain of clouds, fog, rain, storms and snow. Snow falls in cold regions and on high ground. Rain counts as watering for garden beds under it, which I liked.
Weather has its own message, sent at login and when it changes, and never rides the state packet. The client blends at the camera, so crossing a border sends nothing. Rain and snow stop under roofs. Anyxa's Caldera has morning mist.
The Sunken Ruin
The first dungeon: five levels under Anyxa's Caldera, 17 hectares of floor, two stairwells per level, and an entrance cut into the hillside above the lake. A generator lays it out offline from a seed: rooms, stairs, collision, terrain to cut and a navigation mesh. The same code runs on client and server. The server asks the dungeon for floor height first, for everything from spawning to dismounting.
It's an empty shell for now, ready for contents tomorrow.
Two big ones, and the rest
Two boss-sized creatures, built by hand in Blender: a moss-green dragon about 16.5 m long with a 20 m wingspan, and a hundred-metre earth titan. Both are rigged and animated.
Also: torches carried in the left hand (and NPCs light theirs at night), a brass lantern on Anyxa's vardo, a stegosaurus grazing by its wallow, and ambient sound: wind, a dungeon drone with reverb, footsteps and creature calls.