Spawner Enemy - UQdeco2800/2021-studio-6 GitHub Wiki

Overview

The Spawner enemy is unable to move, but will spawn Small enemies closely around itself at a constant rate while it can see the player. It will continue to spawn these enemies until it is killed. The spawner cannot damage the enemy itself.

Design Justification

The egg was decided to be a valid spawner enemy with the change of the colour palette to a more shadow appropriate choice instead of neon green. The egg was chosen due to the correlation with the word spawn which is the name of this enemy.

User testing: Spawner

What do you think of when you hear the word spawn? Little items coming out of something, something being born, monsters being born

(show image) What does this remind you of? An alien egg, a cracked egg which a creature will come out of

Sound Effects

The sound chosen for when this enemy spawns other enemies is an egg cracking sound to align with the design on the sprite

Programming

The createSpawnerEnemy method in NPCFactory is used to create this enemy with the appropriate stats and functionality. The spawnSpawnerEnemy places the enemy within the level at a random location. This method had to edited to avoid the enemy being against the bounds of the map and subsequently spawning enemies outside of the map. The SpawnerEnemyTask file and method was created to add a new task to the enemy. The task will use the game timer to call the spawnFromSpawner method at a fixed interval. This method will create a random position around the spawner within a specified range and then create a new Small enemy using the appropriate existing method and spawn it. The enemy has not touchAttackComponent and to hitbox component so that entities can pass through it and the player cannot be harmed by it on collision.