Posted September 13, 2022 by NickJW001
The enemies that move through the tower defence path require only simple movement from point A to point B. The Astar code provided in tutorial practical work to implement an object which can follow a path made up of waypoints.
The enemy game object follows another game object placed at the end of the path which is where the enemies will want to move towards to complete their path through the map. Later, the game object which the enemies follow was given a box collider which will destroy an enemy object on collision given that they have reached their destination and the player has failed to kill them before they reach the end.
The design and setting of the level was already partially covered in the game concept. It required a desert setting with some decorations to demonstrate the story behind the game where the player defends a civilisation's access to water and the invaders want to steal it all. On the website: https://opengameart.org/, I found commissioned tile map art created by MrBeast which was a perfect for the level design concept.
The first enemy was designed as mostly a testing object so it will need more design upgrades in the future. The enemy follows the path defined by the Astar system and performs perfectly. Scripts were also implemented to give the object some health to loose when shot by a turret along with a money reward when destroyed by a turret and the amount of damage it will do to the player if it reaches the end on the path without being destroyed.
Two original turrets were designed in paint.net. The consist of a base which remains stationary with a child of the rotating turret. The turret scripts will do damage to the enemy, rotate the turret to follow the enemy as it moves past and shoot a bullet prefab.