At the moment I am trying to solve the problem of placing a vector trail behind a spaceship / missile. Similar to the effect seen in Homeworld.
I have seen this done in DB before by Pincho Paxton, so I know it's technically possible, the problem now is whether my little gray matter can figure it out.
At the moment I am struggling. I have written a routine that is for the moment called once a second and stores the last 5 positions of the object I want to have a trail, the problem is that the routine seems quite slow to execute, and it is not displaying a trail.
At the moment this is just a testcode so I have repositioned the Y vertices to make a larger triangle to ensure it is visible, no luck though :/ Here is where I am at:
function newVectorTrail(id)
`Get current vector position of trail souce
trailX(id,0)=object position x(unit(id).obj)
trailY(id,0)=object position y(unit(id).obj)
trailZ(id,0)=object position z(unit(id).obj)
`Shunt Vectors Along Trail
for trail=1 to 5
trailX(id,trail)=trailX(id,trail-1)
trailY(id,trail)=trailY(id,trail-1)
trailZ(id,trail)=trailZ(id,trail-1)
next trail
`Prepare Memory for vector mesh
make memblock 1,252
write memblock dword 1,0,338
write memblock dword 1,4,36
write memblock dword 1,8,5
adr=12
`Construct each trail piece
for trail=0 to 4
write memblock float 1,adr,(trailX(id,trail)-trailX(id,0)) : adr=adr+4
write memblock float 1,adr,(trailY(id,trail)-trailY(id,0))+50 : adr=adr+4
write memblock float 1,adr,(trailZ(id,trail)-trailZ(id,0)) : adr=adr+4
write memblock float 1,adr,(trailX(id,trail+1)-trailX(id,0)) : adr=adr+4
write memblock float 1,adr,(trailY(id,trail+1)-trailY(id,0)) : adr=adr+4
write memblock float 1,adr,(trailZ(id,trail+1)-trailZ(id,0)) : adr=adr+4
write memblock float 1,adr,(trailX(id,trail)-trailX(id,0)) : adr=adr+4
write memblock float 1,adr,(trailY(id,trail)-trailY(id,0))-50 : adr=adr+4
write memblock float 1,adr,(trailZ(id,trail)-trailZ(id,0)) : adr=adr+4
next trail
`Create the trail object
if trailO(id)=0
ob=freeObject()
trailO(id)=ob
else
ob=trailO(id)
delete object ob
endIf
make mesh from memblock 1,1
make object ob,1,0
color object ob,rgb(255,255,255)
set object cull ob,0
set object light ob,0
set object ambient ob,0
delete mesh 1
delete memblock 1
position object ob,trailX(id,0),trailY(id,0),trailZ(id,0)
show object ob
endfunction
Am I even barking up the right tree on how to do this? I thought this would be a fast method, but then again, I thought Brahma was for obese gentlemen with a fetish.

God created the world in 7 days, but we're still waiting for the patch.