O'Reilly logo

Learn to Program with Phrogram™!: A Guide to Learning Through Game Programming Using the Latest Version of Kids Programming Language by David Witus, Walt Morrison, Jon Schwartz

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

Section 7UFO Escape! Your First Complete Game!

Displaying Game Instructions to a Player 81Keeping Score and Displaying It to the Players 82Method Main() for Our Game 84Setting Up the Game Screen 86Starting the UFO Each Game Round 86Move the UFO and Check for Scoring 88Making Your UFO Bounce Off the Paddle 90Game Over! 94

OK, ready for the big time now? You're about to run your own complete game! The program is getting large now—it has more than 140 instructions!—so, remember that if you don't want to type all of these instructions into Phrogram, you can visit the Phrogram Web site and download the example from there.

Before we show you the code, Figure 7.1 is a screenshot of what the game looks like when it is running. This is a two-player game! ...

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