In last weeks post I talked about struggling to figure out how to do a non-laggy search algorithm for the enemy units. After a bit of grinding, the issue was fortunately resolved. Below is a wordy explanation for those who are actually interested; otherwise the update is that the enemy AI programming is mostly done, enemies can attack and kill player units during their turn, decision making as to which unit they should attack has been implemented, (closest < lowest hp < has some sort of tactical weakness) What’s left is mostly a lot of polish on how the camera moves during enemy turns.
What was causing the frame lag was searching the entire grid in a single frame during each enemies turn. The solution was to break down the search into much smaller searches, and only do a full-grid search at the very beginning of the scene load, when the enemy unit instances are loaded. When the scene begins the full grid is searched to create an initial path so the enemy knows what general direction it needs to be heading. Every time that unit has its turn, it does a smaller grid search for any player units it should be attacking or moving towards, and if it finds available player units it will update it’s initial path. If it finds nothing, it continues on its original path, towards the location that player units were. The next little bit of programming revolving around enemy units is how destructible bridges work. The only time that enemy units need to reinitialize their full-grid path search is when the possible paths on the map have changed, which could occur if a bridge has been destroyed.The gif below doesn’t demonstrate all behaviours, but just shows enemy units attacking player units.
Some character art that got done:

The next month the hope is to showcase some of the 2d animations during combat engagements. I decided to postpone the character stats screen (which in theory is very simple to do) because I had an idea to mesh it with some animations.
Thanks for reading.
