Devlog - 2: Health & destruction
Devlog - 2: Health & destruction
I've been working lately on incorporating health for anything that can be damaged and destroyed.
These are:
- Buildings
- Units
- Base block
With the basic AI already in-game that can build and a basic unit AI that will attack whatever you have built, it was an opportune time to get the last piece of the puzzle in.
As you can see it still needs some work, both on the attack location and distance. But it works, there's also a lot of destruction art to be drawn now but that can wait a bit.
There's still some refactoring to do on this and a few other systems, I might do some in the next few days so there might not be visual changes, but I'll still post updates :)
Tech side
If you've reached here and are interested in a bit more of the tech side on how things work I'll give a small overview in this section. I'll try to make this a standard for all my devlogs going forward.
So to incorporate health I just made all things that can be damaged inherit from a HealthObject that has max health, current health, and methods to change it and call a virtual destroy method if health falls lower than 0. It also implements an interface so those that search for things to damage don't actually get the whole object but just search for the interface and use it.
Units ping services that have all player buildings and all player base blocks. Then they proceed to attack the closest one with an attack cooldown when they reach the destination.
I already have plans to improve this in the future, but for now I think it's fine to start getting all the features and mechanics in. At least in a basic and rudimentary fashion for now.
A Byte War
A Byte War is a real time strategy game where you fight as a machine against an extra dimensional incursion.
Status | In development |
Author | Stellar Studio (Machrom) |
Genre | Strategy |
Tags | Indie, Pixel Art, Sci-fi, Unity |
More posts
- Devlog - 17: Unit attacksMay 26, 2024
- Devlog - 16: Influence & visualizationMay 15, 2024
- Devlog - 15: Influence clashMay 07, 2024
- Devlog - 14: Enemy defensive towerMay 04, 2024
- Devlog - 13: More influence artMay 02, 2024
- Devlog - 12: Enemy buildingsApr 29, 2024
- Devlog - 11: Building destructionApr 28, 2024
- Devlog - 10: WallsApr 26, 2024
- Devlog - 9: Influence improvementApr 24, 2024
- Devlog - 8: Influence tilingApr 22, 2024
Leave a comment
Log in with itch.io to leave a comment.