Posted By
|
Message
|
Pixelthief Dedicated klik scientist
Registered 02/01/2002
Points 3419
|
13th January, 2008 at 17:16:53 -
Is there some calculator for this already existing, or am I going to have to create it.
Basically some way of determining how many frames an animation will last if has # of sprites X and speed Y
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456
|
Pixelthief Dedicated klik scientist
Registered 02/01/2002
Points 3419
|
13th January, 2008 at 17:24:40 -
Ok uh 10 seconds of testing in TGF yielded a formula:
At speed 100, each sprite plays for 1 frame. At speed 1, each sprite plays for 100 frames. At speed 3 (there is no speed 2), each sprite plays for ~33 frames. Thus, the end result is that each sprite has a duration of 100 / Y frames, where Y is the speed.
Thus, given a number of animation frames X, and an animation speed Y, the formula for gameplay frames Z is:
Z = (100 * X) / Y
So an 20 frame animation, playing at speed 30, should last around 66 gameplay frames (which is 66/50 or 1.32 seconds)
I should note it seems to round down...
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456
|
Hernan
Registered 04/03/2003
Points 707
|
13th January, 2008 at 17:44:00 -
lol, good job answering your own question
BTW, speed 2 does exist. Nudge the slider with left and right arrow keys.
This space is for rent
|
Pixelthief Dedicated klik scientist
Registered 02/01/2002
Points 3419
|
13th January, 2008 at 17:46:16 -
<3
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456
|
»xerus
Registered 28/06/2002
Points 675
|
13th January, 2008 at 17:49:10 -
I've always wondered how this worked... ;p
n/a
|
AndyUK Mascot Maniac
Registered 01/08/2002
Points 14586
|
13th January, 2008 at 19:34:15 -
it would be good to archive these kind of findings somewhere.
There is a lot of stuff ive learnt over the years from random forum posts that were quite useful and yet left to get pushed down the list into obscurity.
I don't think it's all that well noted that TGF runs at 50 frames per second for instance.
.
|
DeadmanDines Best Article Writer
Registered 27/04/2006
Points 4758
|
14th January, 2008 at 12:32:11 -
ClickWiki, anyone?
191 / 9999 * 7 + 191 * 7
|
AndyUK Mascot Maniac
Registered 01/08/2002
Points 14586
|
14th January, 2008 at 13:59:27 -
I never thought of that.
.
|
DeadmanDines Best Article Writer
Registered 27/04/2006
Points 4758
|
14th January, 2008 at 16:29:05 -
Another nifty use for this:
Animation speeds are dependent on framerate, so if you have a game where the user can choose his own framerate, the animations will go faster or slower depending on the changes they make.
This formula can be used to adjust animation speeds accordingly.
191 / 9999 * 7 + 191 * 7
|
|
|