Hello again, everyone! Time for another devblog post on the game I'm making. Let's get to it!
What Was Done Since Last Time
So, yesterday was a bit of a non-productive day. Long story short, I was only able to get the "Game Over" screen and player death working. Now, the player can die, and a "Game Over" screen shows up allowing the player to reset the game to play again. The main issues of implementing this were leraning how to use the Action system for C#. From what I was able to learn when using it for the "Game Over" screen were Actions are a type of delegate which allow you to run multiple functions with a single object.
Say, you wanted to have multiple things happen when the player gets to the end of the level. Specifically, you want to stop the player and any enemies from moving and show the "Mission Complete" screen. You can actually have an Action delegate run a function from the Player script, have the Enemy script find a reference to the Action delegate in the Player script and also run a function which stops each enemy from moving, and also have the "Mission Complete" script refer to the Player script's Action to display the "Mission Complete" screen. Long story short, Actions and other forms of delegates allow you to run multiple functions from other scripts at once without much headache.
Anyway, let's get to what I'm hoping to do for tomorrow...
What To Do Today
First off, I hope to get the basics of the game HUD (heads-up display: the stuff you see on the screen when you play most games) running in my game. This will consist of the following:
- Player Health
- Player Score
- Time played
That's right! I'm also hoping to get some general player stats working, as well. Hopefully, this gives players a general goal to strive for when playing other than just messing with the mechanics. Tracking this information will require making another script just to track this information while the player is actually playing.
In terms of gameplay, though, I'll also be adding a small cursor to show players where their turrets will be placed before the actually place them. The cursor will also depict the actual radius in which their turrets will attack if any enemies do come close to them.
Well, that's all for today's post. No actual pictures, since I can imagine most people reading this can imagine how a "Game Over" screen would look like. As always, thank you to all who took the time to follow the development of my game.