<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Tight FPS Solution</title>
	<atom:link href="http://blog.andre-michelle.com/2005/tight-fps-solution/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.andre-michelle.com/2005/tight-fps-solution/</link>
	<description>♥</description>
	<lastBuildDate>Wed, 08 Sep 2010 19:10:59 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Sp</title>
		<link>http://blog.andre-michelle.com/2005/tight-fps-solution/comment-page-1/#comment-22513</link>
		<dc:creator>Sp</dc:creator>
		<pubDate>Sun, 21 Dec 2008 10:07:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.andre-michelle.com/2005/tight-fps-solution/#comment-22513</guid>
		<description>This is a BAD way of doing it.

It will mean that flash uses a 100% of the  CPU constantly.

Better just skip to next frame, until necessary time has passed.</description>
		<content:encoded><![CDATA[<p>This is a BAD way of doing it.</p>
<p>It will mean that flash uses a 100% of the  CPU constantly.</p>
<p>Better just skip to next frame, until necessary time has passed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andre Michelle &#187; Blog Archive &#187; Stable FPS Test</title>
		<link>http://blog.andre-michelle.com/2005/tight-fps-solution/comment-page-1/#comment-1458</link>
		<dc:creator>Andre Michelle &#187; Blog Archive &#187; Stable FPS Test</dc:creator>
		<pubDate>Fri, 18 Apr 2008 10:34:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.andre-michelle.com/2005/tight-fps-solution/#comment-1458</guid>
		<description>[...] tried one more time to get a stable frameRate in browser enviroment and an old workaround works fine for me now (flash9player [...]</description>
		<content:encoded><![CDATA[<p>[...] tried one more time to get a stable frameRate in browser enviroment and an old workaround works fine for me now (flash9player [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: André Michelle</title>
		<link>http://blog.andre-michelle.com/2005/tight-fps-solution/comment-page-1/#comment-152</link>
		<dc:creator>André Michelle</dc:creator>
		<pubDate>Fri, 02 Jun 2006 13:35:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.andre-michelle.com/2005/tight-fps-solution/#comment-152</guid>
		<description>&lt;a href=&quot;http://blog.andre-michelle.com/2006/stable-fps-test&quot; rel=&quot;nofollow&quot;&gt;new test on flashplayer9&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p><a href="http://blog.andre-michelle.com/2006/stable-fps-test" rel="nofollow">new test on flashplayer9</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Troy Gilbert</title>
		<link>http://blog.andre-michelle.com/2005/tight-fps-solution/comment-page-1/#comment-151</link>
		<dc:creator>Troy Gilbert</dc:creator>
		<pubDate>Fri, 19 May 2006 21:46:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.andre-michelle.com/2005/tight-fps-solution/#comment-151</guid>
		<description>Just wrote a lengthy post and lost it because of your anti-spam measure... ouch. Might I suggest tweaking that a bit?

What I basically said:

The technique described is what&#039;s commonly referred to as a &quot;fixed timestep&quot; in traditional gamedev. There&#039;s a coder named &quot;Jare&quot; that has a good example of it (in C++) if you want to give google a shot.

The problem with this approach is it &quot;busy waits.&quot; Busy waiting will effectively prevent the Flash Player from handling it&#039;s background work (e.g., garbage collection). This will force it to do the background work once your frame completes, thus further delaying your next frame which further delays the frame after that and so on... the end result can be a vicious cycle if the loop is not limited.

I suspect this problem is occuring because I ran into the same problem as Loma did above (with a similarly powered machine). This appears to me to be a classic unregulated fixed timestep issue. See Jare&#039;s comments on undersampling/oversampling to prevent this.

The ideal is to not busy wait, but rather keep the Flash Player&#039;s &quot;loop&quot; going so that background tasks (garbage collection mainly) get performed at the Player&#039;s leisure. I&#039;ve just picked up Flash over the last week or so (using only the excellent Flash Develop, no MM Flash IDE for me!) so I don&#039;t have this quite working yet, but here&#039;s my plan:

Since Flash already has a main loop (onEnterFrame event handler), I&#039;m using it as my main game loop. Each time my event handler is called I determine the delta since the last frame (getTimer). I accumulate this each frame. Once my accumulator exceeds a given threshold (the length of time my desired frame would take, i.e. 1000/12 for 12fps if using getTimer) I run my internal game update. I then decrement my accumulator by whatever is appropriate for my desired framerate (1000/12 for 12fps).

At this point, the accumulator may still have too much time in it (if the user&#039;s Flash Player&#039;s frame rate is lower than your desired fps, for example). Here you need to decide whether you run your game loop again (and decrement the accumulator) and again until the accumulator drops below the threshold (in which case your total onEnterFrame update will take longer and longer and eventually timeout the Flash Player). Or, do you skip ahead to catch up (which may or may not work depending on your game engine). I usually choose to simply max out at rendering one update per Flash Player frame. That way the game simply slows down if the user&#039;s Flash Player slows down, but my game never causes the player to slow down progressively worse (as I and Loma saw with your example). This would be the wrong decision for network play as it would likely cause a desync between players (or force all players to slow down to the slowest player).

I should note: the supermario game worked as expected on my laptop at home, which is actually a much slower machine than my desktop I&#039;m using right now at work (which was afflicted like Loma described above).</description>
		<content:encoded><![CDATA[<p>Just wrote a lengthy post and lost it because of your anti-spam measure&#8230; ouch. Might I suggest tweaking that a bit?</p>
<p>What I basically said:</p>
<p>The technique described is what&#8217;s commonly referred to as a &#8220;fixed timestep&#8221; in traditional gamedev. There&#8217;s a coder named &#8220;Jare&#8221; that has a good example of it (in C++) if you want to give google a shot.</p>
<p>The problem with this approach is it &#8220;busy waits.&#8221; Busy waiting will effectively prevent the Flash Player from handling it&#8217;s background work (e.g., garbage collection). This will force it to do the background work once your frame completes, thus further delaying your next frame which further delays the frame after that and so on&#8230; the end result can be a vicious cycle if the loop is not limited.</p>
<p>I suspect this problem is occuring because I ran into the same problem as Loma did above (with a similarly powered machine). This appears to me to be a classic unregulated fixed timestep issue. See Jare&#8217;s comments on undersampling/oversampling to prevent this.</p>
<p>The ideal is to not busy wait, but rather keep the Flash Player&#8217;s &#8220;loop&#8221; going so that background tasks (garbage collection mainly) get performed at the Player&#8217;s leisure. I&#8217;ve just picked up Flash over the last week or so (using only the excellent Flash Develop, no MM Flash IDE for me!) so I don&#8217;t have this quite working yet, but here&#8217;s my plan:</p>
<p>Since Flash already has a main loop (onEnterFrame event handler), I&#8217;m using it as my main game loop. Each time my event handler is called I determine the delta since the last frame (getTimer). I accumulate this each frame. Once my accumulator exceeds a given threshold (the length of time my desired frame would take, i.e. 1000/12 for 12fps if using getTimer) I run my internal game update. I then decrement my accumulator by whatever is appropriate for my desired framerate (1000/12 for 12fps).</p>
<p>At this point, the accumulator may still have too much time in it (if the user&#8217;s Flash Player&#8217;s frame rate is lower than your desired fps, for example). Here you need to decide whether you run your game loop again (and decrement the accumulator) and again until the accumulator drops below the threshold (in which case your total onEnterFrame update will take longer and longer and eventually timeout the Flash Player). Or, do you skip ahead to catch up (which may or may not work depending on your game engine). I usually choose to simply max out at rendering one update per Flash Player frame. That way the game simply slows down if the user&#8217;s Flash Player slows down, but my game never causes the player to slow down progressively worse (as I and Loma saw with your example). This would be the wrong decision for network play as it would likely cause a desync between players (or force all players to slow down to the slowest player).</p>
<p>I should note: the supermario game worked as expected on my laptop at home, which is actually a much slower machine than my desktop I&#8217;m using right now at work (which was afflicted like Loma described above).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Loma</title>
		<link>http://blog.andre-michelle.com/2005/tight-fps-solution/comment-page-1/#comment-150</link>
		<dc:creator>Loma</dc:creator>
		<pubDate>Thu, 27 Apr 2006 08:02:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.andre-michelle.com/2005/tight-fps-solution/#comment-150</guid>
		<description>it runs smooth at 33 fps and after 10 secs the frame rate drops to 1-7 fps and it sucks up the cpu
I&#039;m running it at a 2.6 dual core pentium 4 with flashplayer 8.5 beta

hope this helps you a bit
love your site and examples andre ;)</description>
		<content:encoded><![CDATA[<p>it runs smooth at 33 fps and after 10 secs the frame rate drops to 1-7 fps and it sucks up the cpu<br />
I&#8217;m running it at a 2.6 dual core pentium 4 with flashplayer 8.5 beta</p>
<p>hope this helps you a bit<br />
love your site and examples andre ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: paul</title>
		<link>http://blog.andre-michelle.com/2005/tight-fps-solution/comment-page-1/#comment-149</link>
		<dc:creator>paul</dc:creator>
		<pubDate>Wed, 13 Jul 2005 13:01:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.andre-michelle.com/2005/tight-fps-solution/#comment-149</guid>
		<description>bei percys beispiel funktionierts in beiden browsern.</description>
		<content:encoded><![CDATA[<p>bei percys beispiel funktionierts in beiden browsern.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: paul</title>
		<link>http://blog.andre-michelle.com/2005/tight-fps-solution/comment-page-1/#comment-148</link>
		<dc:creator>paul</dc:creator>
		<pubDate>Wed, 13 Jul 2005 12:56:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.andre-michelle.com/2005/tight-fps-solution/#comment-148</guid>
		<description>ich sitz an einem 3 ghz pc und hab die selben ergebnisse wie pinkstar.

gruss

paul</description>
		<content:encoded><![CDATA[<p>ich sitz an einem 3 ghz pc und hab die selben ergebnisse wie pinkstar.</p>
<p>gruss</p>
<p>paul</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pinkstar</title>
		<link>http://blog.andre-michelle.com/2005/tight-fps-solution/comment-page-1/#comment-147</link>
		<dc:creator>pinkstar</dc:creator>
		<pubDate>Mon, 11 Jul 2005 13:15:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.andre-michelle.com/2005/tight-fps-solution/#comment-147</guid>
		<description>ich schreib mal meine testresultate in deutsch daher, geht am schnellsten ; )

in firefox rennt mario ohne probleme mit 33fps über den screen, im IE ruckelt das ganze mit unspielbaren 0.0000023 fps und zeigt trotzdem 33fps an. also das schaut ungefähr so aus: ich drücke die pfeiltaste nach rechts und es passiert erstmal nichts. nach einigen sekunden springt der hintergrund einige meter weiter. also vollzieht das game im hintergrund doch irgendwie die schritte die ich an der tastatur mache, stellt sie aber erst dar, wenn ich die tastatur loslasse und eine weile nichts mehr mache.

achja, ich hab hier einen pc mit 3ghz cpu und 1gb ram rumstehen.

grüße,
pinky</description>
		<content:encoded><![CDATA[<p>ich schreib mal meine testresultate in deutsch daher, geht am schnellsten ; )</p>
<p>in firefox rennt mario ohne probleme mit 33fps über den screen, im IE ruckelt das ganze mit unspielbaren 0.0000023 fps und zeigt trotzdem 33fps an. also das schaut ungefähr so aus: ich drücke die pfeiltaste nach rechts und es passiert erstmal nichts. nach einigen sekunden springt der hintergrund einige meter weiter. also vollzieht das game im hintergrund doch irgendwie die schritte die ich an der tastatur mache, stellt sie aber erst dar, wenn ich die tastatur loslasse und eine weile nichts mehr mache.</p>
<p>achja, ich hab hier einen pc mit 3ghz cpu und 1gb ram rumstehen.</p>
<p>grüße,<br />
pinky</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: joa</title>
		<link>http://blog.andre-michelle.com/2005/tight-fps-solution/comment-page-1/#comment-146</link>
		<dc:creator>joa</dc:creator>
		<pubDate>Sun, 10 Jul 2005 10:25:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.andre-michelle.com/2005/tight-fps-solution/#comment-146</guid>
		<description>Another reason is the speed of objects if you decrase the FPS by an interval or a loop. You would have to animate all objects using AS to synch them.

Or is there any other possibility?</description>
		<content:encoded><![CDATA[<p>Another reason is the speed of objects if you decrase the FPS by an interval or a loop. You would have to animate all objects using AS to synch them.</p>
<p>Or is there any other possibility?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Staticreator</title>
		<link>http://blog.andre-michelle.com/2005/tight-fps-solution/comment-page-1/#comment-145</link>
		<dc:creator>Staticreator</dc:creator>
		<pubDate>Sat, 09 Jul 2005 22:28:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.andre-michelle.com/2005/tight-fps-solution/#comment-145</guid>
		<description>Andre:

If you want MovieClips to play using Flash&#039;s built-in system (rather than relying on your own animation code like I do), my technique won&#039;t do the job.

Sorry, I should&#039;ve explained more, I&#039;ve got a movieclip-spawning class that adds custom methods to movieclips at runtime. This allows me to have much more control over animation (Like adding methods that are based on what the movieclip&#039;s purpose is). You can play nice with AS2 by using custom intrinsic classes. While it adds extra code, animation stutters less than with PercyPea&#039;s technique because it doesn&#039;t lock up the code while waiting.</description>
		<content:encoded><![CDATA[<p>Andre:</p>
<p>If you want MovieClips to play using Flash&#8217;s built-in system (rather than relying on your own animation code like I do), my technique won&#8217;t do the job.</p>
<p>Sorry, I should&#8217;ve explained more, I&#8217;ve got a movieclip-spawning class that adds custom methods to movieclips at runtime. This allows me to have much more control over animation (Like adding methods that are based on what the movieclip&#8217;s purpose is). You can play nice with AS2 by using custom intrinsic classes. While it adds extra code, animation stutters less than with PercyPea&#8217;s technique because it doesn&#8217;t lock up the code while waiting.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: joa</title>
		<link>http://blog.andre-michelle.com/2005/tight-fps-solution/comment-page-1/#comment-144</link>
		<dc:creator>joa</dc:creator>
		<pubDate>Sat, 09 Jul 2005 17:18:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.andre-michelle.com/2005/tight-fps-solution/#comment-144</guid>
		<description>The only technique I knew before is based on timeouts. There is a tutorial from the mIRC demo-scene (which is really small, hehe).

You can read about it &lt;a href=&quot;http://picwin.scriptsdb.org/viewcontent.php?id=25&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.

It&#039;s all about setting an interval of (1000 / DesiredFPS - deltaT) milliseconds.</description>
		<content:encoded><![CDATA[<p>The only technique I knew before is based on timeouts. There is a tutorial from the mIRC demo-scene (which is really small, hehe).</p>
<p>You can read about it <a href="http://picwin.scriptsdb.org/viewcontent.php?id=25" rel="nofollow">here</a>.</p>
<p>It&#8217;s all about setting an interval of (1000 / DesiredFPS &#8211; deltaT) milliseconds.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: André Michelle</title>
		<link>http://blog.andre-michelle.com/2005/tight-fps-solution/comment-page-1/#comment-143</link>
		<dc:creator>André Michelle</dc:creator>
		<pubDate>Sat, 09 Jul 2005 17:12:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.andre-michelle.com/2005/tight-fps-solution/#comment-143</guid>
		<description>@Staticreator:

Do your script forces the player to wait ?

I don&#039;t get your idea. If you running a fast setInterval, which only broadcast code after a given time, what about playing MovieClips ? Are there running with almost 120FPS ? That is the question, we are talking about.</description>
		<content:encoded><![CDATA[<p>@Staticreator:</p>
<p>Do your script forces the player to wait ?</p>
<p>I don&#8217;t get your idea. If you running a fast setInterval, which only broadcast code after a given time, what about playing MovieClips ? Are there running with almost 120FPS ? That is the question, we are talking about.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Staticreator</title>
		<link>http://blog.andre-michelle.com/2005/tight-fps-solution/comment-page-1/#comment-142</link>
		<dc:creator>Staticreator</dc:creator>
		<pubDate>Fri, 08 Jul 2005 20:05:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.andre-michelle.com/2005/tight-fps-solution/#comment-142</guid>
		<description>I&#039;m not missing the point, it took me a lot of time to come to the conclusion that this was a better way to handle things. When you think about it, it&#039;s the same as the while loop, the method is called repeatedly until the right timing has been reached. The only difference is that things are handled more relaxed, and rendering is smoother. Forcing the player to wait isn&#039;t the idea, your code does a fraction of the work compared to the player, so take as little time as possible.</description>
		<content:encoded><![CDATA[<p>I&#8217;m not missing the point, it took me a lot of time to come to the conclusion that this was a better way to handle things. When you think about it, it&#8217;s the same as the while loop, the method is called repeatedly until the right timing has been reached. The only difference is that things are handled more relaxed, and rendering is smoother. Forcing the player to wait isn&#8217;t the idea, your code does a fraction of the work compared to the player, so take as little time as possible.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: André Michelle</title>
		<link>http://blog.andre-michelle.com/2005/tight-fps-solution/comment-page-1/#comment-141</link>
		<dc:creator>André Michelle</dc:creator>
		<pubDate>Fri, 08 Jul 2005 18:16:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.andre-michelle.com/2005/tight-fps-solution/#comment-141</guid>
		<description>I&#039;ve tried several methods to force the player to wait, but it seems to be impossible to avoid the choppiness in the IE.
Anyway, Firefox was the problem, where the solution runs fine. A browser switch for IE would enhance the player performance for most browsers.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve tried several methods to force the player to wait, but it seems to be impossible to avoid the choppiness in the IE.<br />
Anyway, Firefox was the problem, where the solution runs fine. A browser switch for IE would enhance the player performance for most browsers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomsamson</title>
		<link>http://blog.andre-michelle.com/2005/tight-fps-solution/comment-page-1/#comment-140</link>
		<dc:creator>tomsamson</dc:creator>
		<pubDate>Fri, 08 Jul 2005 18:08:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.andre-michelle.com/2005/tight-fps-solution/#comment-140</guid>
		<description>i´m not convinced of the code snippet. its a nice idea but sadly had way different results on various machines. besides that the loop raises constant cpu requirement a lot on slower machines (which maybe normally could have actually almost reached the target fps).</description>
		<content:encoded><![CDATA[<p>i´m not convinced of the code snippet. its a nice idea but sadly had way different results on various machines. besides that the loop raises constant cpu requirement a lot on slower machines (which maybe normally could have actually almost reached the target fps).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: André Michelle</title>
		<link>http://blog.andre-michelle.com/2005/tight-fps-solution/comment-page-1/#comment-139</link>
		<dc:creator>André Michelle</dc:creator>
		<pubDate>Fri, 08 Jul 2005 15:47:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.andre-michelle.com/2005/tight-fps-solution/#comment-139</guid>
		<description>&gt;...use a streaming sound...

I have tried this on another project, but it failed. If the player needs more time to compute for one frame, it runs choppy again. I have also tried FPS around 12 to make sure, that the player can solve a frame, but also choppy jumps.

I wonder if there is another solution to force the player to wait. Perhaps a nested recursive function won&#039;t decrease the CPU this way.</description>
		<content:encoded><![CDATA[<p>&#38;gt;&#8230;use a streaming sound&#8230;</p>
<p>I have tried this on another project, but it failed. If the player needs more time to compute for one frame, it runs choppy again. I have also tried FPS around 12 to make sure, that the player can solve a frame, but also choppy jumps.</p>
<p>I wonder if there is another solution to force the player to wait. Perhaps a nested recursive function won&#8217;t decrease the CPU this way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: caseyc</title>
		<link>http://blog.andre-michelle.com/2005/tight-fps-solution/comment-page-1/#comment-138</link>
		<dc:creator>caseyc</dc:creator>
		<pubDate>Fri, 08 Jul 2005 15:15:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.andre-michelle.com/2005/tight-fps-solution/#comment-138</guid>
		<description>Static, no offense, but I think you are missing the point...  PercyPea&#039;s script essentially forces the player to &quot;hold&quot; on the current frame until enough time has passed to simulate the framerate. Your setInterval solution will only work if you build everything around it (with event listeners, etc) the beauty of the while loop method is that it doesnt require any modification other than changing the fps and adding the few lines of code.

ps - Andre, have you ever tried to use a streaming sound on the timeline to get a regular framerate? I would be interested to see the results on the mario game.</description>
		<content:encoded><![CDATA[<p>Static, no offense, but I think you are missing the point&#8230;  PercyPea&#8217;s script essentially forces the player to &#8220;hold&#8221; on the current frame until enough time has passed to simulate the framerate. Your setInterval solution will only work if you build everything around it (with event listeners, etc) the beauty of the while loop method is that it doesnt require any modification other than changing the fps and adding the few lines of code.</p>
<p>ps &#8211; Andre, have you ever tried to use a streaming sound on the timeline to get a regular framerate? I would be interested to see the results on the mario game.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Staticreator</title>
		<link>http://blog.andre-michelle.com/2005/tight-fps-solution/comment-page-1/#comment-137</link>
		<dc:creator>Staticreator</dc:creator>
		<pubDate>Fri, 08 Jul 2005 13:37:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.andre-michelle.com/2005/tight-fps-solution/#comment-137</guid>
		<description>Okay, setInterval calls runs code that&#039;s something like this...
&lt;code&gt;
var f:Number = getTimer();
if ((f - lastTime) &gt;= (1000 / frameRate)) {

   // Your code here

   lastTime = f;
}
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Okay, setInterval calls runs code that&#8217;s something like this&#8230;<br />
<code><br />
var f:Number = getTimer();<br />
if ((f - lastTime) &#38;gt;= (1000 / frameRate)) {</p>
<p>   // Your code here</p>
<p>   lastTime = f;<br />
}<br />
</code><code></code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: André Michelle</title>
		<link>http://blog.andre-michelle.com/2005/tight-fps-solution/comment-page-1/#comment-136</link>
		<dc:creator>André Michelle</dc:creator>
		<pubDate>Fri, 08 Jul 2005 11:02:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.andre-michelle.com/2005/tight-fps-solution/#comment-136</guid>
		<description>@Staticreator:

Does setInterval with 0 Milliseconds forces the playing not entering the next frame ?
I have tried some codings, but it doesn´t work.
Any codesnippets would be nice.</description>
		<content:encoded><![CDATA[<p>@Staticreator:</p>
<p>Does setInterval with 0 Milliseconds forces the playing not entering the next frame ?<br />
I have tried some codings, but it doesn´t work.<br />
Any codesnippets would be nice.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tobi</title>
		<link>http://blog.andre-michelle.com/2005/tight-fps-solution/comment-page-1/#comment-135</link>
		<dc:creator>Tobi</dc:creator>
		<pubDate>Fri, 08 Jul 2005 08:54:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.andre-michelle.com/2005/tight-fps-solution/#comment-135</guid>
		<description>I tested it for one of my games. I set global FPS to 120 and the desired framerate to 33,5.

Test results:

Intel/WinXP
IE and Firefox 31.9 fps

Mac/MacOSX
Safari 1.0 13,3 fps (on an old iMac)
Safari 1.3 and Firefox 1.04 33,3 fps (on a Dual G5)

So I think this are very good results, although I don&#039;t quite understand how this script works? Anyone could explain this a little bit deeper, please?</description>
		<content:encoded><![CDATA[<p>I tested it for one of my games. I set global FPS to 120 and the desired framerate to 33,5.</p>
<p>Test results:</p>
<p>Intel/WinXP<br />
IE and Firefox 31.9 fps</p>
<p>Mac/MacOSX<br />
Safari 1.0 13,3 fps (on an old iMac)<br />
Safari 1.3 and Firefox 1.04 33,3 fps (on a Dual G5)</p>
<p>So I think this are very good results, although I don&#8217;t quite understand how this script works? Anyone could explain this a little bit deeper, please?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
