home *** CD-ROM | disk | FTP | other *** search
- ;demo09-01.bb - Beginning a terrain
- ; ------------------
- Graphics3D 640,480
- SetBuffer BackBuffer()
-
- Const ESC_KEY = 1
- Const LEFT_KEY = 203
- Const RIGHT_KEY = 205
- Const UP_KEY = 200
- Const DOWN_KEY = 208
-
- ; Create camera
- camera=CreateCamera()
- PositionEntity camera,0,1,0
-
- ; Create a light
- light=CreateLight()
-
- ; Create the terrain
- ground=CreateTerrain(512)
-
-
- ; This following code deals with cameras and terrain
- While Not KeyDown(ESC_KEY)
-
- If KeyDown(RIGHT_KEY)=True Then TurnEntity camera,0,-1,0
- If KeyDown(LEFT_KEY)=True Then TurnEntity camera,0,1,0
- If KeyDown(DOWN_KEY)=True Then MoveEntity camera,0,0,-0.05
- If KeyDown(UP_KEY)=True Then MoveEntity camera,0,0,0.05
-
- RenderWorld
- Flip
- Wend
- End