Results 1 to 3 of 3

Thread: how to make trails

  1. #1

    Default how to make trails

    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!

  2. #2
    ClanLib Developer
    Join Date
    Sep 2006
    Bergen, Norway


    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:

  3. #3


    thanks sphair, I'll give it a try.

Similar Threads

  1. Replies: 0
    Last Post: 01-14-2014, 05:50 AM
  2. Replies: 0
    Last Post: 05-18-2013, 05:42 AM



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts