AI
My AI implementation is now finished, working as hoped for. I came across one small bug, the moving boolean on AI units was not resetting after their turn, meaning they would not carry out a movement the following turn. This has now been fixed by adding moving = false to my list of variables that are reset when the AI's turn has finished.
I have now implemented the statements required for if the AI is not in range to attack a User Unit, or be attacked by them. Originally, I designed it so the AI would stand their ground, and use a health vial if needed, but realised how bothersome this could be to a player, so have no included my AI to move towards the closest user unit, providing they do not end up in range of them. This means the AI will always attempt to move in on user units when possible, and retreating if they acknowledge a user unit can reach them next turn. I feel this makes the AI move and attack more naturally, rather than simply waiting for the player to send their units into range.
Inventory
I have now tweaked the inventory system, so if a user unit has any additional weapon items in their inventory, when the corresponding inventory button is pressed, it is set to the equipped weapon.
![](https://i.gyazo.com/aeefd9df866e3e9746d7487f81d05944.gif)
Unit Classes
I have now altered the unit classes, creating 3 specific classes for the AI. These classes are weakened versions of the user units classes, that still utilize the same weaponry. In play testing, this has proven to lower the challenge for the player, but give them a better chance to get a feel for the gameplay.
![](https://i.gyazo.com/fc6528e86476d3df55d94986bcc40e06.gif)
Unique Support Mechanic
I have now implemented a Unique Support Mechanic into the game. Simply, when a user unit attacks an enemy, if there is another user unit on the opposite side of the enemy, both user units attack. This only effects user units, so the enemy AI cannot utilize this tactic.
![](https://i.gyazo.com/b236636ea8b7437a7a7582c3bb6f1a29.gif)
![](https://i.gyazo.com/5cbd59a90ae2dead50f00cf65882200e.png)
Unit Positioning
To simplify play-testing, I have now added a Vector2 Array to the GameManager class, that sets the positions of the units. While this array has to be manually changed to cater for additional units, it has allowed me to alter conditions in the project at a much faster rate than hard-coding their positions. Also, opposed to the block of positions I initially had, to allow quicker changing of unit positions, I have now implemented them into a for loop, meaning the only variable that needs to be altered for the positioning is the array size.
Final Days
As the deadline for the project approaches, I intend to continue tweaking what has already been implemented, ensuring it flows and works as best possible. I still would like to tweak the combat itself, and get a good balance worked out for the stats.
Thursday, I intend to write up my Post-Mortem on the project, as I feel I have learned a lot throughout this project, in coding, problem-solving, planning, and how best for me personally to approach certain issues and problems.
No comments:
Post a Comment