Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

smooth movement in hd and 60fps

Contributor ,
Apr 09, 2013 Apr 09, 2013

Hi,

I often have the situation that an application runs on my dual core Pentium E8500 (with Nvidia 550 ti in fullscreen) in wmode direct very smooth. Setting it in window mode makes display objects moving from right to left over the screen look choppy. And if the pc and gpu of the customer isn't top notch the application does not look good anymore.

Here is a simple example. Just moving a line of text over the screen. After some frames moving smooths it just have small unsmooth movements running from Flash Professional in a window. I seems that the text jumps one frame back sometimes.

https://dl.dropbox.com/u/1271962/textShiftTest.zip

How would I prevent such display errors?

TOPICS
ActionScript
1.8K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Apr 09, 2013 Apr 09, 2013

I tried to open your .fla, but I only have Flash CS5. Regardless, my first question to you is: How are you animating? Time line tweens, a tween class? The only way I animate anymore is using Greensock's TweenLite and TweenMax: www.greensock.com

That does everything I need to do when it comes to Flash animations, and a WHOLE lot more. If you'd like to save your .fla as a CS5 file, I'd be happy to take a lok.

~Chipleh

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 09, 2013 Apr 09, 2013

CS5 Version

https://dl.dropbox.com/u/1271962/textShiftTestCS5.zip

Here I use the simplest script by substracting a value to the x position on an Enterframe event. I tried using the frame time dependent movement but it still looks bad on my pc in a window (not fullscreen).

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Apr 09, 2013 Apr 09, 2013

There are entire classes written to make something move on the x coordinate, which is much more efficient and much more elegant. Check out this page: http://www.greensock.com/tweenlite/

If you like, you can try the code below, all you need to do is download the AS3 version of  Greensock's TweenLite(100% free) classes and drop the com folder in the root directory along with your .swf.

Try replacing your code with the code below, which will tween your test_txt to a the 0 x coord over a period of 10 seconds.

import com.greensock.*;
import flash.events.Event;

this.addEventListener(Event.ENTER_FRAME,onEF);


function onEF(e:Event)
{
TweenLite.to(text_txt, 10, {x:0});
}

Using tweenMax, there are easing types, and many other options.

~Chipleh

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 09, 2013 Apr 09, 2013

I usually use caurina Tweener. But sometimes I just need a linear and interactive tween.

Your example has a Easing function in it which makes the effect not so obviously. But I can see some little jumps here too (on my pc). Just doublechecked  the old swf on a 900 euro pc where everything runs fine in a Flash window.

I am just a bit confuzed about this performance problem on a Pc where complex 3d games run super smooth. Just for a line of text moving over the screen.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Apr 09, 2013 Apr 09, 2013

Weird. So greensock's classes did little to improve performance? I'm running on a Windows Box(Dell Laptop 8 gb RAM, i7-2620 CPU - 2.70 GHz, a speedy work computer) and have never seen an issue with jerky greensock tweens. I haven't used Caurina before, I know of it.

Very strange mate, I thought greensock would slightly improve performance. Solution: "Don't tween" 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 09, 2013 Apr 09, 2013

Just try it on a slower computer. It doesn't matter what class you use. Maybe gpu based graphics will help. It is just a bit overhead for such simple tasks.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Apr 09, 2013 Apr 09, 2013

Maybe gpu based graphics will help. It is just a bit overhead for such simple tasks.

Why would it be a simple task to get flash constanly running 60fps in 1080p?

A current HighEndEngine (CryEngine, frotbite 2) with a 1000$ graphics card can give you no guranteed 60fps.

Any PC nowadays has a too much tasks running at the same time, that will gurantee to bring the framerate down sooner or later.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 09, 2013 Apr 09, 2013

I am talking about new PCs with just running my application. Shouldn't need a 1000$ PC to shift a small graphic over the screen w/o jumping. I just want to understand the problem and would love to use Flash.

edit:

BTW: I noticed the application runs better in an external player or as executable than in the window compiled out of Flash Professional.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Apr 10, 2013 Apr 10, 2013

Here you can find a paper from Adobe what to take for measures to enhance Flash-performance.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 12, 2013 Apr 12, 2013
LATEST

Today I noticed in one performance critical FlashMovie that adding a looping sound solved a big problem with syncronize frames. After dropping frames the animation become very unregular in movement. Spending the whole week (and more) on this problem finaly gave me the idea to activate some sound as soundcards do have a nice control over timing. And voila everything looks smoother not, even if there are framedrops. Actualy there exists a problem with syncronisation w/o sound. Very anoying.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines