simple mouth movement animation does nothing

I feel like a newbie that this simple animation is not working for me. I apparently do not understand the sequence data requirements. Please let me know what I am doing wrong.

Context:

  - moving a mouth through 10 positions to correspond to audio file

  - have data for audio onset time of each mouth position (and thus the duration before the next)

The same sprite sheet works with a simple loop animation. Below is my sequence data, but :play() does nothing. What I am expecting is to show frame 1 for 80ms, then frame 8 for 200ms, then frame 5 for 240ms, etc. What am I doing wrong?

mouthSequences[‘bubble_1’] = {

{name=‘rest0’, start=1, count=1, time=80, loopcount=1,},

    {name=‘etc1’, start=8, count=1, time=200, loopcount=1,},

    {name=‘E2’, start=5, count=1, time=240, loopcount=1,},

    {name=‘rest3’, start=1, count=1, time=480, loopcount=1,},

    {name=‘MBP4’, start=10, count=1, time=80, loopcount=1,},

    {name=‘E5’, start=5, count=1, time=80, loopcount=1,},

    {name=‘MBP6’, start=10, count=1, time=120, loopcount=1,},

    {name=‘L7’, start=3, count=1, time=160, loopcount=1,},

    {name=‘rest8’, start=1, count=1, time=40, loopcount=1,},

}

insufficient data.

consider zipping up demo project and sharing.

Good idea, but will have to wait until tonight. I have to create a sanitized version, too much of the project content is “not ready to share” from the content owners. But I can create a simple one-page project for that animation tonight.

Good idea.  A tight example showing the problem and code that we can run and give feedback on will help get you the answers you need.

A zip file for a simple project recreating the problem can be found here:

https://www.ideategames.org/dcims/Anim.zip

I found a workaround (or maybe it is the right way to do it?):

mouthSequences[‘bubble_1’] = {

{name=‘bubble_1’, frames={1,1,

    8,8,8,8,8,

    5,5,5,5,5,5,

    1,1,1,1,1,1,1,1,1,1,1,1,

    10,10,

    5,5,

    10,10,10,

    3,3,3,3,

    1},

    time=1480, loopCount=1},

}

I’m looking at your code, but can’t really puzzle out what you want to do.

What is tripping me up is all these single frame animations.  

Puzzling a little longer.

One thing you’re for sure doing wrong is you have the loop C ount as ‘loop c ount’. 

I fixed the loopCount parameter, sorry, posted before I fixed it. See my latest post.

But yes, a bunch of single-frame animations. I somehow thought they would chain together, but my misunderstanding. See my fix posted above. Is that the correct way to do it? The issue is that each frame has a different duration. Anyway, what I posted last above does work.

I did the best I could to:

  1. reduce your code to a module.  Got rid of scene as that wasn’t needed for this example.

  2. Showed two different ways to step animation.

Download this: https://github.com/roaminggamer/RG_FreeStuff/raw/master/AskEd/2018/02/Anim.zip

Look in folder: Anim_modified

In case it wasn’t clear, the third example cannot be aligned to the times you want, because the animation can only be changed on each new game frame (not to be confused with a animation frame).

Each game frame is either ~17 ms apart or ~33ms apart, but they WILL vary.

The ONLY true way to get a consistent timed animation like you want it to actually make the animation artwork play that way and have a sequence be composed of multiple-frames. 

In short, it ain’t easy to get animations that perfectly align with speech.  However, you may find your approach is just ‘good enough’.

Ah, I see. Thank you so much, I think I understand now. The alignment is of course difficult, mostly because of the delay in audio.play startup (I do audio.load() ahead), but all my phrases are quite short, and it works out pretty well with the repeating frame technique. The phoneme breakdown (Papagayo) can be set for any frames/sec, gives me the starting frame number for each phoneme, and I multiply the ms/frame through, and it works out pretty well.

Thank you for your help. It is working well now.

insufficient data.

consider zipping up demo project and sharing.

Good idea, but will have to wait until tonight. I have to create a sanitized version, too much of the project content is “not ready to share” from the content owners. But I can create a simple one-page project for that animation tonight.

Good idea.  A tight example showing the problem and code that we can run and give feedback on will help get you the answers you need.

A zip file for a simple project recreating the problem can be found here:

https://www.ideategames.org/dcims/Anim.zip

I found a workaround (or maybe it is the right way to do it?):

mouthSequences[‘bubble_1’] = {

{name=‘bubble_1’, frames={1,1,

    8,8,8,8,8,

    5,5,5,5,5,5,

    1,1,1,1,1,1,1,1,1,1,1,1,

    10,10,

    5,5,

    10,10,10,

    3,3,3,3,

    1},

    time=1480, loopCount=1},

}

I’m looking at your code, but can’t really puzzle out what you want to do.

What is tripping me up is all these single frame animations.  

Puzzling a little longer.

One thing you’re for sure doing wrong is you have the loop C ount as ‘loop c ount’. 

I fixed the loopCount parameter, sorry, posted before I fixed it. See my latest post.

But yes, a bunch of single-frame animations. I somehow thought they would chain together, but my misunderstanding. See my fix posted above. Is that the correct way to do it? The issue is that each frame has a different duration. Anyway, what I posted last above does work.