My student’s game has a scuba diver looking for treasure. In the game, the diver can increase his score as well as lose lives.
At the end of the game, a black screen appears with GAME OVER on it. The problem is that the score and the lives still show with GAME OVER.
The student wants GAME OVER to show when the game is over (duh)…BUT he doesn’t want the score or the lives to show.
Score & Lives are TEXT.
The background, scuba diver, coins, GAME OVER, etc. are all SPRITES.
Depending where you place the text in the Draw function, either the text shows all the time…or it is gone all the time.
I wondered if the following could happen:
1 - Make the background ocean scene NOT a sprite.
My student reminded me that the only backgrounds we have used are colors, not photos/drawings.
Is there a way to make it a background, not a sprite?
-
At the end of the game when the screen with GAME OVER and Score/Lives appears, could we create a new sprite with just GAME OVER on it (no score/lives) and have it appear on top of/replace the initial GAME OVER screen?
-
Or, with #2 above, could we have the GAME OVER slide appear as a background?
NOTE:
We tried to do 2 & 3 by putting the text inside the Draw function but before the Draw Sprites command. But the commands moving the sprites put them over the Score/Lives text, hiding them from view.
We tried to have two Draw routines: the first one covering 99% of the visible action, and then a second following the first - and the only role of the 2nd one was to draw the slide with only GAME OVER on it so that the game ended the way the student wanted it.
That didn’t work, so now we’re looking for ways to make it happen, if at all possible.
Thank you very much!
Gary Ellis