Nother 2d fx question, trail like the disc from tribes...

Started by
2 comments, last by Codejoy 21 years, 10 months ago
I think I got confused on my last post with the blur question, the effect I really want is a trailing effect like the Disc when you shoot it from that gun in tribes 1 or 2. How can this be achieved in 2d? or was i correct, its a transparent blur effect? Is there any easy way to achieve this effect with my sprite of a disc? or I have to create more sprites? or I have to use some particle engine?? Thanks agian, Shane
Advertisement
in tribes, its simple trail of alpha blendend polygons. no blurring is done. in 2d, you would just draw a trail of 2d alpha blended sprites.
K makes sense, but now this may be a stupid question, but how do u draw a trail if my seen is rebuilt everytime...I mean sure my disc.x and disc.y
then do i draw my trail in say a for loops of other discs?

for(blah)
{
tdisc.x-i;
tdisc.y-i;<br>}<br><br>I guess i have to say which direction the disk is going to know wwhen to subtract from x, y or both…is this looking right?<br><br>-Shane<br> </i>
Sounds like a windows MouseTrails type problem.
I think the way most past trail type effects work is to keep a list of the past positions / states.

  struct TrailNode{ int OldXpos,OldYpos;};struct Character{: ( other data )int xpos,ypos;TrailNode trails[TRAILLENGTH];: ( other data )};  


When you update your character position, delete the last TrailNode and add the current position to trails before moving the character.

This topic is closed to new replies.

Advertisement