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 2How Your First Program Works

How Programs Are Structured 19Method Main () 21Using Sprites to Display Graphics for Games 22Coordinate System 24Media Files 27Exercise: Understanding Locations on the Screen 29

How Programs Are Structured

In Section 1, you typed in and ran your first program—way to go! From now on, our job with this short cut is to explain it all to you so that you understand how and why your program works the way it does, and how you can start creating your own programs. Of course, by the end of this short cut, you will have created a complete game of your own, not just the simple example shown in Figure 2.1.

Figure 2.1 Your first Phrogram program

Let's note a few key things about how the instructions (or code) are presented ...

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