Jordan Ross
Game Developer
Tower defense
Project name: Turret-BO
Made in: End of First year 2020.
GitHub:
Team size: 1
Tools used: Unity, visual studio (2019) C#, GitHub Trello.
Description:
This Tower Defense game was for my end project in my first year, I started this project using tutorials and later started adding my own troops and codes to expand the project. The tower defense is still very basic but I'm still trying to expand the project.
Gameplay:
The gameplay consist of a standard top-down tower defense, using multiple towers to stop enemy's from entering the end point. If the enemy's do enter the end point then the player starts using lives. you as a player start with 100 lives once all your lives are out you lose. your objective is to keep the enemy's away by killing them before they reach the end point.
Code snippets
Nodes placement:
I typed all the code myself but I used some tutorials. The code you see here is used to place towers on the nodes in the game, it would read rather or not it was hovered on then it would change color and let the player place a tower if he had enough money to do so. The code would read witch tower was selected checked if you had money and then place an tower on the
This part of the code will check rather or not the tower the mouse is hovering over is an upgraded tower or not if not then the player gets the option to upgrade, if they have enough money to do so.
Oil Pump Tower:
Besides only following tutorials I also came up with a tower of my own, here on the right you can see an oil pump tower witch generates in game money over time. I made the tower and my own script on my own and I also edited a simple animation using the unity animator window. to make the pump actually move while it's standing in the game.
Oil Pump Code:
Here you can see the code I used to make the oil pump tower, with Booleans I can check if the tower is currently mining, if it is I start the timer. When the timer runs out the bool checks again rather or not it can mine, then the process starts again. During this mining time an animation keeps playing non-stop. This tower will then generate income over time I started the range of income of 25$ per 15 seconds. because I thought this was very balanced. And that was basically all for this tower.