load object "Police Car\H-Police Car-Move.x",2
scale object 2,100,100,100
set object cull 2,0
set object light 2,0
set object texture 2,2,1
position object 2,512,1,512
rem Position camera in center of terrain
position camera 512,10,512
This police car model is from 'Dark Matter'
It comes in a file with a dds document included. So, I put it in my media folder and loaded it with my hand-typed db-pro language.
Here are the files that are in the folder that I imported from Dark Matter:
H-Police Car-Move..... (x file)
L-Police Car-Move......(x file)
PoliceCa.......... (dds document)
I also tried using the 'Beach Bug' car from 'Dark Matter' and the same thing happened with that too... just a pitch-black shape appeared on in my game... just a cut-out shape like someone took a pair of sizors and cut part of the terrain out, leaving a black shape of a car only.
So, anyone know what could be the problem?
Here's the full project...
rem Terrain Functionality
rem Standard Setup Code for all examples
sync on : sync rate 0 : color backdrop 0
set text font "arial" : set text size 16
set text to bold : set text transparent
rem Make Simple Terrain
TerrainNumber=1
make terrain TerrainNumber,"land1.bmp"
rem Position The Terrain
position terrain TerrainNumber, 0, 0, 1025
rem Texture terrain
ImageNumber=1
load image "grass.bmp",ImageNumber
texture terrain TerrainNumber,ImageNumber
size#=1025
rem Load sky object
load object "sky\sb.x",1
scale object 1,40,40,40
set object cull 1,0
set object light 1,0
set object texture 1,2,1
rem Load car object
`load object "Beach Bug\H-Beach Bug-Move.x",2
load object "Police Car\H-Police Car-Move.x",2
scale object 2,100,100,100
set object cull 2,0
set object light 2,0
set object texture 2,2,1
position object 2,512,1,512
rem Position camera in center of terrain
position camera 512,10,512
rem Main loop
desc$="LOD Terrain from Bitmap"
Forward# = .5
fastsync
while scancode()=0
rem Control camera over terrain
if mouseclick() = 4 `middle
Forward# = 2
else Forward# = .5
endif
if mousex() < 412 then y#=y#-1 `TURN CAMERA LEFT 0, .5
if mousex() > 612 then y#=y#+1 `TURN CAMERA RIGHT 0, .5
yrotate camera 0,y#
if mousey() < 484 then move camera 0, Forward#
if mousey() > 584 then move camera 0, - .3
cx#=camera position x(0)
cz#=camera position z(0)
if cx#<0.0 then cx#=0
if cx#>size# then cx#=size#
if cz#<0.0 then cz#=0
if cz#>size# then cz#=size#
position camera cx#,get terrain height(TerrainNumber,cx#,cz#)+5,cz#
`(POSITION CAMERA X, Y, Z)
rem Terrain Data
set cursor 0,0
print "TERRAIN DATA"
print " exist:",terrain exist(TerrainNumber)
if terrain exist(TerrainNumber)=1
print " x:",terrain position x(TerrainNumber)
print " y:",terrain position y(TerrainNumber)
print " z:",terrain position z(TerrainNumber)
print " height:",get terrain height(TerrainNumber, cx#, cz#)
print " totalheight:",get total terrain height(TerrainNumber)
endif
print
print "CAMERA DATA"
print " x:",camera position x(0)
print " y:",camera position y(0)
print " z:",camera position z(0)
print "angle x:",camera angle x(0)
print "angle y:",camera angle y(0)
print "angle z:",camera angle z(0)
rem Position sky at player
position object 1,camera position x(0),camera position y(0)-150,camera position z(0)
rem Show Framerate
text 20,screen height()-40,desc$
fps$="DBPro Fps: "+str$(screen fps())
text screen width()-20-text width(fps$),screen height()-40,fps$
rem Update screen
sync
rem End loop
endwhile
rem Delete Terrain
delete terrain TerrainNumber
.