<?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: Implementing a game loop in Silverlight 1.1 Alpha</title>
	<atom:link href="http://mailowl.co.za/2007/05/05/implementing-a-game-loop-in-silverlight-11-alpha/feed/" rel="self" type="application/rss+xml" />
	<link>http://mailowl.co.za/2007/05/05/implementing-a-game-loop-in-silverlight-11-alpha/</link>
	<description>The most misguided blog since April 2004</description>
	<lastBuildDate>Mon, 19 Apr 2010 11:52:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: James Noble</title>
		<link>http://mailowl.co.za/2007/05/05/implementing-a-game-loop-in-silverlight-11-alpha/comment-page-1/#comment-10869</link>
		<dc:creator>James Noble</dc:creator>
		<pubDate>Mon, 25 Jun 2007 19:09:42 +0000</pubDate>
		<guid isPermaLink="false">http://mailowl.co.za/wordpress/?p=136#comment-10869</guid>
		<description>Hi,

I implemented a game loop similar to the storyboard engine in your examples (except using C#, so if anything it should be faster). For a light load, it works great, but when I try to do something more practical with it, it chokes badly.

I am having two problems:

1. If a single frame takes too long to update (seems like about &gt; 50ms), the whole game sputters and goes through clumps of unresponsiveness, sometimes for nearly a minute at a time! Interestingly, adding a GC.Collect() call in the update loop smooths some of it out, and if I set an interval in the storyboard that is greater than the time it takes to update a frame, performance becomes uniform again (albeit bad).

2. Problem 1 isn&#039;t so bad, since it really shouldn&#039;t take more than 50 ms to render a frame, right? Well I have a collection of Image controls representing the game board and sprites in my game... using transparency encoded .PNGs. If I leave them all stationary, everything is fine. I can even animate a few of them (~10 per frame) without performance impact. But once I start trying to move too many of them around (15-20 per frame) the performance drops sharply. I have tried setting their position both with the Left/Top properties, and with a TranslateTransform, but the result is the same -- bad.. really bad.

Any idea why this could be?

Have you had any success animating 20+ image-based sprites?</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I implemented a game loop similar to the storyboard engine in your examples (except using C#, so if anything it should be faster). For a light load, it works great, but when I try to do something more practical with it, it chokes badly.</p>
<p>I am having two problems:</p>
<p>1. If a single frame takes too long to update (seems like about &gt; 50ms), the whole game sputters and goes through clumps of unresponsiveness, sometimes for nearly a minute at a time! Interestingly, adding a GC.Collect() call in the update loop smooths some of it out, and if I set an interval in the storyboard that is greater than the time it takes to update a frame, performance becomes uniform again (albeit bad).</p>
<p>2. Problem 1 isn&#8217;t so bad, since it really shouldn&#8217;t take more than 50 ms to render a frame, right? Well I have a collection of Image controls representing the game board and sprites in my game&#8230; using transparency encoded .PNGs. If I leave them all stationary, everything is fine. I can even animate a few of them (~10 per frame) without performance impact. But once I start trying to move too many of them around (15-20 per frame) the performance drops sharply. I have tried setting their position both with the Left/Top properties, and with a TranslateTransform, but the result is the same &#8212; bad.. really bad.</p>
<p>Any idea why this could be?</p>
<p>Have you had any success animating 20+ image-based sprites?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
