home *** CD-ROM | disk | FTP | other *** search
- ;demo13-08.bb - Weapon
- ;_______________
-
- Graphics3D 640,480
- SetBuffer BackBuffer()
-
- Const ESC_KEY = 1
- Const UP_KEY = 200
- Const DOWN_KEY = 208
- Const LEFT_KEY = 203
- Const RIGHT_KEY = 205
-
- ; Create camera
- camera=CreateCamera()
- PositionEntity camera, 50,1,50
- TurnEntity camera, 0,50,0
-
- ; Creating a light
-
- light=CreateLight()
-
- ; Creating the terrain
- ground=CreateTerrain(512)
- PositionEntity ground, -500,0,-500
- ScaleEntity ground, 10,15,10
- tex=LoadTexture( "grass1.jpg" )
- EntityTexture ground, tex
-
- ;Creating the sky
-
- sky = CreateSphere (60)
- FlipMesh sky
- ScaleEntity sky, 500,500,500
- PositionEntity sky, 0,50,0
- sky_tex = LoadTexture ( "sky.jpg" )
- EntityTexture sky,sky_tex
-
-
- ; This following code makes our program run
-
- 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