Optimizing animations

HbkmadnessHbkmadness Member, PRO Posts: 35
edited April 2014 in Working with GS (Mac)

Hi,

I saw this topic forums.gamesalad.com/discussion/30832/loading-times-and-ram-usage and I decided to try to animate using "Change attribute".

I have problem with loading time because I have many animations. So I guess to not preload the art is the answer but when I try to use "Change attribute" It does not animate smooth at all.

My rules are:

Every 0.04 seconds (which is 1/24 of the second) do

Change attribute : image to "imagename" .. frame

Change attribute : frame to frame + 1

Usually I would add one more rule that says if frame > maxFrames stop. But I wanted to see if it does a smooth animation first... well it does not at all. Any idea how to optimize my animations ?

Comments

  • SocksSocks London, UK.Member Posts: 12,822

    @Hbkmadness said:
    Every 0.04 seconds (which is 1/24 of the second) do

    Actually every 0.04 seconds is 1/25th of a second. [/pedantry]

    Take a look at this, it might be helpful:

    https://forums.gamesalad.com/discussion/63454/fast-frame-swap/p1

    ...

  • HbkmadnessHbkmadness Member, PRO Posts: 35
    edited April 2014

    Hahah ye u got me in the math ;s

    It's really an awesome way to do the animation but It still does not go smooth at the first time (on the first loop) I guess because It hasn't preload the images ?

    And usually I would not loop the animation at all, do you have any idea what is the problem ? My animation are at the end of the levels and maybe the problem is that the images are quite big ( I mean it's like a video at the end of the scene and all images are as big as the screen )

  • SocksSocks London, UK.Member Posts: 12,822

    @Hbkmadness said:
    . . . . do you have any idea what is the problem ?

    This: "all images are as big as the screen"

  • HbkmadnessHbkmadness Member, PRO Posts: 35

    Same thing happens for smaller images too. If it's not preloaded it's not smooth the first time. That's so sad I saw he projects that you uploaded and damn that's very smooth animation indeed.

Sign In or Register to comment.