Missed a day, heres some progress!
Yesterday I managed to build out the AStar Pathfinding handler and managed to get it working for spawned units, but felt it wasn't enough to justify an update solely in itself (nothing really visual was happening)...
So, when I jumped into working on this today, my first task was to sort out the Unit's state machines to utilize the pathing, and also flesh out the Excavation mechanic for the Grid tiles. This is what you can see in the video attached.
Workers (Helper-chan) are spawned each time the "Core" (purple thing) is clicked, this is currently bypassing my need for a UI and instantly firing the "Purchase and Spawn Unit" logic for the building -> spawning a Worker. These Workers then register themselves to the System Tick Manager (firing a tick every second). On tick: the Worker calls the Task Manager requesting "Tasks near me, that I can do". The Task Manager then generates a list (based on proximity) of tasks and returns it to the Worker. Based on a configurable number, the Worker will choose one of the first few items in the list (may not always be the closest that is selected, giving them a modicum of autonomy). The Worker then requests a Path from the Pathfinder Manager, and when that is generated (through AStar), begins following the steps in the path towards it's goal. While the Worker is pathing, each tick: the Worker is checking to confirm that the task still exists, if it doesn't -> return to Idle, and start the process all over again! However, if the task exists still, then when it reaches the goal, it will perform the task (Excavate) until the task is complete/removed.
All of the above is visible in the example video, this has been a tonne of fun giving life to Helper-chan, she deserves headpats for being such a patient automaton :P.
Get Crypt Underlord
Crypt Underlord
Submission for the RTS JAM 1998.
More posts
- Development is on hold for now...Jul 18, 2022
- Experiments with Cursors, Draft ImplementationJul 10, 2022
- Draft UI, Minimap, and Contextual MenuJul 09, 2022
- New states for A.I. tasks, Item drops too.Jul 04, 2022
- Family Time Obligation: Complete, back to work :)Jul 03, 2022
- Added Fog of War, Fixed clipping, and adjust lights.Jul 01, 2022
- Optimizations and A.I. AdditionsJun 30, 2022
- Not much time to work today, but did so anyway!Jun 27, 2022
- Basic: Inventory & Tasks, + Shaders and Lighting.Jun 26, 2022
Leave a comment
Log in with itch.io to leave a comment.