Page 1 of 1

Frame animation

Posted: Sun Jun 22, 2014 9:47 pm
by chelling
I am trying to make a simple animation of a rotating ball run as smoothly on a Retina display as it does on the iPad. I have set the acceleratedrendering to true in openStack, and the layerMode of the button is set to dynamic. I even increased the number of png's I am cycling through from 25 to 50. On the Retina simulator, it looks like I am looking at it with double vision. What am I doing wrong?

Re: Frame animation

Posted: Sun Jun 22, 2014 10:36 pm
by Simon
Hi chelling,
Have you tried with just one image and using "angle"? Check it out in the Dictionary.

Simon

Re: Frame animation

Posted: Sun Jun 22, 2014 11:21 pm
by chelling
That works pretty well for the ball. Thanks Simon! It would still be nice to have a way to do the animation cycling through png files. Not all animations are simple rotations. Do you think that a movie file will have to be used in those situations?

Re: Frame animation

Posted: Sun Jun 22, 2014 11:40 pm
by Simon
Swapping through image files is processor intensive, not something you want to do on a mobile device.
Here a nice one from Scott Rossi
http://andregarzia.on-rev.com/alejandro ... gman_2.zip

Simon

Re: Frame animation

Posted: Mon Jun 23, 2014 12:01 am
by chelling
That's pretty much how I am managing the animation. There are two script local variables, one holds the number of images and the other holds the current image number. So, in the game loop, I am checking to see if the current frame + 1 is > or < the number of images, and then setting the icon of the button accordingly. This is from Game Academy. Do you think if I used less images it would run smoother on the Retina Display? I thought that swapping images was the preferred way to manage animations, so I am pretty surprised to learn that it is actually processor intensive.

Re: Frame animation

Posted: Mon Jun 23, 2014 12:13 am
by Simon
Maybe memory intensive is a better description.
Now if you did a lot of work and manipulated points of a graphic object you'd be rocking.

Simon

Re: Frame animation

Posted: Mon Jun 23, 2014 12:27 am
by chelling
Right - SVG support cant get here soon enough :D