Week update
It's been a while since the last update, so this will be a fairly big one. The end of this week marks the start of the content intensive period. After this the game will be at a substantially more playable state.
Enemy Pathing Tweaks
I added two main features to the enemy pathfinding systems, repathing and vertical movement.
As the player is placing and removing blocks, the path from entrance to goal will change. This is fine for enemies that are spawned after these changes are made, they just use the new path. The issue comes from enemies that are partway there when it changes. They have two options: use the new path, or follow a custom path for them.
If the enemies are located on the new path then they automatically use that. However, if they are not able to they will make their own path. If a block is placed/removed that causes their custom path to change then they perform the whole check again, attempting to use the main path and if not, using a custom path.
The second major change is that enemies are no longer limited to horizontal movement. They are capable of climbing over one block high obstacles. In order for an enemy to go around a wall, that wall will now need to be two blocks high. This applies to both climbing up as well as down. If the enemy is on a two block high wall, they will need to find a 1 bock drop in order to be able to get down.
This means that the player will have to be more vigilant in building their field. It also allows for more interesting designs, as the paths the gooeys can take can be shaped to go upwards.
Tower Structure
The second major bit of work that has happened is the implementation of all the Targeter blocks.
This may not seem like a very large element, however the tower systems behind the scene were fully replaced in order to accomadate new funcitonality and to make implementing towers as easy as possible.
Firstly, from a player perspective, targeters replace the emmiters defined in the prior post and effectors replace the effects. This is purely a name change however, they still perform the same function.
Second, targeters now shoot independently of each other. Each targeter also applies all effectors on the tower at that moment.
Behind the scenes quite a few things have changed. Targeters now have a multiplier that is used for moderating the strength of effectors. This is used to make targeters that effect a large amount of enemies do so weaker than a single target variant. This multiplier is fixed per component, with individual instances of unable to change it.
Targeters also have different attack modes now, they are:
First, which attacks the enemy closest to the goal;
Random, which attacks a random enemy;
Weak, which attacks the weakest enemy; and
Strong which attacks the most powerful. The targeter will continue attacking the same target until it is no longer able to, because it has died or left range.
Effectors now have multiple options for how they are applied as well as how long they last. They can opt to be applied
Per Shot, where the effector will be applied every single time the targeter shoots; or
Continuous, where the effector is only applied when a target is newly attacked. The other option is for how long the effect lasts.
Instant, for effects that have no duration;
Lasting, for effects that last the whole time the enemy is targeted; and
Permanent, for effects that have a duration controlled by the effector.
Targeter Blocks
Here is the list of all the Targeter blocks that have been implemented, as well as a description of them:
Single
This one selects a single target within range
Chain
This targeter picks a single enemy within range and then chains from that to enemy closest to it. It repeats this a number of time, stopping when there are no more enemies within the chain range, or when the maximum number of enemies has been reached.
Aoe
Simply targets all enemies within range.
Splash
Like the Single, this chooses a single enemy, however it targets all enemies in a small aoe around that base enemy.
Sniper
This one has an extremely large range, and picks a single target within that range. However it also has a minimum distance, meaning it won't pick enemies that are too close to the tower.
Missile
A combination between the Sniper and the Splash. It targets all enemies in a small aoe of a distant target.
Future Work
The next work is to implement all the effectors planned. Following this two additional enemy types as well as the wallbreaker unit will be implemented. Then work will begin on the shop system and implementing smooth upgrading for the blocks.