O'Reilly logo

3D Game Programming for Teens, Second Edition by Eric Grebler, Maneesh Sethi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Pausing

Imagine that you are in the middle of playing the game of your life. Everything is coming together, all cylinders are firing, and the high score is in sight. Just then the telephone rings, the dog starts barking, the doorbell goes off, your mother starts yelling, and nature calls. You don’t want to ruin your chances at getting that high score, but what do you do? Easy: You pause the game. Thankfully, programming a pause into your game is easy because Blitz3D has a command that will pause all the action in your game until you press a key. The command for pausing is WaitKey(), which will pause the game until any key is pressed. Let’s incorporate it into a game. Open the file called demo13-10.bb, which contains several spheres flying around ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required