Fading Footsteps?

Started by R4L, Thu 21/09/2006 20:34:29

Previous topic - Next topic

R4L

I know how to make footprints in snow and stuff, but what I want to know is if it is possible to fade the footprints, sort of like that one scene in The Matrix Revolutions, where Neo is walking and he can see like the matrix and it shows his feet, and everytime he steps, an aura kinda ripples from his foot, and fades away. Im sorry if I couldn't explain it any better, but I don't know how else to explain it.

monkey0506

Perhaps you could use RawDrawImageTransparent? I've not used the RawDraw functions much myself...but I think that maybe that could help...?

Pumaman

You could also use some dummy objects/characters as the footsteps, and gradually change their Transparency to fade them out; the best way of doing it depends on how many footsteps you'd want on-screen at a time.

R4L

Well its only for a graphical effect, and isn't really used to much, but I don't know if characters would work. The room I have is pretty big. Would there be a way to gradually increase RawDrawImageTransparent?

Meystari F

QuoteI know how to make footprints in snow and stuff


You do. How is is done?

R4L

Using RawDraw functions. You draw a line of a color at player.x and player.y.

Meystari F


GarageGothic

Quote from: R4L on Sat 23/09/2006 16:41:56Well its only for a graphical effect, and isn't really used to much, but I don't know if characters would work. The room I have is pretty big. Would there be a way to gradually increase RawDrawImageTransparent?

I take this to mean that you want footprints to fade with time to avoid the screen filling up with footprints? After considering this a bit, I came up with a simple solution to this: Simply RawDraw the original background frame transparently on top of the manipulated background at intervals of maybe a seconds.
When the player enters the room, create a DynamicSprite of the background frame. Then, in the repeatedly execute, have a timer that RawDrawImageTransparent's this frame every 40 loops, at a transparency of 80 or maybe 90. Anything else RawDrawn on the screen (the footprints) will slowly fade away.
The only drawbacks I see in this is a possibility of a slight framerate hit, depending on your resolution, but it shouldn't be an issue on modern computers, and savegames made in this room will be somewhat larger due to containing the DynamicSprite as well.

R4L

Well my game's resolution is 320x200 so that shouldn't be a problem right?

That seems like a good idea. I got to thinking and said, maybe I could use another character.

Using FOLLOW_EXACTLY couldn't I just make a blank sprite with 2 footprints and use his walking loop to animate the fading footprints?

GarageGothic

If you use a follow character, wouldn't the footprints slide along with the character rather than be left behind on the ground? I think that RawDraw is much better idea, since it also doesn't need any kind of management of the footprint or demand any resources once drawn. In fact every single character in the game could leave footprints if needed.

With 320x200 resolution my idea for gradually fading them shouldn't be a problem on pretty much any machine.

R4L

Ok, thanks GarageGothic. I'll have to try it out when I am free.

SMF spam blocked by CleanTalk