<?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: Understanding the Game Loop</title>
	<atom:link href="http://www.gamepoetry.com/blog/2008/04/18/understanding-the-game-loop/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gamepoetry.com/blog/2008/04/18/understanding-the-game-loop/</link>
	<description>The art, science and business of independent game development</description>
	<lastBuildDate>Wed, 03 Mar 2010 21:22:26 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Antago</title>
		<link>http://www.gamepoetry.com/blog/2008/04/18/understanding-the-game-loop/comment-page-1/#comment-14729</link>
		<dc:creator>Antago</dc:creator>
		<pubDate>Wed, 03 Mar 2010 21:22:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.gamepoetry.com/wpress/2008/04/18/understanding-the-game-loop/#comment-14729</guid>
		<description>&lt;p&gt;This is awesome! I went from having a reallllly slow, unoptimized 3D app in Flash to supporting about twice as much optimization. I can add tons of items at a stage quality of high and it still looks great!&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>This is awesome! I went from having a reallllly slow, unoptimized 3D app in Flash to supporting about twice as much optimization. I can add tons of items at a stage quality of high and it still looks great!</p>

<p>Thanks</p>]]></content:encoded>
	</item>
	<item>
		<title>By: The Basic Controls of a Car &#124; Rasmus Wriedt Larsen - Flash Game Development</title>
		<link>http://www.gamepoetry.com/blog/2008/04/18/understanding-the-game-loop/comment-page-1/#comment-5752</link>
		<dc:creator>The Basic Controls of a Car &#124; Rasmus Wriedt Larsen - Flash Game Development</dc:creator>
		<pubDate>Mon, 03 Aug 2009 09:50:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.gamepoetry.com/wpress/2008/04/18/understanding-the-game-loop/#comment-5752</guid>
		<description>&lt;p&gt;[...] WOW, argh? WTF? Did he just use a ENTER_FRAME event listener? Didn&#8217;t this guy read that frame based code sucks or doesn&#8217;t he understand the game loop? [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] WOW, argh? WTF? Did he just use a ENTER_FRAME event listener? Didn&#8217;t this guy read that frame based code sucks or doesn&#8217;t he understand the game loop? [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Visual Harmonics &#187; Post Topic &#187; Determinism in Game Physics: Culling the Myths</title>
		<link>http://www.gamepoetry.com/blog/2008/04/18/understanding-the-game-loop/comment-page-1/#comment-873</link>
		<dc:creator>Visual Harmonics &#187; Post Topic &#187; Determinism in Game Physics: Culling the Myths</dc:creator>
		<pubDate>Thu, 19 Feb 2009 14:48:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.gamepoetry.com/wpress/2008/04/18/understanding-the-game-loop/#comment-873</guid>
		<description>&lt;p&gt;[...] is in itself can causes errors to creep in, depending on how you implement your timestepping (see this post and read the comments for more on [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] is in itself can causes errors to creep in, depending on how you implement your timestepping (see this post and read the comments for more on [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Nick Wiggill</title>
		<link>http://www.gamepoetry.com/blog/2008/04/18/understanding-the-game-loop/comment-page-1/#comment-856</link>
		<dc:creator>Nick Wiggill</dc:creator>
		<pubDate>Wed, 18 Feb 2009 12:29:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.gamepoetry.com/wpress/2008/04/18/understanding-the-game-loop/#comment-856</guid>
		<description>&lt;p&gt;@ CBridgman,&lt;/p&gt;

&lt;p&gt;Did you by any chance get anywhere with a solution to this? Could you clarify what the end result was, if so? Was it worth it?&lt;/p&gt;

&lt;p&gt;Rgds,&lt;/p&gt;

&lt;p&gt;-Nick&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@ CBridgman,</p>

<p>Did you by any chance get anywhere with a solution to this? Could you clarify what the end result was, if so? Was it worth it?</p>

<p>Rgds,</p>

<p>-Nick</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Cheezeworld &#187; Game Object Creation - The Factory Method</title>
		<link>http://www.gamepoetry.com/blog/2008/04/18/understanding-the-game-loop/comment-page-1/#comment-75</link>
		<dc:creator>Cheezeworld &#187; Game Object Creation - The Factory Method</dc:creator>
		<pubDate>Tue, 09 Dec 2008 10:59:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.gamepoetry.com/wpress/2008/04/18/understanding-the-game-loop/#comment-75</guid>
		<description>&lt;p&gt;[...] the &quot;Root&quot; class to use the Timer class from GamePoetry.com for the game loop. The game loop is now more [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] the &#8220;Root&#8221; class to use the Timer class from GamePoetry.com for the game loop. The game loop is now more [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Panayoti</title>
		<link>http://www.gamepoetry.com/blog/2008/04/18/understanding-the-game-loop/comment-page-1/#comment-34</link>
		<dc:creator>Panayoti</dc:creator>
		<pubDate>Fri, 05 Sep 2008 02:05:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.gamepoetry.com/wpress/2008/04/18/understanding-the-game-loop/#comment-34</guid>
		<description>&lt;p&gt;CBridgman, I sent you an e-mail. I noticed one thing in particular about the code: the interval doesn&#039;t match the FPS - if you have them match, the difference is far less severe, though I will concede there is a noticeable stutter.&lt;/p&gt;

&lt;p&gt;As for the interpolation, you don&#039;t want to do a partial physics step. You want to interpolate between the last two complete physics steps. Essentially you want to render your physics one frame in the past, at a delay of up to the size of the interval. I&#039;ve never actually done it before, but I imagine it will not be accomplished without some amount of sweating.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>CBridgman, I sent you an e-mail. I noticed one thing in particular about the code: the interval doesn&#8217;t match the FPS &#8211; if you have them match, the difference is far less severe, though I will concede there is a noticeable stutter.</p>

<p>As for the interpolation, you don&#8217;t want to do a partial physics step. You want to interpolate between the last two complete physics steps. Essentially you want to render your physics one frame in the past, at a delay of up to the size of the interval. I&#8217;ve never actually done it before, but I imagine it will not be accomplished without some amount of sweating.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Panayoti</title>
		<link>http://www.gamepoetry.com/blog/2008/04/18/understanding-the-game-loop/comment-page-1/#comment-33</link>
		<dc:creator>Panayoti</dc:creator>
		<pubDate>Fri, 05 Sep 2008 00:34:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.gamepoetry.com/wpress/2008/04/18/understanding-the-game-loop/#comment-33</guid>
		<description>&lt;p&gt;Nice work. Something tangible to play with. I&#039;m looking at the code now and will get back to you with my thoughts soon.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Nice work. Something tangible to play with. I&#8217;m looking at the code now and will get back to you with my thoughts soon.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: CBridgman</title>
		<link>http://www.gamepoetry.com/blog/2008/04/18/understanding-the-game-loop/comment-page-1/#comment-32</link>
		<dc:creator>CBridgman</dc:creator>
		<pubDate>Thu, 04 Sep 2008 23:49:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.gamepoetry.com/wpress/2008/04/18/understanding-the-game-loop/#comment-32</guid>
		<description>&lt;p&gt;Hi. In order to illustrate the issue, I modified your code from the &#039;Frame Based Code Sucks!&#039; article. The sample shows what Accumulator based timing looks like versus Delta based timing:
http://www.retrotoast.com/downloads/flash/DeltaVsAccumulatorTiming.html
Code is at:
http://www.retrotoast.com/downloads/flash/DeltaVsAccumulatorTiming.zip&lt;/p&gt;

&lt;p&gt;I&#039;ve reread the last bit of that &#039;Fix your timestep&#039; a few times, and it seems like you make the game intentionally lag by the percentage of a frame that&#039;s in the accumulator by interpolating between the previous frame and the current one. I can understand interpolating a simple straight vector movement from A to B, but it seems like such an approach would have a large number of special cases, which increase with the complexity of your physics. For example, an object is orbiting a point, if you just find the point half way between the previous and current position, that won&#039;t be correct. You&#039;d need to know that in that case, you&#039;re finding half way between a certain amount of movement around a circle. And consider a case where you need to interpolate for an object&#039;s frame based animation, movement vector and rotation of its graphic. I can&#039;t think of a way to do that sort of thing in a generic manner.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi. In order to illustrate the issue, I modified your code from the &#8216;Frame Based Code Sucks!&#8217; article. The sample shows what Accumulator based timing looks like versus Delta based timing:
<a href="http://www.retrotoast.com/downloads/flash/DeltaVsAccumulatorTiming.html" rel="nofollow">http://www.retrotoast.com/downloads/flash/DeltaVsAccumulatorTiming.html</a>
Code is at:
<a href="http://www.retrotoast.com/downloads/flash/DeltaVsAccumulatorTiming.zip" rel="nofollow">http://www.retrotoast.com/downloads/flash/DeltaVsAccumulatorTiming.zip</a></p>

<p>I&#8217;ve reread the last bit of that &#8216;Fix your timestep&#8217; a few times, and it seems like you make the game intentionally lag by the percentage of a frame that&#8217;s in the accumulator by interpolating between the previous frame and the current one. I can understand interpolating a simple straight vector movement from A to B, but it seems like such an approach would have a large number of special cases, which increase with the complexity of your physics. For example, an object is orbiting a point, if you just find the point half way between the previous and current position, that won&#8217;t be correct. You&#8217;d need to know that in that case, you&#8217;re finding half way between a certain amount of movement around a circle. And consider a case where you need to interpolate for an object&#8217;s frame based animation, movement vector and rotation of its graphic. I can&#8217;t think of a way to do that sort of thing in a generic manner.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Panayoti</title>
		<link>http://www.gamepoetry.com/blog/2008/04/18/understanding-the-game-loop/comment-page-1/#comment-31</link>
		<dc:creator>Panayoti</dc:creator>
		<pubDate>Thu, 04 Sep 2008 16:52:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.gamepoetry.com/wpress/2008/04/18/understanding-the-game-loop/#comment-31</guid>
		<description>&lt;p&gt;I need to go back and tear the Fix Your Timestep article apart, but I believe he&#039;s basically presenting interpolation for that partial over step as a means to correct the visual jarring. As I recall he&#039;s interpolating only the visual render state, and not actually trying to do a partial physics step (because that would most certainly break the determinism). I&#039;ve never bothered going as far as doing an interpolation step, because Flash is slow enough as is and I haven&#039;t really experienced the visual jarring effect. Have you tried some level of display-only interpolation? My concern is that it might result in some other visual artifacts that would be worse than any barely noticeable stuttering.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I need to go back and tear the Fix Your Timestep article apart, but I believe he&#8217;s basically presenting interpolation for that partial over step as a means to correct the visual jarring. As I recall he&#8217;s interpolating only the visual render state, and not actually trying to do a partial physics step (because that would most certainly break the determinism). I&#8217;ve never bothered going as far as doing an interpolation step, because Flash is slow enough as is and I haven&#8217;t really experienced the visual jarring effect. Have you tried some level of display-only interpolation? My concern is that it might result in some other visual artifacts that would be worse than any barely noticeable stuttering.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: CBridgman</title>
		<link>http://www.gamepoetry.com/blog/2008/04/18/understanding-the-game-loop/comment-page-1/#comment-30</link>
		<dc:creator>CBridgman</dc:creator>
		<pubDate>Thu, 04 Sep 2008 10:42:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.gamepoetry.com/wpress/2008/04/18/understanding-the-game-loop/#comment-30</guid>
		<description>&lt;p&gt;Hi, cool article, but it seems to stop a bit short of the ideal situation. In the &#039;Fix your timestep&#039; article you reference, a visual problem with this implementation is described. It&#039;s to do with your accumulator&#039;s remainder slowly growing or shrinking in such a way that when a frame is rendered, one extra step, or one less step is executed than normal.&lt;/p&gt;

&lt;p&gt;This results in a fairly regular visual &#039;jarring&#039; effect (which is more apparent on faster moving objects) on object movement, which doesn&#039;t occur if you process the full accumulated amount per frame. Even with frame based, this is less of an issue as your FPS generally hovers around the same amount (assuming you cap it at a reasonable value, like 30fps).&lt;/p&gt;

&lt;p&gt;The description on how to address this in the &#039;Fix your timestep&#039; article is a bit cryptic, so I am still unsure as to how one solves this problem. Processing the remainder after all full intervals have been processed will solve the problem, but breaks the determinism. One could try and &#039;temporarily&#039; apply the remainder of movement, then roll it back and process it in a full interval the next frame, but that sounds very messy to me, since you&#039;d need to run all game logic just like a full interval, and you may have collisions which occur and set off a whole chain of events in the game. Do you have any suggestions on how to tackle this problem?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi, cool article, but it seems to stop a bit short of the ideal situation. In the &#8216;Fix your timestep&#8217; article you reference, a visual problem with this implementation is described. It&#8217;s to do with your accumulator&#8217;s remainder slowly growing or shrinking in such a way that when a frame is rendered, one extra step, or one less step is executed than normal.</p>

<p>This results in a fairly regular visual &#8216;jarring&#8217; effect (which is more apparent on faster moving objects) on object movement, which doesn&#8217;t occur if you process the full accumulated amount per frame. Even with frame based, this is less of an issue as your FPS generally hovers around the same amount (assuming you cap it at a reasonable value, like 30fps).</p>

<p>The description on how to address this in the &#8216;Fix your timestep&#8217; article is a bit cryptic, so I am still unsure as to how one solves this problem. Processing the remainder after all full intervals have been processed will solve the problem, but breaks the determinism. One could try and &#8216;temporarily&#8217; apply the remainder of movement, then roll it back and process it in a full interval the next frame, but that sounds very messy to me, since you&#8217;d need to run all game logic just like a full interval, and you may have collisions which occur and set off a whole chain of events in the game. Do you have any suggestions on how to tackle this problem?</p>]]></content:encoded>
	</item>
</channel>
</rss>

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