Smoke

Blitz3D Forums/Blitz3D Programming/Smoke

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Ok, i wrote this particle effect code and it's basicaly meant to look like smoke. It just ends up looking like a lot of grey blobs that don't look anything like smoke...
I'm using a grey blurry sprite as the main_particle. Does anyone have any ideas anout how I could make this a bit more realistic.

Here's the code:
Function createparticle(player)

	p.particle=New particle
	p\entity=CopyEntity(main_particle)
	p\x=EntityX(player)
	p\y=EntityY(player)-1
	p\z=EntityZ(player)-1
	p\time=Rand(1400,2200)
	p\timer=MilliSecs()
	PositionEntity p\entity,p\x,p\y,p\z
	p\speed=-3
	p\alpha=1
	
End Function 

Function updateparticles()
         
        Local random=Rnd(-0.5,0.5)
	For p.particle= Each particle
	p\alpha=p\alpha-0.1
	EntityAlpha p\entity,p\alpha
        MoveEntity p\ent,random,random,random
	If MilliSecs()>p\time+p\timer Then
	FreeEntity p\entity
	Delete p.particle
	EndIf
    Next

End Function