Tank Simulator

Blitz3D Forums/Blitz3D Programming/Tank Simulator

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

By "back," I meant that I could see the back of the tank, kind of like the games Uru, Gundam Crossfire, and the such where you see the back of the machine. So here's the updated code:
;The Binary Labyrinth
;By Minkee
Global gfxPlayer
Global gfxAlert
;Set the graphics mode
Graphics3D 640,480
SetBuffer BackBuffer()
;Load An Image
gfxPlayer=LoadImage ("invader.bmp")
;Load Another image
gfxAlert=LoadImage ("alert.bmp")
;Set global on font variables
Global fntArial
;Load fonts to a file handle variables
fntArial=LoadFont ("OCR A Extended",36,False,False,False)
;Set the font and print text
SetFont fntArial
;Okay...
Print "The Forbidden"
fntComic=LoadFont ("Arial",15,False,False,False)
;Set font
SetFont fntComic
;Subtitles
Print "The Forbidden: As the last defender of Britain, you must fight the opposing forces and win the war!"
Print "Press the arrow keys To move forward, backwards, Left, And Right and press the spacebar to fire."
Print "Questions? Comments? Constructive criticism? Feel free to contact me at minkee.s@..."
Print "Code  written by Minkee S"
Print "A GLITCH CITY GAMES CO. PRODUCTION"
;This draws the images
DrawImage gfxPlayer, 500,0,0
DrawImage gfxAlert, 300,300,0
WaitKey 
;Create a camera
camera=CreateCamera()
PositionEntity camera,0,0,-50 
;Create a light
light=CreateLight()
;Assign the types
type_player=1
type_ground=2
;Global some sound
Global Music
Music=LoadSound("Dreamland.mp3")
PlaySound Music
;Create some terrain
tex=LoadTexture ("texture.jpg")
ScaleTexture tex,.5,.5
ground=LoadTerrain("spikey.jpg")
ScaleEntity ground,5,100,5
EntityTexture ground, tex
EntityType ground, type_ground
;Load the tank
tadpole=LoadMesh( "btadpole.3ds" )
tex2=LoadTexture( "spheremap.bmp",64+1 )
PositionEntity tadpole, 0,1,5
EntityTexture tadpole,tex2
EntityFX tadpole,10
ScaleEntity tadpole, 0.1,0.1,0.1
PositionEntity tadpole,-20,50,40
EntityType tadpole, type_player
Collisions type_player,type_ground,2,2
Collisions type_ground,type_player,2,2
;Make the program run
While Not KeyHit(1)
;Movement
If KeyDown (208) TranslateEntity tadpole, 0,0,-0.3
If KeyDown (200) TranslateEntity tadpole, 0,0,0.3
If KeyDown (205) TranslateEntity tadpole, 0.3,0,0
If KeyDown (203) TranslateEntity tadpole, -0.3,0,0


	UpdateWorld
	RenderWorld
	Flip
Wend
End