<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Project Splot</title>
		<link>http://www.allegro.cc/forums/view/610160</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Mon, 07 May 2012 22:02:35 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hey,</p><p>I&#39;m curious as to how good the performance of my graphics rendering pipeline is. Everything displayed is resolution independent, but that comes at a cost! You&#39;ll need an OpenGL 3.3 capable card, so basically anything 8600 GTX and up I think (as far as nVidia is concerned). The engine also depends on the .NET Framework 4 Client Profile.</p><p>What I&#39;m looking for is the FPS. For example, on my netbook with an Atom processor and an ION graphics card, I get 15 FPS at 640 x 480 (the default settings). On my desktop I get a silky smooth 60 FPS at HD resolution (nVidia 560 Ti and an early Core i7).</p><p>If you could provide your graphics card, processor, and the FPS you get, as well as the graphics settings (edit Graphics.xml in the root directory to change the defaults), I&#39;d be very pleased!</p><p>Here is a screenshot:</p><p><span class="remote-thumbnail"><span class="json">{"name":"605983","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/a\/7\/a7d026f9de3364136eab999ed916682f.png","w":656,"h":518,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/a\/7\/a7d026f9de3364136eab999ed916682f"}</span><img src="http://www.allegro.cc//djungxnpq2nug.cloudfront.net/image/cache/a/7/a7d026f9de3364136eab999ed916682f-240.jpg" alt="605983" width="240" height="189" /></span></p><p>The game is attached.</p><p>WASD moves around, and that&#39;s all there is right now. Thanks for looking <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Erin Maus)</author>
		<pubDate>Fri, 04 May 2012 11:22:59 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Macbook Pro 2.4 GHz with Nvidia Geforce 9400m. 256MB VRAM.<br />Windows 7 32 bit.<br />I had between 51 and 60 FPS depending on where I was relative to the clouds. I guess the clouds were making me a bit fill limited.</p><p>I did not edit the graphics settings.</p><p>One of my 2 cores was constantly on 100%.</p><p>BTW this is awesome, really nice job!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (jmasterx)</author>
		<pubDate>Fri, 04 May 2012 16:54:42 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>^ seems to me you have some tuning to do if the above spec can barely manage 60fps....
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Fri, 04 May 2012 17:10:33 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I was fiddling with an A5 prog a couple weeks ago and it was taking up one core, it was using the timer to limit al_flip_display() to 60 fps but since it simply skipped that part, it was still running full out going through the event loop.  I had to put a calculated al_rest() into it to get it down to approximately idle.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Arthur Kalliokoski)</author>
		<pubDate>Fri, 04 May 2012 17:22:57 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thought this thread was going to be about <a href="http://thesplot.com/site/home.php">this</a> ...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (23yrold3yrold)</author>
		<pubDate>Fri, 04 May 2012 21:19:09 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thanks for the feedback everyone. I have improved the rendering pipeline. Now it doesn&#39;t create unnecessary stage changes when drawing all the grass and so on by batching the calls based on depth. The engine also stores the &quot;render descriptions&quot; instead of recreating them every frame, which should produce much less garbage for the GC to consume.</p><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/610160/954166#target">jmasterx</a> said:</div><div class="quote"><p>Macbook Pro 2.4 GHz with Nvidia Geforce 9400m. 256MB VRAM.<br />Windows 7 32 bit.<br />I had between 51 and 60 FPS depending on where I was relative to the clouds. I guess the clouds were making me a bit fill limited.I did not edit the graphics settings.One of my 2 cores was constantly on 100%.BTW this is awesome, really nice job!
</p></div></div><p>

Thanks! Is there any way you could increase the resolution or set it to fullscreen, in order to see if the problem is fill rate? You can use ESC to quit if you try it fullscreen. I attached a more optimized version, so please try that if you can. I get an extra 2-4 FPS on my netbook.</p><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/610160/954167#target">Neil Walker</a> said:</div><div class="quote"><p> seems to me you have some tuning to do if the above spec can barely manage 60fps....</p></div></div><p>

The problem is that older cards will truly have a harder time with my rendering pipeline. I am trying to ensure that it&#39;s as fast as it can be, but the limitation is the speed a shader can execute. My game may not look like Crysis, but resolution-independent graphics do require a capable GPU.</p><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/610160/954169#target">Arthur Kalliokoski</a> said:</div><div class="quote"><p>I was fiddling with an A5 prog a couple weeks ago and it was taking up one core, it was using the timer to limit al_flip_display() to 60 fps but since it simply skipped that part, it was still running full out going through the event loop.  I had to put a calculated al_rest() into it to get it down to approximately idle.</p></div></div><p>

I&#39;ll see if this relates to the high CPU usage that my game seems to require! Thanks.</p><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/610160/954178#target">23yrold3yrold</a> said:</div><div class="quote"><p>Thought this thread was going to be about this [thesplot.com] ...</p></div></div><p>

Luckily &quot;Project Splot&quot; is a mere code name... Thanks for pointing that out.</p><p>Oh, and if anyone is interested, here is what the demo looks like at max:</p><p><span class="remote-thumbnail"><span class="json">{"name":"605987","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/b\/1\/b1a30e77392906be0588ce7cf285e64c.png","w":1920,"h":1080,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/b\/1\/b1a30e77392906be0588ce7cf285e64c"}</span><img src="http://www.allegro.cc//djungxnpq2nug.cloudfront.net/image/cache/b/1/b1a30e77392906be0588ce7cf285e64c-240.jpg" alt="605987" width="240" height="135" /></span>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Erin Maus)</author>
		<pubDate>Fri, 04 May 2012 23:46:26 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>With new version:</p><p>@640x480, a pretty steady 58-60 FPS.</p><p>@1280x800 FS, around 22-25 FPS.</p><p>I think you had mentioned you use shaders to do the 2D so that might also be hurting performance on mid range cards like mine.</p><p>On my PC, GTX 275 Quad Core  i5, smooth 60FPS @1920x1080.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (jmasterx)</author>
		<pubDate>Sat, 05 May 2012 00:09:45 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/610160/954183#target">Aaron Bolyard</a> said:</div><div class="quote"><p>I&#39;ll see if this relates to the high CPU usage that my game seems to require! Thanks.</p></div></div><p>Do something similar to what&#39;s on the wiki example. let al_wait_for_event actually wait, and then you won&#39;t be using up excess cpu.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Sat, 05 May 2012 00:26:48 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I follow the example perfectly as far as I can tell. Here is my main loop:</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">while</span> <span class="k2">(</span>isRunning<span class="k2">)</span>
<span class="k2">{</span>
  AllegroMethods.al_wait_for_event<span class="k2">(</span>queue, ref e<span class="k2">)</span><span class="k2">;</span>
  AllegroEventType type <span class="k3">=</span> <span class="k2">(</span>AllegroEventType<span class="k2">)</span>e.type<span class="k2">;</span>

  <span class="k1">switch</span> <span class="k2">(</span>type<span class="k2">)</span>
  <span class="k2">{</span>
    ...
  <span class="k2">}</span>

  <span class="k1">if</span> <span class="k2">(</span>AllegroMethods.al_is_event_queue_empty<span class="k2">(</span>queue<span class="k2">)</span> <span class="k3">!</span><span class="k3">=</span> <span class="n">0</span> <span class="k3">&amp;</span><span class="k3">&amp;</span> wasUpdated<span class="k2">)</span>
    Draw<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="k2">}</span>
</pre></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Erin Maus)</author>
		<pubDate>Sat, 05 May 2012 00:53:32 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>GeForce 560Ti, Win 7 64bit, steady 60 FPS at any resolution, although I noticed a few momentary slowdowns (which weren&#39;t reflected by FPS counter).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Max Savenkov)</author>
		<pubDate>Sat, 05 May 2012 01:02:25 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/610160/954187#target">Aaron Bolyard</a> said:</div><div class="quote"><p>I follow the example perfectly as far as I can tell.</p></div></div><p>I guess it then depends on how and where you set <span class="source-code">wasUpdated</span>. If you do it too often, you may have some issues.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Sat, 05 May 2012 01:20:21 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>In my game I check for too many timer events in addition:
</p><div class="source-code"><div class="toolbar"><span class="button numbers"><b>#</b></span><span class="button select">Select</span><span class="button expand">Expand</span></div><div class="inner"><span class="number">  1</span><span class="k1">void</span> SceneManager::run<span class="k2">(</span><span class="k2">)</span>
<span class="number">  2</span>  <span class="k2">{</span>  
<span class="number">  3</span>    <a href="http://www.allegro.cc/manual/al_start_timer"><span class="a">al_start_timer</span></a><span class="k2">(</span>m_gameTimer<span class="k2">)</span><span class="k2">;</span>
<span class="number">  4</span>
<span class="number">  5</span>    <span class="c">//is the event handled?</span>
<span class="number">  6</span>    <span class="k1">bool</span> handled <span class="k3">=</span> <span class="k1">false</span><span class="k2">;</span>
<span class="number">  7</span>    <a href="http://www.allegro.cc/manual/ALLEGRO_EVENT"><span class="a">ALLEGRO_EVENT</span></a> next<span class="k2">;</span>
<span class="number">  8</span>
<span class="number">  9</span>    <span class="c">//main loop</span>
<span class="number"> 10</span>    <span class="k1">while</span><span class="k2">(</span>m_gameIsRunning<span class="k2">)</span>
<span class="number"> 11</span>    <span class="k2">{</span>
<span class="number"> 12</span>      handled <span class="k3">=</span> <span class="k1">false</span><span class="k2">;</span>
<span class="number"> 13</span>      <a href="http://www.allegro.cc/manual/al_wait_for_event"><span class="a">al_wait_for_event</span></a><span class="k2">(</span>queue,<span class="k3">&amp;</span>evt<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 14</span>
<span class="number"> 15</span>      <span class="k1">bool</span> hasNext <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_peek_next_event"><span class="a">al_peek_next_event</span></a><span class="k2">(</span>queue,<span class="k3">&amp;</span>next<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 16</span>      <span class="k1">if</span><span class="k2">(</span>hasNext <span class="k3">&amp;</span><span class="k3">&amp;</span> next.type <span class="k3">=</span><span class="k3">=</span> ALLEGRO_EVENT_TIMER<span class="k2">)</span>
<span class="number"> 17</span>      <span class="k2">{</span>
<span class="number"> 18</span>        <a href="http://www.allegro.cc/manual/al_drop_next_event"><span class="a">al_drop_next_event</span></a><span class="k2">(</span>queue<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 19</span>      <span class="k2">}</span>
<span class="number"> 20</span>      <span class="c">//render the scene</span>
<span class="number"> 21</span>      <span class="k1">if</span><span class="k2">(</span>m_needsRedraw <span class="k3">&amp;</span><span class="k3">&amp;</span> <a href="http://www.allegro.cc/manual/al_is_event_queue_empty"><span class="a">al_is_event_queue_empty</span></a><span class="k2">(</span>queue<span class="k2">)</span><span class="k2">)</span>
<span class="number"> 22</span>      <span class="k2">{</span>
<span class="number"> 23</span>        m_currentScene-&gt;render<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 24</span>        m_needsRedraw <span class="k3">=</span> <span class="k1">false</span><span class="k2">;</span>
<span class="number"> 25</span>      <span class="k2">}</span>
<span class="number"> 26</span>
<span class="number"> 27</span>      defaultBeginEventHandler<span class="k2">(</span><span class="k3">&amp;</span>evt<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 28</span>      m_currentScene-&gt;processEvent<span class="k2">(</span><span class="k3">&amp;</span>evt,handled<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 29</span>
<span class="number"> 30</span>      <span class="c">//do default behavior if event was not handled by the scene</span>
<span class="number"> 31</span>      <span class="k1">if</span> <span class="k2">(</span><span class="k3">!</span>handled<span class="k2">)</span>
<span class="number"> 32</span>      <span class="k2">{</span>
<span class="number"> 33</span>        defaultEndEventHandler<span class="k2">(</span><span class="k3">&amp;</span>evt<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 34</span>      <span class="k2">}</span>
<span class="number"> 35</span>
<span class="number"> 36</span>      processMessages<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 37</span>    <span class="k2">}</span>
<span class="number"> 38</span>  <span class="k2">}</span>
</div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (jmasterx)</author>
		<pubDate>Sat, 05 May 2012 03:24:31 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Looks pretty good but I&#39;m only getting around 50 fps. (GeForce 8500GT, quad core CPU)<br />Frankly, I don&#39;t think the graphics justify the performance. I see you&#39;re using SVGs, though. How do you render them?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Stas B.)</author>
		<pubDate>Sat, 05 May 2012 04:35:41 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/610160/954203#target">Stas B.</a> said:</div><div class="quote"><p>Looks pretty good but I&#39;m only getting around 50 fps. (GeForce 8500GT, quad core CPU)<br />Frankly, I don&#39;t think the graphics justify the performance. I see you&#39;re using SVGs, though. How do you render them?</p></div></div><p>

Parsing SVG data is the hardest part, but luckily the .NET framework makes it pretty easy with LINQ, etc. I can provide my SVG parser if you want. As far as rendering goes, I explain it <a href="http://www.allegro.cc/forums/thread/609877/951655#target">here</a> and also on my website in an article <a href="http://commaexcess.com/articles/6/vector-graphics-on-the-gpu">Vector graphics on the GPU</a>.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Erin Maus)</author>
		<pubDate>Sat, 05 May 2012 04:59:48 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>That&#39;s pretty neat, but from the looks of it, pretty slow. How does it scale when you have enemies, props and decorations in the scene? Why don&#39;t you just pre-render the the relevant graphics while loading a level? If you render them large enough to not have to scale them up and use mipmaps when scaling down, it looks indistinguishable from real vector graphics. Maybe you could use a hybrid approach. I don&#39;t see why grass blades, for instance, have to be real vector graphics.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Stas B.)</author>
		<pubDate>Sat, 05 May 2012 05:17:23 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You could do something like this using flash.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (m c)</author>
		<pubDate>Sun, 06 May 2012 16:35:27 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>won&#39;t even run on my laptop. Get a brief framed window then it closes. No log file is produced either to show you.</p><p>On my other computer which is windows 7 64-bit, 8gb ram, intel i5 with HD2000 graphics, all I got was a blue screen.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Sun, 06 May 2012 21:10:55 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/610160/954256#target">m c</a> said:</div><div class="quote"><p>You could do something like this using flash.</p></div></div><p>

Pretty sure you&#39;d get like 2 FPS doing something like this in Flash. The specs requirement would even be higher. I can&#39;t even run basic games using Flash on my netbook without them using all processor cores and still running at no more than 5 FPS.</p><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/610160/954277#target">Neil Walker</a> said:</div><div class="quote"><p>won&#39;t even run on my laptop. Get a brief framed window then it closes. No log file is produced either to show you.On my other computer which is windows 7 64-bit, 8gb ram, intel i5 with HD2000 graphics, all I got was a blue screen.</p></div></div><p>

It requires OpenGL 3.3. I am assuming neither of your cards support it (I know the HD2000 doesn&#39;t).</p><p><b>edit:</b> I managed to increase performance upwards of 50% on my netbook by tremendously reducing redundant state calls. Attached is the modified version. Could anyone who tried running it before, such as jmasterx or Stas B., try it again and see how much (or how little) it has improved?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Erin Maus)</author>
		<pubDate>Sun, 06 May 2012 23:31:01 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/610160/954280#target">Aaron Bolyard</a> said:</div><div class="quote"><p>Could anyone who tried running it before, such as jmasterx or Stas B., try it again and see how much (or how little) it has improved?</p></div></div><p>

FPS is up to a steady figure of 60.<br />Vsync is off and my refresh rate is 75, so it&#39;s not capped by external factors.<br />I think you should hack up a stress test that&#39;s more or less representative of a real game scene and let us test that. That&#39;ll give you a clear picture of when it&#39;s optimized enough.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Stas B.)</author>
		<pubDate>Mon, 07 May 2012 00:51:32 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/610160/954288#target">Stas B.</a> said:</div><div class="quote"><p>FPS is up to a steady figure of 60.<br />Vsync is off and my refresh rate is 75, so it&#39;s not capped by external factors.<br />I think you should hack up a stress test that&#39;s more or less representative of a real game scene and let us test that. That&#39;ll give you a clear picture of when it&#39;s optimized enough.</p></div></div><p>

Thanks a bunch. I am working on exactly that. I hope to have it done in the next few days. Thanks again! <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>(By the way, the 60 FPS is a limit of the game; so you&#39;re getting the max!)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Erin Maus)</author>
		<pubDate>Mon, 07 May 2012 00:52:48 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>How did you set up the company ?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (William Labbett)</author>
		<pubDate>Mon, 07 May 2012 22:02:35 +0000</pubDate>
	</item>
</rss>
