Archived

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

_KILLOCAN_

READ PLEASE.

Recommended Posts

I already posted two topics, here they put I didn''t obtain answer, it would like a lot that somebody helps me her in the one that I am planning do. Mine doubts and as the code of a similar special effect the one of Castlevania Symphoni of the night, that that leaves a trace behind Alucard when he moves. If possible to explain to me or to indicate me where to find that. Thank you Killocan.

Share this post


Link to post
Share on other sites
You posted a topic on a saturday, and you expect an answer less than an hour later? Aren't we demanding?

To answer your question, just keep a list of former coordinates and unpdate it at a fixed time (say every .25 seconds) and draw the after images there (maybe fading them out).
  
vector2 image [NUMBEROFIMAGES];

if ((elpased_time > image_time)
{
elapsed_time = 0;
//every image becomes the one before it

for (j=1; j < NUMBEROFIMAGES; j++)
image [j] = image [j-1];
//image zero goes to player position

image[0] = currentPlayerPosition;
}
//don't draw image [0] because that is where the player is now

for (j=1; j < NUMBEROFIMAGES; j++)
drawImage (image [j].x, image [j].y);
drawPlayer (currentPlayerPosition.x, currentPlayerPosition.y);

Its a little more complicated than that, since you need to store which frame of the animation to show, and adjust for when the player is not moving, but you should get the idea.



Edited by - invective on November 10, 2001 2:52:51 PM

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I never played CastleVania SOTN but do you mean the blury fading effect that appeares on photo when you move really fast? That''s called "motion blur" just do a search on www.google.com. Or better try this link: http://freespace.virgin.net/hugo.elias/graphics/x_motion.htm there is a demo too.
Hope this helps.

Share this post


Link to post
Share on other sites