Hi Cellulo-
One thing to try is go back to Darkbasic 1.073, 1.072 or earlier and see when it happens. Perhaps there is something funky with the "Backdrop" since that area of DBPro has been touched by the devs recently. Although I would think it would affect us all.
You can also try to "repair" your installation of DBpro and see if that helps but I forget how to do that.
Here is a stripped down version of Demo02 (no newton). Let me know if it flickers for you.
sync on
sync rate 60
autocam off
set ambient light 100
set point light 0, 50, 100, -50
set light range 0, 5000
randomize timer()
load image "..\media\floor.png",1
position camera 0.0, 5.0, -20.0
dim GOSTR$(2)
GOSTR$(1) = "SIMULATION PAUSED"
GOSTR$(2) = "SIMULATION RUNNING"
gosub MakePickObjects
TOP:
gosub MakeFloor
GO = 1
wait 100
do
if lower$(inkey$()) = "q" then exit
if lower$(inkey$()) = "r"
goto TOP
endif
if spacekey() and SPACEPRESSED = 0 then SPACEPRESSED = 1
if SPACEPRESSED = 1
SPACEPRESSED = 2
inc GO, 1
if GO > 1 then GO = 0
endif
if spacekey()=0 then SPACEPRESSED = 0
gosub DrawOnscreenData
gosub HandleCamera
sync
loop
end
MakeFloor:
FloorObj = FreeObject()
load object "..\media\box.x", FloorObj
position object FloorObj, 0.0, -20.0, 0.0
scale object FloorObj, (1000.0*100.0), (10.0*100.0), (1000.0*100.0)
scale object texture FloorObj, 10.0, 10.0
texture object FloorObj, 1
return
`this subroutine makes the simple in-screen display, which explains how to use the demo.
DrawOnscreenData:
box 5,5,615,112,rgb(0,0,0),rgb(100,100,100),rgb(0,0,0),rgb(100,100,100)
line 5,5,615,5
line 5,5,5,112
line 615,5,615,112
line 5,112,615,112
text 10,10,"Newton Game Dynamics Wrapper version:"
text 10,20,"COLLISION PRIMITIVES TEST"
text 10,40," [B]ox || [S]phere || [C]ylinder || ca[P]sule || co[N]e || convex [H]ull"
text 10,50," Hold CTRL for debug data || Drag RMB to move bodies"
text 10,60," Drag Mouse to look || Arrows to move camera || Space to (un)pause"
text 10,70," Press "r" to reset || press "q" to quit"
text 10,80," FPS:"+str$(screen fps())
text 15,95,GOSTR$(GO+1)
return
` FUNCTIONS ---------------------------------
function FreeObject()
repeat
inc i
if object exist(i)=0 then found=1
until found
endfunction i
function GetColor()
repeat
r = rnd(1)*255
g = rnd(1)*255
b = rnd(1)*255
until r<>0 or g<>0 or b<> 0
color = rgb(r,g,b)
endfunction color
` This subroutine handles moving/rotating the camera. should be pretty straightforward.
HandleCamera:
`-------------------------
`CAMERA
`-------------------------
if upkey() then move camera 1.0
if downkey() then move camera -1.0
if leftkey()
turn camera left 90.0
move camera 1.0
turn camera right 90.0
endif
if rightkey()
turn camera right 90.0
move camera 1.0
turn camera left 90.0
endif
if mouseclick()=1 and MOUSE = 0
MOUSE = 1
dump = mousemovex()
dump = mousemovey()
endif
if mouseclick()=1 and MOUSE = 1
inc CamAngleX#, mousemovey()
inc CamAngleY#, mousemovex()
rotate camera CamAngleX#, CamAngleY#, 0.0
endif
return
MakePickObjects:
`PickObjects
PickObj1 = FreeObject()
make object sphere PickObj1, 0.5
set object emissive PickObj1, rgb(255,255,0)
set object ambience PickObj1, 100
hide object PickObj1
PickObj2 = FreeObject()
make object sphere PickObj2, 0.5
set object emissive PickObj2, rgb(255,0,255)
set object ambience PickObj2, 100
hide object PickObj2
return
function NeverCalled()
if memblock exist(1) then delete memblock 1
endfunction
I'm not a real programmer but I play one with DBPro!