3D Walkthroughs (arounds)

Blitz3D Forums/Blitz3D Beginners Area/3D Walkthroughs (arounds)

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.

I've been using Blitz2D for some time, but had questions about a possible use for Blitz3D. I'm using SketchUp for modeling and wanted to know about how to create walkthroughs using Blitz3D. SketchUp will output to OBJ or 3DS. I'm assuming I would want to pull those files into Giles and create a B3D file for Blitz3D. But what programming on Blitz3D is required to create a simple walkthrough (e.g. no weapons, etc.)

Thanks!

David William Edwards

Not much really. Just a bit of collision code and FP controls.

http://www.blitzbasic.com/codearcs/codearcs.php?code=559

Another FPS example. (click on the link under Code Samples on the left)

a very few lines compared to eg C++. From the top of my head:

graphics3d 800,600,32,2
setbuffer backbuffer()

player=createpivot()
camera=createcamera(player)
translateentity camera,0,1.8,0
entitytype player,1
entityradius player,0.25,0.9
translateentity player,0,10,0 ; make sure to be above he ground

land=loadmesh("land.3ds")
entitytype land,2

light=createlight()
rotateentity light,45,45,45

collisions 1,2,2,2
shoe#=1.0
while keydown(1)=0
 mxs#=-mousexspeed()/4.0
 mys#=mouseyspeed()/4.0
 movemouse graphicswidth()/2,graphicsheight()/2
 if keydown(200)=1 then moveentity player,0,0,shoe# 
 if keydown(208)=1 then moveentity player,0,0,-shoe# 
 turnentity player,0,mxs,0
 turnentity camera,mys,0,0
 translateentity player,0,-.1,0 ; gravity
 updateworld()
 renderworld()
 flip
wend


I hope there ain't too much typos. currently I cannot test it since this web-terminal has no 3D.