Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Codejoy

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

This topic is 5983 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 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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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[i].y-i;
}

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?

-Shane

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!