<?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: Game loop updating &#8211; and physics.</title>
	<atom:link href="http://geekspeak.creatrixgames.com/game-loop-updating-and-physics.html/feed" rel="self" type="application/rss+xml" />
	<link>http://geekspeak.creatrixgames.com/game-loop-updating-and-physics.html</link>
	<description>Flash, Java, and Unity game development blog with a focus on business and marketing.</description>
	<lastBuildDate>Fri, 03 Sep 2010 01:49:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: jason</title>
		<link>http://geekspeak.creatrixgames.com/game-loop-updating-and-physics.html/comment-page-1#comment-79</link>
		<dc:creator>jason</dc:creator>
		<pubDate>Sun, 12 Apr 2009 14:57:25 +0000</pubDate>
		<guid isPermaLink="false">http://geekspeak.creatrixgames.com/?p=25#comment-79</guid>
		<description>Hey tavis, thanks for posting your work. Your demo is very smooth here (FireFox 3), so you&#039;re doing something right!

The main problem with physics and variable frame rates is, of course, that you might get collision tunneling. I was seeing some of that even just when walking around (popping through walls in certain cases).

Flash has really inconsistent timing because it defers its CPU usage to the system so that Flash won&#039;t choke things up. Imagine a web page with 4 or 6 Flash ads running, each hogging the CPU. Good for Flash ad behavior, but not good for games. And not likely to change, so we&#039;ll have to work with it.

Good luck with your games!</description>
		<content:encoded><![CDATA[<p>Hey tavis, thanks for posting your work. Your demo is very smooth here (FireFox 3), so you&#8217;re doing something right!</p>
<p>The main problem with physics and variable frame rates is, of course, that you might get collision tunneling. I was seeing some of that even just when walking around (popping through walls in certain cases).</p>
<p>Flash has really inconsistent timing because it defers its CPU usage to the system so that Flash won&#8217;t choke things up. Imagine a web page with 4 or 6 Flash ads running, each hogging the CPU. Good for Flash ad behavior, but not good for games. And not likely to change, so we&#8217;ll have to work with it.</p>
<p>Good luck with your games!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tavis</title>
		<link>http://geekspeak.creatrixgames.com/game-loop-updating-and-physics.html/comment-page-1#comment-78</link>
		<dc:creator>tavis</dc:creator>
		<pubDate>Sun, 12 Apr 2009 00:58:26 +0000</pubDate>
		<guid isPermaLink="false">http://geekspeak.creatrixgames.com/?p=25#comment-78</guid>
		<description>Heya, stumbled across your post while googling as I&#039;m writing my first tile engine in as3 at the moment. I was playing with scrolling and wanted to make sure I was getting a smooth effect; I&#039;ve ended up with this:

http://tinyrobot.co.uk/experiments/tiledscroller/

which I&#039;m happy with so far, although in IE I had a pause every couple of seconds... I had a look at box2dflash&#039;s source and noticed that they listened to the ENTER_FRAME event and simply blocked in the FRateLimiter class, I copied this method and it seems to smooth out IE a bit while unfortunately destabilizing the &#039;physics&#039; of my little test. So personally I think I&#039;m going to stick with the gaffer, since Firefox and standalone players work fine for me; I&#039;d also like to note that I ported the same demo to pulpcore (http://www.interactivepulp.com/pulpcore/), with very smooth results across both browsers... so if you want to check out the sauce, give me a shout! Demo is here: http://tinyrobot.co.uk/experiments/pulptiledscroller/

Having said all that, locking updates and renders to, say, 30fps still looks ok to me; it&#039;s only in situations like your own (with fast moving objects, for example) that I think there&#039;s a general problem - so far my best looking solution is pulpcore, with framerate set to 100 and a fixed timestep of 10ms or below. Sorry to ramble on, I&#039;ve been having similar irritations to yours for a couple of days now :)</description>
		<content:encoded><![CDATA[<p>Heya, stumbled across your post while googling as I&#8217;m writing my first tile engine in as3 at the moment. I was playing with scrolling and wanted to make sure I was getting a smooth effect; I&#8217;ve ended up with this:</p>
<p><a href="http://tinyrobot.co.uk/experiments/tiledscroller/" rel="nofollow">http://tinyrobot.co.uk/experiments/tiledscroller/</a></p>
<p>which I&#8217;m happy with so far, although in IE I had a pause every couple of seconds&#8230; I had a look at box2dflash&#8217;s source and noticed that they listened to the ENTER_FRAME event and simply blocked in the FRateLimiter class, I copied this method and it seems to smooth out IE a bit while unfortunately destabilizing the &#8216;physics&#8217; of my little test. So personally I think I&#8217;m going to stick with the gaffer, since Firefox and standalone players work fine for me; I&#8217;d also like to note that I ported the same demo to pulpcore (<a href="http://www.interactivepulp.com/pulpcore/" rel="nofollow">http://www.interactivepulp.com/pulpcore/</a>), with very smooth results across both browsers&#8230; so if you want to check out the sauce, give me a shout! Demo is here: <a href="http://tinyrobot.co.uk/experiments/pulptiledscroller/" rel="nofollow">http://tinyrobot.co.uk/experiments/pulptiledscroller/</a></p>
<p>Having said all that, locking updates and renders to, say, 30fps still looks ok to me; it&#8217;s only in situations like your own (with fast moving objects, for example) that I think there&#8217;s a general problem &#8211; so far my best looking solution is pulpcore, with framerate set to 100 and a fixed timestep of 10ms or below. Sorry to ramble on, I&#8217;ve been having similar irritations to yours for a couple of days now <img src='http://geekspeak.creatrixgames.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jason</title>
		<link>http://geekspeak.creatrixgames.com/game-loop-updating-and-physics.html/comment-page-1#comment-9</link>
		<dc:creator>jason</dc:creator>
		<pubDate>Tue, 02 Dec 2008 15:26:59 +0000</pubDate>
		<guid isPermaLink="false">http://geekspeak.creatrixgames.com/?p=25#comment-9</guid>
		<description>I actually implemented his interpolation solution, but it didn&#039;t solve the issue for me. It&#039;s very possible that I just did it wrong. :) But also I think we&#039;re talking about jumps that are too big for 1 frame of interpolation to cover up. The motion can jump 5 or 6 pixels in some frames, so it still ends up jittery.

I don&#039;t know if it&#039;s the browser or what, but Flash can&#039;t keep a steady framerate to save it&#039;s butt. The tick times are all over the place, like 16ms, 27ms, 53ms, 34ms, 18ms, 60ms, etc. I graphed it out in debug output to help me visualize while diagnosing the problem(s) and the line was like vicious monster fangs, very jagged.

So, after wasting too much time spinning my wheels, I just framelocked and I&#039;m moving on until I get more time later.</description>
		<content:encoded><![CDATA[<p>I actually implemented his interpolation solution, but it didn&#8217;t solve the issue for me. It&#8217;s very possible that I just did it wrong. <img src='http://geekspeak.creatrixgames.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  But also I think we&#8217;re talking about jumps that are too big for 1 frame of interpolation to cover up. The motion can jump 5 or 6 pixels in some frames, so it still ends up jittery.</p>
<p>I don&#8217;t know if it&#8217;s the browser or what, but Flash can&#8217;t keep a steady framerate to save it&#8217;s butt. The tick times are all over the place, like 16ms, 27ms, 53ms, 34ms, 18ms, 60ms, etc. I graphed it out in debug output to help me visualize while diagnosing the problem(s) and the line was like vicious monster fangs, very jagged.</p>
<p>So, after wasting too much time spinning my wheels, I just framelocked and I&#8217;m moving on until I get more time later.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Schell</title>
		<link>http://geekspeak.creatrixgames.com/game-loop-updating-and-physics.html/comment-page-1#comment-8</link>
		<dc:creator>Schell</dc:creator>
		<pubDate>Tue, 02 Dec 2008 04:51:05 +0000</pubDate>
		<guid isPermaLink="false">http://geekspeak.creatrixgames.com/?p=25#comment-8</guid>
		<description>What about Glen&#039;s [gafferongames] interpolation approach?</description>
		<content:encoded><![CDATA[<p>What about Glen&#8217;s [gafferongames] interpolation approach?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jason</title>
		<link>http://geekspeak.creatrixgames.com/game-loop-updating-and-physics.html/comment-page-1#comment-7</link>
		<dc:creator>jason</dc:creator>
		<pubDate>Tue, 02 Dec 2008 04:27:51 +0000</pubDate>
		<guid isPermaLink="false">http://geekspeak.creatrixgames.com/?p=25#comment-7</guid>
		<description>It was a harrowing couple of days until I decided I was beyond a point of diminishing returns and just did the frame locking. I will be coming back to this problem later, though. Maybe not for this game, but definitely in other ones since they&#039;ll all use this same game engine.

Thanks for reading! :)</description>
		<content:encoded><![CDATA[<p>It was a harrowing couple of days until I decided I was beyond a point of diminishing returns and just did the frame locking. I will be coming back to this problem later, though. Maybe not for this game, but definitely in other ones since they&#8217;ll all use this same game engine.</p>
<p>Thanks for reading! <img src='http://geekspeak.creatrixgames.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jesus A.L.</title>
		<link>http://geekspeak.creatrixgames.com/game-loop-updating-and-physics.html/comment-page-1#comment-6</link>
		<dc:creator>Jesus A.L.</dc:creator>
		<pubDate>Tue, 02 Dec 2008 03:15:34 +0000</pubDate>
		<guid isPermaLink="false">http://geekspeak.creatrixgames.com/?p=25#comment-6</guid>
		<description>It sounds like an awful amount of head-scratches to me. Thanks for the &quot;linky goodness.&quot; It was an informative read on what you have been going through.</description>
		<content:encoded><![CDATA[<p>It sounds like an awful amount of head-scratches to me. Thanks for the &#8220;linky goodness.&#8221; It was an informative read on what you have been going through.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.278 seconds -->
