<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.silverlight.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Silverlight Tip of the Day #30: Fast Sprite Animation in Silverlight</title><link>http://blogs.silverlight.net/blogs/msnow/archive/2008/08/20/tip-of-the-day-30-fast-sprite-animation-in-silverlight.aspx</link><description>For this tutorial I will be demonstrating how to create a fast, optimized Sprite animation class. In my demo, you will be able to: Increase the speed of the sprites. Increase the count of the sprites. To stress the sprites further, I have added random</description><dc:language>en</dc:language><generator>CommunityServer 2007 (Build: 20416.853)</generator><item><title>re: Silverlight Tip of the Day #30: Fast Sprite Animation in Silverlight</title><link>http://blogs.silverlight.net/blogs/msnow/archive/2008/08/20/tip-of-the-day-30-fast-sprite-animation-in-silverlight.aspx#232194</link><pubDate>Thu, 11 Jun 2009 17:41:29 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:232194</guid><dc:creator>mike.snow</dc:creator><description>&lt;p&gt;Yes, replace them with single quotes. Bug in the blog tool.&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=232194" width="1" height="1"&gt;</description></item><item><title>re: Silverlight Tip of the Day #30: Fast Sprite Animation in Silverlight</title><link>http://blogs.silverlight.net/blogs/msnow/archive/2008/08/20/tip-of-the-day-30-fast-sprite-animation-in-silverlight.aspx#232192</link><pubDate>Thu, 11 Jun 2009 17:35:15 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:232192</guid><dc:creator>br1</dc:creator><description>&lt;p&gt;There are emoticons in the code.&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=232192" width="1" height="1"&gt;</description></item><item><title>jin_u as blog  &amp;raquo; Blog Archive   &amp;raquo; ??????????????? ??? ??????</title><link>http://blogs.silverlight.net/blogs/msnow/archive/2008/08/20/tip-of-the-day-30-fast-sprite-animation-in-silverlight.aspx#160818</link><pubDate>Thu, 15 Jan 2009 01:57:40 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:160818</guid><dc:creator>jin_u as blog  » Blog Archive   » ??????????????? ??? ??????</dc:creator><description>&lt;p&gt;Pingback from &amp;nbsp;jin_u as blog &amp;nbsp;&amp;amp;raquo; Blog Archive &amp;nbsp; &amp;amp;raquo; ??????????????? ??? ??????&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=160818" width="1" height="1"&gt;</description></item><item><title>presentão de Ano Novo: dúzias de dicas e tutoriais de Silverlight ;)</title><link>http://blogs.silverlight.net/blogs/msnow/archive/2008/08/20/tip-of-the-day-30-fast-sprite-animation-in-silverlight.aspx#155345</link><pubDate>Sat, 03 Jan 2009 11:24:54 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:155345</guid><dc:creator>o UAU nosso de cada dia</dc:creator><description>&lt;p&gt;essa lista eu copiei desse blog b&amp;#225;rbaro (acompanhe por RSS voc&amp;#234; tamb&amp;#233;m): uma lista de dicas super &amp;#250;teis&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=155345" width="1" height="1"&gt;</description></item><item><title>Silverlight Tips of the Day - Summary Outline</title><link>http://blogs.silverlight.net/blogs/msnow/archive/2008/08/20/tip-of-the-day-30-fast-sprite-animation-in-silverlight.aspx#155086</link><pubDate>Fri, 02 Jan 2009 22:56:16 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:155086</guid><dc:creator>Silverlight Tips of the Day - Blog by Mike Snow</dc:creator><description>&lt;p&gt;The purpose of this post is to create an outline summary all the blogs from my Silverlight tips of the&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=155086" width="1" height="1"&gt;</description></item><item><title>Recent Links Tagged With "fast" - JabberTags</title><link>http://blogs.silverlight.net/blogs/msnow/archive/2008/08/20/tip-of-the-day-30-fast-sprite-animation-in-silverlight.aspx#90785</link><pubDate>Fri, 12 Sep 2008 19:34:05 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:90785</guid><dc:creator>Recent Links Tagged With "fast" - JabberTags</dc:creator><description>&lt;p&gt;Pingback from &amp;nbsp;Recent Links Tagged With &amp;quot;fast&amp;quot; - JabberTags&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=90785" width="1" height="1"&gt;</description></item><item><title>Silverlight Tips of the Day – Week 5</title><link>http://blogs.silverlight.net/blogs/msnow/archive/2008/08/20/tip-of-the-day-30-fast-sprite-animation-in-silverlight.aspx#84065</link><pubDate>Tue, 26 Aug 2008 18:57:07 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:84065</guid><dc:creator>News</dc:creator><description>&lt;p&gt;Silverlight Tip of the Day #32 Title : How to Declare a Custom User Control from a XAML Page. Demo :&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=84065" width="1" height="1"&gt;</description></item><item><title>Silverlight Tips of the Day – Week 5</title><link>http://blogs.silverlight.net/blogs/msnow/archive/2008/08/20/tip-of-the-day-30-fast-sprite-animation-in-silverlight.aspx#84024</link><pubDate>Tue, 26 Aug 2008 17:13:56 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:84024</guid><dc:creator>Visual Web Developer Team Blog</dc:creator><description>&lt;p&gt;Silverlight Tip of the Day #32 &amp;amp;#160; Title : How to Declare a Custom User Control from a XAML Page.&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=84024" width="1" height="1"&gt;</description></item><item><title>Silverlight Cream for August 21, 2008 -- #353</title><link>http://blogs.silverlight.net/blogs/msnow/archive/2008/08/20/tip-of-the-day-30-fast-sprite-animation-in-silverlight.aspx#82828</link><pubDate>Fri, 22 Aug 2008 06:43:09 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:82828</guid><dc:creator>Community Blogs</dc:creator><description>&lt;p&gt;Page Brooks with CoolMenu and Custom Collections for Controls, Bill Reiss on Calling WCF on local server&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=82828" width="1" height="1"&gt;</description></item><item><title>re: Tip of the Day #30: Fast Sprite Animation in Silverlight</title><link>http://blogs.silverlight.net/blogs/msnow/archive/2008/08/20/tip-of-the-day-30-fast-sprite-animation-in-silverlight.aspx#82738</link><pubDate>Thu, 21 Aug 2008 22:01:30 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:82738</guid><dc:creator>mike.snow</dc:creator><description>&lt;p&gt;As soon as I set more than one Image to the same RotateTransform the images failed to rotate.&lt;/p&gt;
&lt;p&gt;Let me know if you see otherwise with RotateTransform.&lt;/p&gt;
&lt;p&gt;Here is my code:&lt;/p&gt;
&lt;p&gt;public partial class Page : UserControl&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;RotateTransform rt = new RotateTransform();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;private Storyboard _gameLoop = new Storyboard();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public Page()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;InitializeComponent();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;rt.CenterX = 32;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;rt.CenterY = 24;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Image1.RenderTransform = rt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Image2.RenderTransform = rt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this.Loaded += new RoutedEventHandler(Page_Loaded);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void Page_Loaded(object sender, RoutedEventArgs e)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_gameLoop.Duration = TimeSpan.FromMilliseconds(0);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_gameLoop.Completed += new EventHandler(MainGameLoop);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_gameLoop.Begin();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;private void MainGameLoop(object sender, EventArgs e)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;rt.Angle += 5;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;rt.Transform(new Point(32, 24));&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_gameLoop.Begin();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=82738" width="1" height="1"&gt;</description></item><item><title>re: Tip of the Day #30: Fast Sprite Animation in Silverlight</title><link>http://blogs.silverlight.net/blogs/msnow/archive/2008/08/20/tip-of-the-day-30-fast-sprite-animation-in-silverlight.aspx#82714</link><pubDate>Thu, 21 Aug 2008 20:47:28 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:82714</guid><dc:creator>syntax42</dc:creator><description>&lt;p&gt;I dont have my code right here, but im pretty sure i have several images that share the same ScaleTransform. That way i can scale them all uniformly by setting the ScaleX and ScaleY of that one ScaleTransform. I would suspect the same would be true for the RotateTransform?&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=82714" width="1" height="1"&gt;</description></item><item><title>re: Tip of the Day #30: Fast Sprite Animation in Silverlight</title><link>http://blogs.silverlight.net/blogs/msnow/archive/2008/08/20/tip-of-the-day-30-fast-sprite-animation-in-silverlight.aspx#82676</link><pubDate>Thu, 21 Aug 2008 18:07:47 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:82676</guid><dc:creator>mike.snow</dc:creator><description>&lt;p&gt;syntax42 - Each image must have its own render transform, in Silverlight you can not share this object. Also, it would be needed if you want the images to rotate independently of each other at different angles.&lt;/p&gt;
&lt;p&gt;chrisaswain - I went back and tried the Sprite class as a UserControl (Sprite.xaml + Sprite.cs) and as a custom Control (just Sprite.cs with template) and I found the FPS to be the same for both.&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=82676" width="1" height="1"&gt;</description></item><item><title>Post: 169</title><link>http://blogs.silverlight.net/blogs/msnow/archive/2008/08/20/tip-of-the-day-30-fast-sprite-animation-in-silverlight.aspx#82663</link><pubDate>Thu, 21 Aug 2008 16:51:36 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:82663</guid><dc:creator>Mirrored Blogs</dc:creator><description>&lt;p&gt;Post: Approved at: Aug-21-2008 Linux &amp;amp;amp; Silverlight Microsoft and Novell expanding their partnership&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=82663" width="1" height="1"&gt;</description></item><item><title>Silverlight news for August 21, 2008</title><link>http://blogs.silverlight.net/blogs/msnow/archive/2008/08/20/tip-of-the-day-30-fast-sprite-animation-in-silverlight.aspx#82648</link><pubDate>Thu, 21 Aug 2008 14:55:42 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:82648</guid><dc:creator>Silverlight news for August 21, 2008</dc:creator><description>&lt;p&gt;Pingback from &amp;nbsp;Silverlight news for August 21, 2008&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=82648" width="1" height="1"&gt;</description></item><item><title>re: Tip of the Day #30: Fast Sprite Animation in Silverlight</title><link>http://blogs.silverlight.net/blogs/msnow/archive/2008/08/20/tip-of-the-day-30-fast-sprite-animation-in-silverlight.aspx#82636</link><pubDate>Thu, 21 Aug 2008 14:30:02 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:82636</guid><dc:creator>chrisaswain</dc:creator><description>&lt;p&gt;I'm not sure I understand the benefit of the sprite inheriting from Control instead of the typical UserControl. &amp;nbsp;You seem to imply it's for performance. &amp;nbsp;Could you elaborate on that?&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=82636" width="1" height="1"&gt;</description></item></channel></rss>