hmmm, i cant get the line to appear. I tried placing control camera using arrowkeys both before and after the plane move. it still works the same.
here's my revision with the control camera command added in
sp init
backdrop on
color backdrop 0
sync on
sync rate 70
Set Camera Range 1, 500
cloudsTexture = 1
load image "media\explosion.bmp",cloudsTexture
cloudSystem = sp create system (0,0,0,0)
group1 = sp add group (cloudSystem , 5000 ,0,0,0)
sp set group immortal group1,1
renderer = sp set quad renderer (group1,cloudsTexture,10,10,2,2,2)
atlas = sp add interpolator(group1 , PARAM_ATLAS_DIMENSIONS , 0,4,1)
scaleInterpolator = sp add interpolator(group1 , PARAM_SCALE , 230)
rgbaInterpolator = sp add rgba interpolator(group1,sp rgba(200,120,100,30),sp rgba(120,200,220,30),1)
Size = 1000
cloudsZone = sp box zone (0,0,0,Size,Size,Size)
sp add group particles group1,5000,cloudsZone
fog on
fog distance 150
`BoundsLeft = -150
`BoundsRight = 150
`BoundsForward = 150
`BoundsBackwards = -150
remstart
for l = 0 to sp get particles count()-1
Angle = Rnd(360)
Distance = RND(Size*2)
`XMove# = Sin(0) * Cos(Distance) * Distance
`ZMove# = Cos(0) * Cos(Distance) * Distance
X# = NewXValue(sp get particle pos x(group1,l), Angle, Distance)
Z# = NewZValue(sp get particle pos z(group1,l), Angle, Distance)
Sp position particle group1,l , X#, sp get particle pos y(group1,l), Z#
next l
remend
//start of edit========================================================================================
//add plane to background
back = find free object(1,1000)
make object plane back,1000,1000,1
color object back,rgb(20,20,20)
rotate object back, 90,0,0
//end of edit===========================================================================================
do
control camera using arrowkeys 0,1,1
set cursor 0,0
print "SPARK2 CLOUDS DEMO"
print
print "USE ARROWKEYS TO MOVE FORWARD AND BACKWARD"
PRINT "PARTICLES RENDERED : " + str$(sp get particles count())
`Control Camera Using ArrowKeys 0, 1, 1
`remstart
if upkey() = 1 Then move camera 0,0.5
if downkey() = 1 Then move camera 0,-0.5
if rightkey() = 1 Then move camera right 0,0.5
if leftkey() = 1 Then move camera left 0,0.5
`remend
`If Camera Position X() > BoundsRight Then BoundsRight = BoundRight + 150
`If Camera Position X() < BoundsLeft Then BoundsLeft = BoundLeft + 150
`If Camera Position Z() > BoundsForward Then BoundsForward = BoundsForward + 150
`If Camera Position Z() < BoundsBackwards Then BoundsBackwards = BoundsBackwards + 150
for l = 0 to sp get particles count()-1
If sp get particle pos X(group1,l) < Camera Position X() - 100
sp position particle group1,l , sp get particle pos x(group1,l) + 1000 + RND((Size - 500)), sp get particle pos y(group1,l), sp get particle pos z(group1,l)
EndIf
If sp get particle pos X(group1,l) > Camera Position X() + 100
sp position particle group1,l , sp get particle pos x(group1,l) - 1000 + RND((Size - 500)), sp get particle pos y(group1,l), sp get particle pos z(group1,l)
EndIf
If sp get particle pos Z(group1,l) < Camera Position Z() - 100
sp position particle group1,l , sp get particle pos x(group1,l), sp get particle pos y(group1,l), sp get particle pos z(group1,l) + 500 + RND((Size - 500))
EndIf
If sp get particle pos Z(group1,l) > Camera Position Z() + 100
sp position particle group1,l , sp get particle pos x(group1,l), sp get particle pos y(group1,l), sp get particle pos z(group1,l) - 500 + RND((Size - 500))
EndIf
next l
Text 0, 200, Str$(Camera Position X())
Text 0, 220, Str$(Camera Position Z())
remstart
if upkey() = 1
move camera 0,0.5
for l = 0 to sp get particles count()-1
if sp get particle pos z(group1,l) - camera position z() < 0
sp position particle group1,l , sp get particle pos x(group1,l), sp get particle pos y(group1,l), camera position z()+ (150+rnd(4500)*0.05)
endif
next l
endif
if downkey() = 1
move camera 0,-0.5
for l = 0 to sp get particles count()-1
if sp get particle pos z(group1,l) - camera position z() > 150
sp position particle group1,l , sp get particle pos x(group1,l), sp get particle pos y(group1,l), camera position z()- (rnd(4500)*0.05)
endif
next l
endif
if rightkey() = 1
move camera right 0,0.5
for l = 0 to sp get particles count()-1
if sp get particle pos x(group1,l) - camera position x() < 0
sp position particle group1,l , sp get particle pos x(group1,l) + (250 - rnd(450)), sp get particle pos y(group1,l), camera position z()
endif
next l
endif
if leftkey() = 1
move camera left 0,0.5
for l = 0 to sp get particles count()-1
if sp get particle pos x(group1,l) - camera position x() > 150
sp position particle group1,l , sp get particle pos x(group1,l) - (250 - rnd(450)), sp get particle pos y(group1,l), camera position z()
endif
next l
endif
remend
//==================================================================================================
position object back,camera position x(),camera position y(),camera position z()+150
//==================================================================================================
sync
loop
do you still get the line with this one?
The laptop im testing this on is an average hp notebook with a 1gig radeon graphics card, 2 gig ram. not crap but not great either
oh yeah, I'm compiling with dbpro v.1.0761
what version are you using?
the thing i find strange is that the plane obscures the new particles even though i am not rotating it to face the camera. which is odd.
Sometimes I like to use words out of contents