No announcement yet.

Scaleform: Know Its Limitations

  • Filter
  • Time
  • Show
Clear All
new posts

    The integration is flexible enough to allow you to use as little or as much AS and/or timeline animation as you want to do a given task. How you decide to handle animation is entirely up to you, but just try to keep in mind that anything over 30 fps in your Flash files is overkill, and complex animations at higher framerates have the potential to cause performance hits. Our Best Practices doc recommends keeping your UI framerate at no more than 30 or 40 fps, and possibly as low as half of your game's frame rate.

    If all your UI animation is handled by UnrealScript, then I'm sure you could keep your Flash doc frame rate very low, but it would be alot easier to animate your UI in the Flash timeline than to write it all in UnrealScript. As Doublezer0 points out, you can't set your fps to 0. Setting it to 1fps is probably fine if you intend to control every aspect of the animation via UnrealScript, but that means that any animation or code controlled by the timeline will only animate/execute at 1 frame every second (with the exception of something like setInterval). Unless that is what you want, then every single animation would have to be controlled by UnrealScript.

    There are so many variables to consider that I can't offer you a one size fits all answer. Just try to keep in mind what I've said about your max framerate, however you choose to proceed. Unless the UI *is* the game though, I really can't see why you would need it to run at 60fps. Of course, there are exceptions. Maybe a Flash-based mini-game might be at a higher frame rate - and even then, only a mini-game that requires quick reflexes and feedback.


      with onEnterFrame the fps is important as it defines how fast the animation code updates. Sometimes with Flash I find the default 12fps lacking in quality for even basic animations. This is why most flash developers switched to time based animation.

      Time based is completely independant of the timeline however the functionality inside might rely on some kind of framerate. This is especially important to consider when using native actionscript functions as Macromedia/Adobe might have use it in their core classes also.


        Just to add a little extra gas to the fire...

        I've been in design sessions, where 20-year industry veterans have watched a game being played on the screen, and they couldn't tell if it was 30 or 60 fps. Most people can't see the difference between the two. Below 30 is when you start noticing a visual difference, and even then, rarely do people notice a visual difference until you hit something like 15 fps. Just think, TV is at 30fps (NTSC is technically 29.97, while PAL is 27) - and it looks smooth. Movies are at 24, and they look equally smooth, though more dramatic, and less edgy than TV. Many web videos run at 15 fps.

        But - where 60fps comes in over 30 is the responsiveness of the controls. Once those industry vets pick up the controller, they can almost instinctively tell that the game is 30 or 60 fps, by how quickly the character on the screen responds after a button is pressed. In a nutshell, this is because the character is animating at 60fps, rather than 30, and therefor has twice as many keyframes and twice as many opportunities to react, and the game engine is also reading input at 60fps.

        As for UI being at 60fps, well, visually, you will have a hard time telling its at 60 vs. 30. And I can't imagine many scenarios where you'd need your UI to change at 1/60th of a second as opposed to 1/30th.

        For some devs, it seems to be a matter of personal pride that they make 60fps games, but when is the last time you saw the frame rate of a game listed as a bullet point on the back of the box?


          good points. Im eating it all up yum yum yum.

          My main concern was with animations. I must be over sensitive because I notice the difference between 30 and 60fps (on 60hz displays). I also notice the difference between vsync on and off (at the refresh rate and im not just talking about tearing).

          I will admit that many people do not. Movies are not perfectly smooth, especially when panning (I notice the stutter). Also know that movies have something that digital games do not: blurring from exposure time. This helps in keeping things smooth at low frame rates. Film is recorded at 24 fps and is converted to 30 fps so you can watch it on a 60hz display. This has been a money related issue because you are saving 6 frames of film every second, and over an hour movie, that's a lot of film. So 24fps is the minimum before people notice (for film). Games that use motion blur have not been able to exactly replicate the blur naturally occurring in film. And very good point, the biggest noticeable difference between 30fps and 60fps is the controls, especially with the mouse.

          The only thing thats not clear is when flash updates the scene. Like, when I change a movie from visible false to true, when does flash update the scene. In most games, this would happen every tick, but what is a tick in flash? Isn't it a frame? So Im wondering, if we set the fps to 1, even if I updated the movieclips in the scene 60 different ways in a second with unrealscript, wouldn't flash just display only one of those updates?


            I suppose you could call a frame a tick in Flash. However, you can also perform things at the millisecond level. setInterval allows you to fire off functions at a set time in milliseconds. (setInterval) Now, setInterval is still technically bound by the framerate, but it can still run up to 10x faster than the framerate.

            I have it on good word here at Scaleform that you can control the framerate of an animation in your Flash movie from UnrealScript just fine. If you tell a movieclip to animate 60 times per second in UnrealScript, it will do so, even if your Flash file is set to 1fps.

            And yes, its true that some people are hypersensitive to display technology. Some people, very few, can see rainbow banding on DLP TVs - while most cannot. And, while you may see stuttering in movies, I'm willing to bet that the vast majority of people do not - myself included. Of my all time favorite games, none of them were 60hz games. In fact, many studios lock their games at 30fps to ensure a consistently stable framerate. But more power to you, if you can manage 60fps.

            Here's an interesting post from Insomniac games about 60 vs 30 -

            They found exactly what I've been saying for nearly 10 years to be true. 60fps games often sacrifice visual quality for speed too. If you've played Ratched & Clank on PS3, you can tell it is kind of blurry looking, but it does run at 60fps.


              If you tell a movieclip to animate 60 times per second in UnrealScript, it will do so, even if your Flash file is set to 1fps.
              that is correct but not in the simplistic sense that you can change the fps of the clips exactly. Instead you have to manage the execution based on your own timer handler. A good example of this is Greensock's TweenLite. In the case for Flash on the web an example is when you run a flash animation in IE that executes at a higher fps than the movieclip. The animation will still run at that fps but will skip frames which can be critical if those frames execute code. TweenLite and any other tweening engine eliminates this through a timeline management system.
              I recommend any tweening engine but inevitably there are times I use onEnterFrame.

              btw my eyes sit comfortably at 85hz on a PC monitor but the framerate of my tv [*edit : dont have a tv lol i meant my old ones] never bothers me. In regards to that Insomniac article I have refused to play certain games because of framerate. GTAIV a case in point. Years of hype then when it comes to PS3 and Xbox360 it has nice shadows, annoying lighting and most of all it ran at 30fps and still slowed down in parts.
              I bought the game for PC and it ran at 21fps but a few tweaks in the config I had acceptable low quality shadows, medium quality lighting that didnt saturate the screen and best of all 30-55 FPS and I felt like I could steer a car. So it comes back down to control methods as you said in a previous post.


                blog read was very cool. Puts a different perspective on it for me. Thank you very much!


                  Originally posted by Doublezer0 View Post
                  that is correct but not in the simplistic sense that you can change the fps of the clips exactly.
                  Yes. This is correct. But what I'm getting at is that you could set up a loop in UnrealScript that executes an interpolation of a Flash object that executes every 1/60th of a second (in UnrealScript), and the Flash object would thus move at that rate, regardless of the Flash document's framerate setting.


                    Sorry I udnerstood I was just extrapolating that its not as simple as movieclip._fps = 30;