Here is my code:
Rem ***** Included Source File *****
Set Display Mode 1024, 768, 32
Set Window On
Sync On
Sync Rate 0
Color Backdrop RGB(0,0,0)
Backdrop On
Set Camera Range 0.05,30000
Set Window Title "My Game Engine"
Hide Mouse
` Load the world object (dbo file)
Load Object "map.dbo", 1
Set Object Transparency 1,1
` Position the object
Position Object 1,0,0,0
` Position the camera
Position Camera 0,30,0
Do
Text 10,10,"FPS: " + str$(screen fps())
Text 10,30,"Polygons: " + str$(statistic(1))
gosub GetUserInput
sync
loop
end
` Routine to handle user mouse and key movement
GetUserInput:
rotate camera camera angle x()+(mousemovey()/2),camera angle y()+(mousemovex()/2),0
if camera angle x()>90 then xrotate camera 90
if camera angle x()<-90 then xrotate camera -90
cx#=camera angle x() : cy#=camera angle y() : cz#=camera angle z()
if upkey()=1
move camera 10
endif
if downkey()=1
move camera -10
endif
if rightkey()=1
xrotate camera 0: yrotate camera cy# + 90: move camera 10: xrotate camera cx#: yrotate camera cy#
endif
if leftkey()=1
xrotate camera 0: yrotate camera cy# - 90: move camera 10: xrotate camera cx#: yrotate camera cy#
endif
return
When I compile this, I get Runtime error 105, which says that the object at line 13 (my .dbo file) is there. So what's up?
Bye