## Speed Vs. Tics

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
durnurd
Posts: 116
Joined: Wed Jan 18, 2006 8:44 pm
Location: Minnesota

### Speed Vs. Tics

I'm wondering, what does the "speed" argument of functions like Floor_Raise have to do with time passage in tics (for the purpose of scripting special platform movement)?

With a little experimentation, I've found an equation to convert the velocity to Units per Tic:

v(x) = (28/225) * x

where x is the "speed" you type in and v(x) is the velocity in Units per Tic.

If, then, you have a platform moving A units at speed S, you can find how many tics it will take by using:

T(A,S) = A / (S * (28/225)

Is there a more accurate or easier way to do this?

Thanks.
Amuscaria
Posts: 6558
Joined: Mon Jul 26, 2004 12:59 pm
Location: Growing from mycelium near you.
From what i've found in the past. Whatever speed you put is divided by 8. If your speed is 1, it would take 8 tics to move up 1 unit/pixel, this 1/8 units per tic. If it's 64, it would still take 8 to move that full 64 units, thus 8 units per tic. I'm not sure if I go tthis right, i might have reversed something.
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID
Incidentally, 1/8 (0.125) is extremely close to 28/225 (0.12444~).
randi