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

Setting Up the Game Elements

Now we’ll create the game loop for the program using the same code we’ve used throughout the book. Add the code below:

; Creating a light
      light=CreateLight()
; The following code makes our program run
While Not KeyDown(ESC_KEY)
Renderworld
Flip
Wend
End

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