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

Gallery Items

The gallery items that will serve as targets for our game will be made up of seven different animals. There will be five copies of each animal for a total of 35 animals. For each animal, we’ll create an array of five of the animals and position them, scale them, and color them. Each of the animals will be a .3ds file that we will load. Let’s start by creating the ducks, and then we’ll create the other animals. Add the following code:

EntityTexture terrain,tex
EntityType terrain, type_scenery
;Creating the gallery items

Dim ducks(5)

For x = 1 To 5
ducks(x)= LoadMesh ("duck.3ds")
PositionEntity ducks(x), x*15,0,90
EntityColor ducks(x), 255,255,0
ScaleEntity ducks(x), 0.2,0.2,0.2
Next

Run the program now, and with any luck you should ...

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