Thanks a bunch! I'll go about making the changes just as soon as I fill the cat's water bowl up
(EDIT)
That's... really... REALLY strange... It's actually losing the quad when run. The screenquad object exists just before the do loop, but once the do loop exists, the screenquad no longer exists, causing the program to exist... what the heck?
(EDIT AGAIN)
It seems to be deleting the screenquad object *after* the first frame runs... or perhaps during it, but after the last line requiring it to be around has been run...
(YET ANOTHER EDIT)
Ok, the screenquad is getting deleted where i've noted here in the game loop
show object screenquad
hide object 1
hide object 2
sync mask %01
`screenquad still exists here
sync
`screenquad no longer exists here
loop
there's only one conclusion... it's getting deleted during the sync command... I'm going to try fastsync since it skips over a bunch of "mandantory" stuff.
(LAST EDIT)
fastsync isn't preventing it from being deleted either... This is definitely a major bug... why would sync delete an object?
Here's my entire gameloop and the other functions i've changed as per your recommendations
function gameloop()
do
`framecounter = framecounter + 1
`msgbox("Frame Counter", str$(framecounter), 0)
position camera 1, camera position x(0), camera position y(0), camera position z(0)
rotate camera 1, camera angle x(0), camera angle y(0), camera angle z(0)
hide object screenquad
show object 1
show object 2
sync camera 1
`primitive powersliding
phy set vehicle lateral tire force function 2, 0, 0.5, 2.0, 4.0, 1.0, 200.0 - ((mom) * .002)
phy set vehicle lateral tire force function 2, 1, 0.5, 2.0, 4.0, 1.0, 200.0 - ((mom) * .002)
phy set vehicle lateral tire force function 2, 2, 0.5, 2.0, 4.0, 1.0, 200.0 - ((mom) * .002)
phy set vehicle lateral tire force function 2, 3, 0.5, 2.0, 4.0, 1.0, 200.0 - ((mom) * .002)
inc camang, mousemovex() * .15
inc camdist, mousemovez() * -.005
rotcam(camang, camdist, 2)
rem Control buggy
phy set vehicle motor force 2,0.0
`gosub driveCar
driveCar()
information()
`
rem Prompt
center text screen width()/2,30,"MOUSE TO MOVE CAMERA, ARROWKEYS TO DRIVE, SPACE TO BRAKE"
`
rem Update physics and screen
update terrain
phy update
` final screen update
show object screenquad
hide object 1
hide object 2
sync mask %01
` next few lines ensure the screen quad is in front of the camera
` there is probably a more elegant way of doing this
move camera 1
position object screenquad, camera position x(), camera position y(), camera position z()
move camera -1
sync
loop
endfunction
function setup_display()
set display mode 1024, 768, 32
sync on
sync rate 60
reload display pointer ` this line is essential
backdrop on
autocam off
set camera range 0.5, 30000
` position the camera
hide mouse
color backdrop rgb(175,200,255)
fog on
fog color 175, 200, 255
fog distance 1000
endfunction
function setup_fullscreen_shader()
make camera 1
load camera effect "bloom.fx", fsshader, 0
set camera effect 1, fsshader, fsshaderimg ` changed for consistency
make object plain screenquad, 2, 2, 1
load effect "quad.fx", fsshader, 0
set object effect screenquad, fsshader
null = make vector4(1)
set vector4 1, 1.0/1024, 1.0/768, 0, 0 ` needs changing
set effect constant vector fsshader, "InvViewSize", 1 ` needs changing
null = delete vector4(1)
texture object screenquad, 0, fsshaderimg
endfunction
Nothing I say is intended to be rude. My autism means that I do not know what is rude and what isn't rude. I apologize if I seem rude. It is not my intention.