thanks, ruc. as stated, i've poured through a lot of the forums going back to a few weeks before purchasing (it's what helped me decide TO purchase it), and took mental notes on the dynamics here. add to that the fact that i'm 36 yo and, well, i like to play games, yes! "FPS", "RTS", "MMORPGS"... but, not
those kinds of games. aka, "EGO" or "ID"
then again, my age prolly has nothing to do with it; i know plenty of people my age who don't adhere to the 'mature' stereotype...
here's the (ugly) code:
set display mode 1024,768,32
sync on : sync rate 60
set ambient light 0
color backdrop rgb(0,0,0)
load image "C:\program files\the game creators\dark basic professional\projects\terrain1\grass1.bmp",200,0
load image "C:\program files\the game creators\dark basic professional\projects\terrain1\ground.bmp",201,0
ink rgb(255,255,255),rgb(0,0,0)
set cursor 0,0
print "images loaded..."
sync
rem load sounds
load sound "C:\program files\the game creators\dark basic professional\projects\terrain1\time box loop 1.wav",100
set sound volume 100,80
load sound "C:\program files\the game creators\dark basic professional\projects\terrain1\Space Gen loop 1.wav",101
set sound volume 101,85
load sound "C:\program files\the game creators\dark basic professional\projects\terrain1\Space Gen loop 3.wav",102
set sound volume 102,85
load sound "C:\program files\the game creators\dark basic professional\projects\terrain1\blaster.wav",103
load sound "C:\program files\the game creators\dark basic professional\projects\terrain1\teleport.wav",104
set cursor 0,0
print "sounds loaded..."
sync
for x= 1 to 3
tx = 5120*x-5120
make terrain x, "C:\program files\the game creators\dark basic professional\projects\terrain1\testterrain3.png"
if x = 2 then texture terrain x,200 else texture terrain x,201
position terrain x,tx,0,0
color = rgb((85*x),0,0)
ink rgb(255,255,255),color
set cursor 0,0
print "completed terrain # ",x," ..."
sync
next x
for x = 1 to 100
make object box x,x*2,x*5,x*3
obcol = rgb(rnd(255),rnd(255),rnd(255))
`rem color object x,obcol
oby = (object size y(x)/2)
position object x,rnd(15000),oby,(rnd(15000)*-1)
`rem make texture
ink obcol,rgb(0,0,0)
line 0,0,49,0
line 0,1,49,1
line 0,0,0,49
line 1,0,1,49
line 48,0,48,48
line 49,0,49,49
line 0,48,49,48
line 0,49,49,49
box 10,10,15,15
box 22,10,27,15
box 36,10,41,15
box 10,30,15,35
box 22,30,27,35
box 36,30,41,35
get image x,0,0,49,49,1
texture object x,x
set object emissive x,obcol
set cursor 0,0
print "object ",x, " handled..."
sync
next x
position camera 0,0,120,0
make light 1
hide light 0
set light range 1,1000
make object cylinder 501,1
color object 501,rgb(255,0,0)
set object emissive 501,rgb(255,0,0)
sync
flag1 = 0 : flag2 = 0
tankmoving = 0
loop sound 100
do
cpx = camera position x(0)
cpy = camera position y(0)
cpz = camera position z(0)
camangley = camera angle y(0)
position light 1,cpx,cpy,cpz
if spacekey() then position camera 0,0,120,0 : flag1 = 0 :flag2 = 0 : play sound 104
speed = 1.0
if shiftkey() then speed = 10.0
if controlkey() then speed = 30.0
control camera using arrowkeys 0,1.0*speed,0.1*speed
if speed = 1.0 then loop sound 101
if speed > 1.0 then loop sound 102
rem position terrains
if cpx > 10240 and flag1 = 0 then position terrain 1,15360,0,0 : flag1 = 1
if cpx > 15360 and flag2 = 0 then position terrain 2,20480,0,0 : flag2 = 1
if cpx < 10240 and flag1 = 1 then position terrain 1,5120,0,0 : flag1 = 0
if cpx < 15360 and flag2 = 1 then position terrain 2,10240,0,0 : flag2 = 0
if returnkey() = 1
shotoriginx = cpx
shotoriginy = cpy
shotoriginz = cpz
position object 501,cpx,cpy,cpz:
show object 501
rotate object 501,0,camangley,0:
play sound 103
endif
move object 501,40.0
rem some info to screen
set cursor 0,0
print "FPS: ",screen fps()
print "CAM: ",cpx,", ",cpy,", ",cpz
print "Flag1= ",flag1,", Flag2= ",flag2
sync
loop
it's not pretty, but it's {mostly) working. the flagging system to re-position the terrains is faulty (works fine as X coord increases, but not when i go back toward the 'home' position, but i can figure that out), but it's a step in the right direction. and, my 'building' placement isn't working correctly, but it's an effective way to realize the speed i'm moving at since the objects are emissive.
on initial 1) since i'm using a light range of 1000, i can definitely decrease the sizes of my terrains (prolly 1024x1024) since i can't see beyond that anyway, thus reducing the long 'creation' time required as the program starts. i've yet to implement this, but plan to. now, since i'll be doing this, i'm thinking of setting the tiles up so the nearest edge of the NEXT/APPROACHING tile/terrain matches height-wise with the farthest edge of the current tile, thus allowing additional 'height' (double for each consecutive tile). Q: am i correct in assuming that when i add gravity, and stagger the tiles on the Y axis as mentioned to get more 'depth', collision, etc, will be relative to each terrain/tile whichever one i'm currently occupying?
on 2) i'm thinking that since i open this project some dozen+ times a day since starting it, fiddling with it when i can or some bright idea pops in my head, i inadvertantly 'cleaned up' something in the code that produced the increase/efficiency in the FPS. that's probable, unless you see something in the code that's unstable.
thanks for any replies.
My Modest System:
Athlon XP1800+, Windows XP+SP2, Soyo K7V Dragon+ MB, 1.5Gb 333 RAM, ATI Radeon 8700LT (128Mb), Drivers and Updates Kept Current