Jump to content
  • Advertisement
Sign in to follow this  
tiby312

Drawing effecient Trail

This topic is 2537 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to draw a trail behind a spaceship efficiently.

Right now, every few steps, I push the position of the ship into a list, and (once the list has reached the desired size) pop the oldest one. I then draw a bunch of lines connecting these points in the list.

If I leave it just like this, the beginning and end of the trail will look very jumpy because points are not added every step, but every few steps. To fix this, at the end closest to the ship, I drew another line from the first point in the list to the actual position of the ship (which is updated every step). This works great. The problem is the other end.

My question is how can I make the trail smoothly fade off into the distance at the other end?

Share this post


Link to post
Share on other sites
Advertisement
You can either draw your own line (picture) as a sprite, so transformations will be available. (if you hard code, Bit-Lock Transfer)
Or you can set the color of each lines.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!