Implementing a Game-Over Screen
Learn how to detect when the game is over and then implement a game-over screen.
We need to let the player know when the game ends. This can be as simple or elaborate as we like. Some games display detailed statistics about the game, some wish you better luck next time.
The game-over screen is an opportunity to engage with the player and encourage them to come back for more. It should also provide an easy transition to restarting the game. We always want to encourage player engagement.
Let’s start improving the game over a scenario by fixing the crash when the adventurer.
Now, delete whatever entity died, present in systems/combat.rs
. That includes the adventurer, and when the adventurer ceases to exist, the heads-up display system crashes when it tries to find the adventurer’s status. In the system’s component declarations, add a request for a Player
component:
Get hands-on with 1400+ tech skills courses.