Here’s a question: how long does it take for a new game project to add a way to win or lose?
I ask because I noticed in my finished 48-hour competition projects, I typically wait until the last hours to add a way to end the game, and I wonder if waiting this long is a common occurrence for other game developers.
In the last day or so, my efforts focused on providing Stop That Hero! with a way to know if the game has ended in victory or defeat for the player.
If the Hero has conquered the castle, the game knows that the player lost and ends the game with a message informing the player. If the Hero has run out of lives and is currently dead, then the game knows that the player won, and a different message is presented.
End game conditions are obvious things for a game to have, but early in a project, when you’re trying to figure out game play, it’s easy to forget that the player is going to wonder what his/her goals are. Or not. Maybe end goals are the first things game developers should implement? Maybe they should come last? See the questions at the end of this post.
Now, recognizing and handling defeat was relatively easy. I already had a way to clear towers, and I merely check if the castle is specifically cleared. Clearing is kind of hacked together, though. All clearing does is deactivate the target for a tower/castle, so my defeat condition monitor is checking whether the castle’s target is active.
I’m not happy with the abuse of targeting components in tower clearing, but it functions for now, and it is easy to change once clearing becomes a more involved. When the Hero reaches the castle, a message pops up to inform the player that the game was lost, and a button is presented. Clicking that button takes the player to a yet-to-be-implemented stats screen.
Victory was almost as easy, but there’s no combat mechanics in the game yet, and until I started worked on victory conditions, there was no concept of “lives” for an entity like the Hero. So I had to do a little more work, such as implementing entity lives and a command to kill an entity.
And in the end, the way I test that it all works correctly involves mapping the “K” key on the keyboard to the “kill entity” command. I’m keeping this one around because it seems like it would be useful for general testing.
Still, even without key parts implemented, Stop That Hero! has ways to end, and I was surprised at how quickly they came together considering all the moving parts I had to create. Ideally the victory and defeat conditions could be scripted objectives, but what I have is good enough for me to get to an initial, playable release.
Now, some questions for the veteran game developers. Is it ever too early in a project to have a way to end a game? Does it limit the possibilities for a game’s design too early, or is it a good way to keep a game project focused? Does it depend on how open-ended or specific the project is?