Enemies and Interaction



Enemies and Interaction - Screenshots.

Enemies and Interaction

This week I continued to work on my Enemy prefab that I had created late last week. I spent time on improving the movement of the Enemy, to try and improve smoothness of movement, the script for Enemy Behaviour was modified many times, and will likely continue to be modified throughout the coming weeks. I setup particle effects for the bullet in white colour, and for when the Enemy dies and the game object is destroyed the particle effect displays in red. So far through writing prompts within Copilot I have setup variables on the Enemy Behaviour script so that items can be adjusted in the inspector such as:

Speed, wander radius, wander interval, idle duration, pursue speed, pursue distance min and max, activation distance, face player distance, prediction time, attack radius, attack cooldown, attack range, stopping distance, idle cooldown, stuck check time, obstacle layer parameters which is currently set to Walls.

 

The enemies now will spawn at the start of the game into 20 different locations throughout the map. A scoreboard needs to be setup for enemies killed. For the enemies I looked briefly at using Unity's NavMesh system, at this time enemy movements are all done via the Enemy Behaviour script. 

 

On my Player character I added a sprint ability which can be activated by holding down the Shift key. I setup the Player Health script and a game over display once the Player's health goes to zero. I've also setup spawn points for the Cave Explorers, there will only be a maximum of 3 in the level at any one time. They spawn randomly into a list of spawn points of 10 possibilities.

 

I drew the Cave Explorer sprites myself within GIMP, at this time they are not animated sprites. Just singular images. I attached them to the Explorer spawner objects, so that three of them will spawn at the beginning of the game. At this time, they are setup to fade away when the Player gets near to them, a scoreboard needs to be setup to say how many you as the Player have found.

 

Other level developments:

 

Sound effects, I started the process to learn how to add sound effects and have added various sounds to the game. I've also added game music, all subject to possible changes in the future. Sound effects such as firing of the pistol, sound for when the bullet hits the enemy and enemy takes damage, when the player is taking damage, and a game over sound effect.

I added a large sprite to represent flooding the cave and attached a script to flood the cave. I attached a buoyancy effector to a TestWater sprite as well as a Box Collider 2D and added a Water Rise script that rises in a speed and max height modifiable within the inspector. At the moment it rises from the bottom of the level and rises upward in the Y axis. Adjustments and implementation still need further consideration and development at this stage. Escaping the cave after finding the Explorers is the final goal, a way to escape the cave needs to be developed for the game. I have several ideas but still developing those.

 

I also noticed on my upload that the enemies were not moving as fast as they were in my unity build within unity. I need to look further into why this is happening.

 

Feedback

This week I received feedback on the game, that the enemy attack is ok, but found it hard to shoot straight, and that the enemies didn't seem slow as I had mentioned in chatting with the tester.

 

My thoughts on feedback: I could potentially make an aiming crosshair type of display or something similar. Still considering this as an option at this time. Enemy behaviour is also likely to change over the coming weeks.

Files

Build.zip Play in browser
45 days ago

Leave a comment

Log in with itch.io to leave a comment.