View Full Version : how to make trails

07-29-2014, 01:46 AM
Hi all, the title says it all, I wan't to make trails(that appear behind a ship and fade away) but don't know what to do. I've got a PixelBuffer set up, but it is running slow. If a pixel buffer is the right way to go can someone tell the best way to use one?
thanks in advance!

07-31-2014, 12:43 PM
I once played around with trails.


In this screenshot I actually used two different techniques.

The trails of the plane (the ugly looking trails) were drawn using lines. Didnt look good, got huge aliasing problems. I simply stored a list of line positions that as modified as the ship turned and moved forward.

But for the bullet trails, I simple drew sprites that were scaled in the bullet direction - so a simple sprite scale and rotate, together with a changing alpha to fade it away. This looked nice, as I got a nice anti-aliasing from the sprite itself. This was simple as the bullets only went in the same direction, but it gets more complex when you have a turning ship, but I'm pretty sure it can be solved in a similar way.

Also a short movie where you can see the effect in motion: http://esoteric.clanlib.org/~sphair/skybaron/SkyBaron-30-mar-2011.avi

07-31-2014, 04:35 PM
thanks sphair, I'll give it a try.