All in all, the Core-Programming part of the shooter is done. But some bugs still remain. I keep testing the game to find the smallest things. So, the implemented items from the core programming are as followed:
- Player Ammo count of current/max, maximum of 150 ammos are set.
- Negative pickup, pickup that randomly spawn 2–4 more enemy at a same time.
- Enable enemy move in new way, there’s a second type enemy that moves along the top of the game so the player can’t thrust destroy the enemy.
- Balanced spawning, implemented on both the enemy and pickups.
- Enemy Shield, the one along the upper horizon comes with shield rather than the one that translates down towards the player.
- Aggressive Enemy, the enemy that translates down dash towards the player within the radius.
- Enemy pickup, enemy fires at will in order to destroy the pickup upon raycast.
- Pick up collect, Pressing the C key absorbs the pickups from distanced.
- Enemy Avoid Shot, the enemy that translates down towards vertical axis evades the shots fired by the Player.
- Homing Projectile, a rare missile powerup are consumed to fire a detecting missiles towards the enemy.
One of the challenge I face at the current moment is conflict of scripts. In the beginning of the game, the enemy seems to dodge the laser fired by the player perfectly. but upon the player picking up the negative pick up which penalizes the player by summoning more enemy at once, the enemies stop dodging the lasers from that point on. I believe this is caused by the enemies spawned from the player script in compared to it being done from the spawn manager. But I don’t understand because the regardless of whether it’s the spawn manager or the player that spawns the enemy, the prefab holds the enemy script that has the quality of evade movement. I will definitely have to look into it.
=== fixed ===
I had an idea as soon as I posted the blog and jumped right back into it. I believe writing out my thought organized what I had written, in my head. Originally under the enemy script, I had set a bool, isEnemyEvade to true for default. and I’ve been calling the Evade(); only on a certain enemy. So technically, I didn’t have to call if (_isEnemyEvade == true) at any point. So I had set them to // and of course, it worked. There was no point in setting the bool if the default was already going to be true from the beginning and no other variables changing the bool throughout. It was an unused function and thus, shorten the script and fix the bug at the same time.