Pathfinding Solutions and Unit States
Hey everyone,
Exciting news from the development front--I have made significant progress on our game mechanics!
First off, I tackled the annoying pathfinding issue using Navigation2D regions, and I'm pleased to report that units are now navigating around obstacles smoothly. However, some parts such as the building sprites that exist outside of the Tile Map will still cause trouble with the pathfinding.
That's not all, I have also implemented a state machine to manage various unit states, including attacking, holding, engaging, gathering, and idle. This adds depth and complexity to our units' behaviour similar to RTS games.
Additionally, I have introduced different types of units, including gathering units, melee units, and ranged units. Each type brings its own unique capabilities to the battlefield, as well as their unit stats (movement speed, attack damage, special modifiers) adding strategic depth to gameplay.
I did encounter some challenges with fog of war implementation, but I found a workaround that does the trick for now. By using multiple opaque sprites with Area2D, I am able cover the map with it and dynamically adjust visibility based on unit movement. It's not perfect, but it gets the job done while I continue to refine the system.
Next up on the agenda? User Interface. I will be diving into UI design and implementation to enhance the player experience.
Stay tuned for more updates as we continue to shape our game world!