Soltairus Navigation

Project Phases Update 3: Enemy AI

Welcome back everybody to Update 3 of Project Phases. This update primarily focuses on Enemy AI and some changes to the battle system. I anticipated this to take much longer than it did, that was a nice surprise. So, let’s get started!

Note from future Andy –
This is by far the most pointless update, since I pretty much completely removed or change everything I did in this update in Update 5. I mostly did this because the system was so predictable and simplistic as you will see. So, anything you read here doesn’t apply to the game anymore. Just an FYI, continue reading if you want.

Update 3 Showcase Video

There is only one change to the overworld. In the top right corner of the screen, under your health there is a point counter. Your points now carry over from battle to battle and just like your health, your points get replenished when you touch the heart. I briefly talked about this in the end of the last update, and I decided points should be persistent. I am not sure if this change will stick, but I will be messing around with it.

Point counter in the overworld
Point counter in the overworld

The enemy is where most of the changes have been made. As the title of this update may suggest, I’ve added some basic Enemy AI. Before, the enemy would just do the same attack every turn. This AI is made up of a few changes. First off, the enemy now has a point counter as well. This means enemies must follow the rules of the point system just like the player does. The enemy also has a bunch of AI parameters that all depend on what phase the player is in when the enemy attacks. This is the extra wrinkle that makes AI in this game a bit more complicated. Here is a list of the different rules and such that the enemy follows…

If player is in the Defend Phase
-If enemy has less than or equal to 6 health, it will use its phase to heal.
-First Attack – Attack or heal, if points permit, depending on health.
-If enemy has 5 or less points, it will wait through the phase.
-Second Attack – It will then heal or skip, depending on health.
-Max damage 0 (Thanks mechanics).
-Max Heal 10.

If player is in the Attack Phase…
-If enemy has less than or equal to 6 health, it will use its phase to heal.
-Can do up to 10 damage, but it is random.
-First Attack – Attack or heal, if points permit, depending on health will do random up to 10.
-If the enemy has less than 8 health, it will heal instead.
-Second Attack – It will then heal or skip, depending on health and phase.
-Max damage possible is 10.
-Max Heal 10.
-If the enemy doesn’t have enough points for both attacks, it will only do one.

If player is in the Wait Phase
-If enemy has less than or equal to 6 health, it will use its phase to heal.
-Extra damage will be done in wait, up to 5 and down to 3.
-First Attack – It will attack, wait or heal, depending on points, and do 5 damage.
-Second Attack – It will attack or heal, depending on health and points, and do 3 damage.
-Max damage 10.
-Max Heal 5.

All of these changes to the enemy help the system feel a lot more varied since the enemy isn’t just doing the same thing. In general, the enemy will try to do the best move available to it. Also, the enemy can heal itself now so defeating it isn’t as easy anymore. The AI is prone to aggressively healing, so that certainly needs some tweaking.


That’s all for this one. Pretty short update, it was really just quick (but a tad tedious) update for this AI. It’s pretty minor, but this sort of stuff is important when first building out the game. I would highly suggest watching the video since the latter half includes a pretty good demonstration of the basic combat now that the AI is smarter. I’m not exactly sure what’s next, but I have a lot of stuff on the table that I want to work on. Multiple-player combat, more overworld additions, more enemies, animations etc. I guess we’ll find out when it happens.

Thanks for reading,

Andy

Note: Project Phases Update 1-7 all had their posts written after their release. I did not launch the website until January 25th, 2019, so any post dated before then were created after the fact for the site and the date listed for these posts is when I released the video. I wrote these posts using the showcase videos and my notes from each update as reference and I tried to make sure I didn’t include any future information (i.e. I only wrote what I would have written at the time). However, they are also less in depth since I didn’t write notes as I do know for the purpose of the site. Just want to be clear about the timeline since it may be a bit confusing. Thanks!