Devlogs
Zombie & Civilian AI
This weekend was a productive one!
New features:
- Civilians and zombies have been added (finally)
- Civilians walk between random buildings using an A* navigation mesh consisting only of road tiles
- Zombies pathfind towards a fixed point (eg. the train station, but currently the target is a little green floating debug triangle) using a Dijkstra navigation graph that covers the entire map. TLDR: Civilians can only walk on roads, but zombies can go anywhere
- Civs will flee nearby zombies
- Zombies will chase nearby civs, but only if they have uninterrupted line-of-sight
- Zombies can kill and convert civs they touch
I haven't stress-tested it properly yet, but I have been totally amazed at how well performance is holding up - I have been playing with hundreds of pathfinding and raycasting entities zooming around, and havent ever dipped below 60FPS
Godot 4.0 has introduced multithreading and a new Vulkan rendering pipeline, which I think have made an ENORMOUS difference in the performance of the engine. Feels good man :-)
BuildingRegistry
Oh also, minor feature but with quite a bit of backend code supporting it:
- All buildings now belong to a "BuildingRegistry" which periodically checks each building to see if it is connected via roads to the train station or not.
- Unreachable buildings are marked with a floating sign until they are reconnected to the road network
- This building registry in future will handle tracking all the real-estate value of placed buildings, and have triggers on building destruction etc