My game more or less works now. I added an additional enemy type, a “hill” that the player can crash into. I also added a quick HUD that shows a score which increments as the game progresses. None of the things I’m showing right now look nice. The hill is just placeholdered with the “capsule” in Unity and looks pretty weird, like an old Mario World hill in silhouette. The HUD is just black text. And my startup and end screen that I’m about to show are even worse… but the time for makepretties will be later; now I just want to get things working.
The code I wrote just does a “break” when the player dies. This obviously won’t work, so I need to add some additional scenes to my project.
I have two additional scenes: Splash, and GameOver. Splash will be the scene the player sees when the game first loads up. GameOver is after the player dies.
To make sure my game sees these scenes, I have to to go File-> Build Settings, and add each new scene to the build with the Add Current button. I should see a list of three scenes.
Notice I am working in Windows Phone mode right now. So here’s this very ugly loading screen…
Ha ha, I’m sorry, I still don’t even have a proper title for the game. But this is just a single sprite, so later, when I have a very pretty loading screen, all I will do is replace this placeholder with my pretty screen and we’ll be good to go! A small script advances the scene. I add this script to the sprite and set “scene” to be SunScene (the primary scene for the game). Then when the screen is clicked, the scene loads and the game starts. The updated script to kill the player uses Application.LoadLevel to load up the game over screen, and the game over screen also uses a click to return to the home screen.
Stuff to do: make prettier splash screens, make a prettier score HUD and keep track of the player’s score, maybe with leaderboards? Playtest and work on feel and hitboxes, then add some Windows Phone features and publish. When HUD and score tracking are complete I’ll upload a couple web builds. Maybe you can test for me?