Is there a limit on number of frames we put in sequence data?

Hi,

If I define my sequence data in my sprite animation like this, everything is OK:

[lua]{ name = “MajorChew”, frames={ 2, 3, 4, 2, 3, 4, 2, 3, 4 }, time = 3000, loopCount = 1 },[/lua]

but if I increase number of frames, then the animation is played back faster, even though I don’t change the “time” variable in that sequence data:

[lua]{ name = “MajorChew”, frames={ 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4 }, time = 3000, loopCount = 1 },[/lua]

Is it right or I’m missing something here?

Thanks. [import]uid: 206803 topic_id: 36930 reply_id: 336930[/import]

Not sure if I understand your question fully, but if I’m reading into this correctly I believe that’s expected.

Your first sequence has 9 frames to be played over 3 seconds - 3fps.

Your second sequence has 27 frames over 3 seconds - 9fps.

The second animation will, I believe, look “quicker”.

I might be wrong, or I might have got the wrong end of the stick - pretty sure somebody else will chime in soon.

Edit

Just re-reading your post; are you actually saying the second animation plays faster then 3 seconds, as opposed to the visual effect? In which case that is wrong. [import]uid: 33275 topic_id: 36930 reply_id: 145154[/import]

SegaBoy, as I read and hopefully understood “time” correctly, it defines how much it takes for the animation go from one frame to another:

From docs:
time – This is the time (in milliseconds) between each frame. If this is not specified, then animation will be based on the framerate of your app. [import]uid: 206803 topic_id: 36930 reply_id: 145158[/import]

Yeah - that clears that up, if the docs are correct then I can’t really offer anything, sorry. Hopefully Brent or Rob will be able to help.

Just out of interest what happens if you don’t specify a time value and let the app control it at 30/60fps? [import]uid: 33275 topic_id: 36930 reply_id: 145159[/import]

If you don’t specify any time, frames will change based on fps of your app, so each app frame changes one animation frame.

Hopefully one of staff will help us here. [import]uid: 206803 topic_id: 36930 reply_id: 145173[/import]

Hi Aidin,
The documentation is misleading (incorrect, actually), and thank you for pointing it out. The “time” parameter is time for the entire sequence, not the time between each frame. If you don’t specify a time, the frames will animate “per game cycle” as you note (that part of the documentation is correct).

I’ll fix the documentation this week regarding that, and sorry for the confusion.

Brent [import]uid: 200026 topic_id: 36930 reply_id: 145217[/import]

Thanks man for the reply.

I noted something like this when I was testing different values but I believed in the documentation so much that I neglected any other possible scenario! [import]uid: 206803 topic_id: 36930 reply_id: 145220[/import]

Not sure if I understand your question fully, but if I’m reading into this correctly I believe that’s expected.

Your first sequence has 9 frames to be played over 3 seconds - 3fps.

Your second sequence has 27 frames over 3 seconds - 9fps.

The second animation will, I believe, look “quicker”.

I might be wrong, or I might have got the wrong end of the stick - pretty sure somebody else will chime in soon.

Edit

Just re-reading your post; are you actually saying the second animation plays faster then 3 seconds, as opposed to the visual effect? In which case that is wrong. [import]uid: 33275 topic_id: 36930 reply_id: 145154[/import]

SegaBoy, as I read and hopefully understood “time” correctly, it defines how much it takes for the animation go from one frame to another:

From docs:
time – This is the time (in milliseconds) between each frame. If this is not specified, then animation will be based on the framerate of your app. [import]uid: 206803 topic_id: 36930 reply_id: 145158[/import]

Yeah - that clears that up, if the docs are correct then I can’t really offer anything, sorry. Hopefully Brent or Rob will be able to help.

Just out of interest what happens if you don’t specify a time value and let the app control it at 30/60fps? [import]uid: 33275 topic_id: 36930 reply_id: 145159[/import]

If you don’t specify any time, frames will change based on fps of your app, so each app frame changes one animation frame.

Hopefully one of staff will help us here. [import]uid: 206803 topic_id: 36930 reply_id: 145173[/import]

Hi Aidin,
The documentation is misleading (incorrect, actually), and thank you for pointing it out. The “time” parameter is time for the entire sequence, not the time between each frame. If you don’t specify a time, the frames will animate “per game cycle” as you note (that part of the documentation is correct).

I’ll fix the documentation this week regarding that, and sorry for the confusion.

Brent [import]uid: 200026 topic_id: 36930 reply_id: 145217[/import]

Thanks man for the reply.

I noted something like this when I was testing different values but I believed in the documentation so much that I neglected any other possible scenario! [import]uid: 206803 topic_id: 36930 reply_id: 145220[/import]

Not sure if I understand your question fully, but if I’m reading into this correctly I believe that’s expected.

Your first sequence has 9 frames to be played over 3 seconds - 3fps.

Your second sequence has 27 frames over 3 seconds - 9fps.

The second animation will, I believe, look “quicker”.

I might be wrong, or I might have got the wrong end of the stick - pretty sure somebody else will chime in soon.

Edit

Just re-reading your post; are you actually saying the second animation plays faster then 3 seconds, as opposed to the visual effect? In which case that is wrong. [import]uid: 33275 topic_id: 36930 reply_id: 145154[/import]

SegaBoy, as I read and hopefully understood “time” correctly, it defines how much it takes for the animation go from one frame to another:

From docs:
time – This is the time (in milliseconds) between each frame. If this is not specified, then animation will be based on the framerate of your app. [import]uid: 206803 topic_id: 36930 reply_id: 145158[/import]

Yeah - that clears that up, if the docs are correct then I can’t really offer anything, sorry. Hopefully Brent or Rob will be able to help.

Just out of interest what happens if you don’t specify a time value and let the app control it at 30/60fps? [import]uid: 33275 topic_id: 36930 reply_id: 145159[/import]

If you don’t specify any time, frames will change based on fps of your app, so each app frame changes one animation frame.

Hopefully one of staff will help us here. [import]uid: 206803 topic_id: 36930 reply_id: 145173[/import]

Hi Aidin,
The documentation is misleading (incorrect, actually), and thank you for pointing it out. The “time” parameter is time for the entire sequence, not the time between each frame. If you don’t specify a time, the frames will animate “per game cycle” as you note (that part of the documentation is correct).

I’ll fix the documentation this week regarding that, and sorry for the confusion.

Brent [import]uid: 200026 topic_id: 36930 reply_id: 145217[/import]

Thanks man for the reply.

I noted something like this when I was testing different values but I believed in the documentation so much that I neglected any other possible scenario! [import]uid: 206803 topic_id: 36930 reply_id: 145220[/import]

Not sure if I understand your question fully, but if I’m reading into this correctly I believe that’s expected.

Your first sequence has 9 frames to be played over 3 seconds - 3fps.

Your second sequence has 27 frames over 3 seconds - 9fps.

The second animation will, I believe, look “quicker”.

I might be wrong, or I might have got the wrong end of the stick - pretty sure somebody else will chime in soon.

Edit

Just re-reading your post; are you actually saying the second animation plays faster then 3 seconds, as opposed to the visual effect? In which case that is wrong. [import]uid: 33275 topic_id: 36930 reply_id: 145154[/import]