This week we needed to get a way to determine progress on the screen. The main way to do this is to add the Score. In our game, Score is earned by defeating enemies and is retained in the playthrough. This will act as a currency the player can use to purchase enhancing items, but since we don't have our store yet, we will be using this as an arcade style scoring system for the meantime. There were a few issues bringing this feature to life. One, there was no indication of earning score on anything and Two, the score would not be retained if we simply attached it to the player.
We had a few animations for Power ups to play with, so we decided to include a Coin Splash particle effect to enemies when they are defeated. This is a clear visual indicator that the enemy has been defeated and can move on to new enemies. The other issue is only a problem of where to put this feature, and I was recommended to put it inside the Game Instance. The game instance starts as soon as the game turns on, and all information stored there will be retained. Perfect for a score to be stored until the end of the game. We just use a few Delegates to call these functions in timely locations, and we now have a Score constantly being displayed to the player that updates when enemies are defeated and stays when transitioning levels!
Did you like this post? Tell us
Leave a comment
Log in with your itch.io account to leave a comment.