New account registration is temporarily disabled.

FOOTPRINTS

Posts

Pages: 1
I'm sure someone's probably asked this before, but what's the most efficient way to make footprints? Not a general how to make prints, I know at least two theories on that.

But, well, one of these methods involves refreshing a picture near the hero, and the other involves a sort of follow event (and the only other thing I can think besides those two involves like a billion local events and changing the graphics on them as you pass). Then you see stuff like Star Stealing Prince where kids walk around in the snow like it's no problem.

What's the easiest way to do this?
It would probably depend greatly on what engine you were using. A script might be applicable if in XP/VX or Ace, while 2k/3 would require more work-arounds via eventing.
I think the most efficient way is with scripts. I have made footprints via scripting before ( it was in ika, but I think it's no different for RPG maker)

My system was simple. Every entity on screen had an array of pictures (limited to 20), and on movement, they left one of the available (which alpha value is 0) picture on the ground, slowly fading out.

For one character, I think you can even event something like this. (I don't know if there is any way, to show pictures beneath the events, with eventing only...)
Before anyone asks, I'm using 2k3 (I abandoned XP and VX after finding I could do alot less than I wanted without resorting to scripting). I could use a plugin, but not a script.

I've got two real options (since I don't want the whole following thing):


A picture-based system
. (Looking at this, I'm considering nixing that)

A local event step event, that basically involves changing the graphic when you step on it, below the hero. The drawback is that it slows things down (since it means a 50x50 screen could have up to 2500 events). The good part is that it's a freakishly easy code.

Hero Touch, Below

If Hero is Facing Up
ThisEvent, ChangeGraphic
Proceed
If Hero is Facing Down
ThisEvent, ChangeGraphic
Proceed
If Hero is Facing Left
ThisEvent, ChangeGraphic
Proceed
If Hero is Facing Right
ThisEvent, ChangeGraphic
Proceed

The other drawback is that you can't really vary the footprints, short of putting some kind of randomizer in. This way doesn't fade out like the other, but rather overwrites old footprints if you cross over them.
You could have three or four events that have graphics eventually fade out and have them check the hero x/y/facing and place them where the hero is, then each step get replaced by the lighter and lighter ones, I guess.
I dunno that it would be worth it but I'm sure I've seen it used before in a 2k3 game.
events would probably be the best option because events can be shown under layers. pictures can't.

i would basically do what liberty said.
Placing 2500 event would be insane. The teleporting events is the way to go.
I once used a number of events (like 10 or so) that would teleport to the hero location, changed their graphic and then would fade out after some time.
author=Scalytank
Placing 2500 event would be insane. The teleporting events is the way to go.

Well, I never said I wanted the snow prints to actually disappear. I just asked for the simplest method.

Disappearing footprints is realistic if snow is actually falling, but in a town with permafrost, either it turns to ice (no prints), or tracks stay put until new tracks come along. Also, 2500 is a very generous estimate. Generally speaking, there's usually a ton of walls/buildings and other in the way,

Ideally, you'd way this done by a sort of XY event. But I wasn't feeling it. Offsetting a crap load of times, and having to calculate around areas that I didn't want prints on. And then there was the fact that I've never had much luck with follow events (which is basically what this was). I suppose I could have done this with pathfinder plugin fairly easily, but truth be told I wanted the tracks to stay.



Since these are not using switches or variables, if you go inside, they disappear automatically. Which would happen usually if you went inside.

And yes, it's a sucky building. It's supposed to be a ziggurat. The plus side of this, is using this way, it's fairly easy to have plot-based footprints (like Chrono Trigger). And it's also easy to have characters in events leave tracks, while using x/y you pretty much have to switch to this for plot, or have an annoying amount of programming.
Even when events are not set to "paralell process", they still have to update their state every frame, draw their "graphics", and on every step, the player will "loop" through all of them, to check which to activate.

I am not sure about the lag with 1000+ events, but you should do some testing on slower machines first.
Easy way of doing this:

Make a footprint event like this:

Branch if hero face up
this event face up
Branch if hero face right
this event face right
...
change event location, this event (Var0001, Var0002)


Now you can copy an arbitrarily large amount of these events without making any changes to the code.

Have an Auto start event like this:

Variable Ev Ptr = 4 (value corresponding to first ID of your footprints, 4 just an example)
Variable Ev Page = 1
Erase Event


After the auto start event has executed, let a parallel process run with code like this

Variable x = hero x
Variable y = hero y
Branch if x is not equal to old_x
Variable old_x = x
Ev Ptr sub 3 (the value of start ID minus one)
Ev Ptr mod 13 (the value of end ID minus start ID plus one. end id = 16 here)
Ev Ptr add 4 (same value as start ID)
Wait 0.1 (assuming move speed = 4)
Call event (Ev Ptr, Ev Page)
Branch if y is not equal to old_y
...repeat...


This will make footprints last as long as you stay on the map, and as long as you don't make too many steps. If you spend too many steps, the last footprints will disappear and appear as new ones instead. Only bad thing about it is that you'll need a lot of events, but there's no real way around that with conventional event coding anyway.

To make the footprints not visible before used, I'd recommend having an inaccessible tile on the map, with the graphic covering the entire tile above hero, and with a simple loop, change the location of all the foot print events to this tile with help of the call event command.
Pages: 1