Animation Best Practices 2017 / Livecode 8
Posted: Thu Oct 05, 2017 3:25 pm
Hi all,
long time hypertal- sorry Livecode hobbyist. Deep love for the language and development environment.
Currently coding a point and click adventure game for more daughter (she drew all the drawings and and was the 'Chris Roberts' behind the game's scope. I call her that because as she worked out what she wanted there was severe feature creep. )
I've written a half decent for me (but probably crappy by your standards) game engine that uses a card a room, loads in .PNG sequences as sprites which it stores in a database . Each room has 5 buttons set up as channels that will playback your selected PNG sequences as sprites - these can be updated by the room's mini-game loop & user interaction. I'll share the engine here when I finish it - hopefully before the end of the year ... or at least my daughter's 6th Birthday.
I've animated all the key moments of the story in After Effects because I work in TV so it's easier for me to play back an animation sequence than work out SCUMM style collision & A* pathfinding level of game complexity.
So let's say a character walks on the screen and stops in the middle of the screen as the intro to the current room, that's a 24 frame PNG sequence.
My database stores the ID number of each .PNG in the sequence and then uses 'send to me in x ticks' trick to flip through each frame incrementing the frame counter each time and refreshing the icon of the button.
Once the animation has reached frame 24, the game will move to the next event for the room - which could be to prompt the user. Char walks in, animation finishes, message panel displays "This room looks creepy" or something.
It's good in theory, but what I've found in practice is that the game races ahead of the sprite playback and moves to the next event. So both events are occurring at the same time. Once the framecount hits the end of the animation sequence I've made the next event to be a mandatory 'wait 1 seconds' which kind of brushes over the error reasonably good enough for a kid's point and click.
But there must be a more robust method for playing animated sprite sequences and moving to the next event once the playback is done?
Which leads me to my question...
TL/DR:
What's the best method for perfectly time sprite animations?
Are we still having to use buttons for sprites?
is 'send "event_handler" to me in x ticks' the best method for animation that keeps the input from the user channels open for interaction
How does one cue the next event to start only once a sprite finishes it's animated sequence instead of racing ahead so it appears on screen as though the events are concurrent ie: sprite 1A throws grenade, sprite 2 explodes once the grenade lands at its feet.
thanks for any suggestions!
long time hypertal- sorry Livecode hobbyist. Deep love for the language and development environment.
Currently coding a point and click adventure game for more daughter (she drew all the drawings and and was the 'Chris Roberts' behind the game's scope. I call her that because as she worked out what she wanted there was severe feature creep. )
I've written a half decent for me (but probably crappy by your standards) game engine that uses a card a room, loads in .PNG sequences as sprites which it stores in a database . Each room has 5 buttons set up as channels that will playback your selected PNG sequences as sprites - these can be updated by the room's mini-game loop & user interaction. I'll share the engine here when I finish it - hopefully before the end of the year ... or at least my daughter's 6th Birthday.
I've animated all the key moments of the story in After Effects because I work in TV so it's easier for me to play back an animation sequence than work out SCUMM style collision & A* pathfinding level of game complexity.
So let's say a character walks on the screen and stops in the middle of the screen as the intro to the current room, that's a 24 frame PNG sequence.
My database stores the ID number of each .PNG in the sequence and then uses 'send to me in x ticks' trick to flip through each frame incrementing the frame counter each time and refreshing the icon of the button.
Once the animation has reached frame 24, the game will move to the next event for the room - which could be to prompt the user. Char walks in, animation finishes, message panel displays "This room looks creepy" or something.
It's good in theory, but what I've found in practice is that the game races ahead of the sprite playback and moves to the next event. So both events are occurring at the same time. Once the framecount hits the end of the animation sequence I've made the next event to be a mandatory 'wait 1 seconds' which kind of brushes over the error reasonably good enough for a kid's point and click.
But there must be a more robust method for playing animated sprite sequences and moving to the next event once the playback is done?
Which leads me to my question...
TL/DR:
What's the best method for perfectly time sprite animations?
Are we still having to use buttons for sprites?
is 'send "event_handler" to me in x ticks' the best method for animation that keeps the input from the user channels open for interaction
How does one cue the next event to start only once a sprite finishes it's animated sequence instead of racing ahead so it appears on screen as though the events are concurrent ie: sprite 1A throws grenade, sprite 2 explodes once the grenade lands at its feet.
thanks for any suggestions!