Virion devlog #5


3 minute read


I put off working on indirect/direct firing weapons for a couple of days to get the basics of targeting and arc display going, but now that I have that down, I added types of different range selection. Indirect firing weapons don’t require a direct line of sight, these will be weapons like rockets, or attack drones. Direct fire weapons are your classical AC and laser type weapons. L.O.S is normally a tricky thing to implement when you are doing it for an arc F.O.V but the weapons in this game are simple, and only have effect on files and ranks. So no diagonals means easier L.O.S sigh implementation. Just keep looking at the next tile in the direction you are scanning in and if you hit a target or blocker stop progressing in that direction.

Targeting got some love today as well. I had already implemented ranged weapons for enemies and their targeting arc was visible on the map when the player was moving, but the units did not engage the target even it if came into range. I changed that today. If an enemy detects a player unit in firing range it will drop it’s current target and go after the player unit. If it was commited to an attack when the player unit jumped into range, it will still carry out the committed attack then persue the player unit. The adds a bit of variety to the AI units. It is still relatively easy to tip-toe around the firing arc of the enemies but may a smarter AI that guards choke points on the map (like a mountain passage with a single tile width way to access an area of the map) would make for some interesting tactics and game play.

Not all units in an army are there to engage and attack. Well at least not until it’s a last resort so I added a support unit that will increase the armor of the enemy units as long as it is alive. It will try to center itself relative to it’s team mates, but I may change this movement heuristic to a more evasion biased heuristic, like run away from the player. I’m kind of worried if this will actually lead to all the support units grouping in one corner of the map while trying to stay away from the player. The logic behind trying to center them was to simulate an area of effect range for the armor boost.

The number of unit types are increasing so here is a a little info on the types so far with some of their stats:

Basic enemy

This guy only has melee attack with damage 1-3, armor 2 + X (based on level), speed 1 - 4

Advanced enemy

This guy has a melee weapon and a ranged weapon. These can get pretty dangerous as they can switch targets and start going after the player units if they can lock onto the player.

Armor support enemy

These guys don’t attack the player, but provide an armor boost +1 to all enemy unit while they are alive.