Level Design, Turret & Enemy Movement


Using An Astar System For Path Finding

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. 

Astar path defined by a number of nodes

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.

Building The Level With Tilemaps

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 level designed from the tilemap

Enemies (The Tachobytes)

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.


The first enemy design

Turrets

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.

Turrets

Enemy pathfinding, map & towers seen together


References  
Tilemap: MrBeast on OpenGameArt.org -- https://opengameart.org/content/desert-tileset-0

Leave a comment

Log in with itch.io to leave a comment.