Enemies


Enemy Design:

My initial plan on how the enemies in my game would look like, was to have a variety of different pixelated versions of viruses and bacteria cells. This was to help the player understand that many different viruses and bacteria exist and how they affect the body differently when in contact. Although after consulting some poor unexpecting university students in the library, the feedback that I received was that they could only recognize that 2 of the enemy sprites were virus shaped and did not think that the enemy sprites would have the same learning effect as the ones that they could recognize.  Upon receiving the feedback, I decided to only use one “known” viral cell shapes as it was the most practical and created it in a couple of colours.

Enemy Movement:

I created an enemy prefab that would be used as the base for all of the enemies within the game. To do this I created an empty game object, and added a sprite rendered competent, so I would be able to control what the enemy looked like. Then I added a Rigidbod2D component, so the enemy would be able to move within the game, and I set its gravity to zero to keep the enemy from falling off the screen. I added a circle collider to the enemy prefab because it matched the enemy shape, and the collider will help keep the enemy from venturing off the tile map and help recognize when the player has come in contact with the player and trigger certain scripts within the game such as player health. I created two scripts based off the enemy movement scripts used in KIT109 Tutorials to make the enemies move around the game. To help control when the enemies needed to switch between the two scripts I used an animator controller.

 

Enemy Spawning:

To spawn enemies around the tile map, I have used strategically placed spawners throughout the map which will only spawn two or three enemies in that area of the map, over a certain period of time. I did this by creating an empty game object and adding a spawning script to the game object which controls which enemy is spawned, how many will be spawned and how long between each spawn. My spawning script is based off the spawning script in the KIT109 tutorials. Some feedback that I received about my placement for my spawners, and that they think that it would be easier to make the tile map the spawner, instead of individual spawner around the map. I have yet to look how to do this.

 

Killing Enemies:

I’m still currently working through how to kill the enemies through sword strikes while the sword is a part of the player sprite. I am currently viewing Melee Attacks Tutorial to see if I can master the Art of hitboxes.

References:

Spalding, S 2018, GameMaker Studio 2: Melee Attacks TutorialYouTube, viewed 12 May 2024, Link

 

Leave a comment

Log in with itch.io to leave a comment.