<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>VectorStorm Blog &#187; VectorStorm</title>
	<atom:link href="http://www.vectorstorm.org/category/vectorstorm/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.vectorstorm.org</link>
	<description>Creating games, one brightly glowing line at a time.</description>
	<lastBuildDate>Wed, 08 Feb 2012 09:14:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Profiling is fun</title>
		<link>http://www.vectorstorm.org/2011/10/09/profiling-is-fun/</link>
		<comments>http://www.vectorstorm.org/2011/10/09/profiling-is-fun/#comments</comments>
		<pubDate>Sun, 09 Oct 2011 08:02:21 +0000</pubDate>
		<dc:creator>trevor</dc:creator>
				<category><![CDATA[Engine]]></category>
		<category><![CDATA[Full Games]]></category>
		<category><![CDATA[MMORPG Tycoon]]></category>
		<category><![CDATA[VectorStorm]]></category>

		<guid isPermaLink="false">http://www.vectorstorm.org/?p=2269</guid>
		<description><![CDATA[Actually, that&#8217;s a dirty lie. Profiling is fun when it shows you something big that&#8217;s easy to fix.  Profiling is a lot less fun when everything is equally slow.  But luckily in my case, there was something big to fix.  :) I noticed the other day that editing roads in MMORPG Tycoon 2 had become [...]]]></description>
			<content:encoded><![CDATA[<p>Actually, that&#8217;s a dirty lie.</p>
<p>Profiling is fun when it shows you something big that&#8217;s easy to fix.  Profiling is a lot less fun when everything is equally slow.  But luckily in my case, there was something big to fix.  :)</p>
<p>I noticed the other day that editing roads in MMORPG Tycoon 2 had become extremely slow.  (Well.. actually I noticed that roads didn&#8217;t draw at all.  It was only after I fixed them not drawing that I noticed that they were slow to edit).   This was odd, because I have videos of early road editing, where it hardly touched the frame rate at all on a system much slower than the one I&#8217;m using now.  So after some profiling, I found that creating their procedural geometry was taking up about 75% of the whole processing time for the frame when they were created.  This was extremely bad when editing them, especially (because they&#8217;re regenerated every frame, when they&#8217;re being edited, or when the ground under them is being edited).</p>
<p>Those of you who were at Freeplay will remember the part of my talk where I discussed optimising games, and when to do it (or rather, when not to do it).</p>
<p>For those who weren&#8217;t there, the tl;dr version is this:  don&#8217;t optimise anything unless you have timing numbers that proves it&#8217;s slow relative to the rest of your program, and against which you&#8217;ll be able to judge your progress.  Ideally, you get these numbers by using a profiler of some sort.  (Visual Studio has one built in, modern Xcode uses Instruments while old Xcode used Shark, under Linux you have gperf, etc)</p>
<p>What I didn&#8217;t say in that talk (and which I&#8217;ve regretted ever since), is that there&#8217;s a second criteria which can make it acceptable to optimise some code, even if you don&#8217;t have performance numbers.  Here is that other criteria:</p>
<p><span id="more-2269"></span></p>
<h1>Monte Carlo Profiling</h1>
<ol>
<li>Make a build of your game with optimisations turned on (a &#8220;release&#8221; build, or &#8220;retail&#8221; build, or &#8220;dist&#8221; build, or whatever you call it), but with debugging symbols still present.</li>
<li>Run this build through your debugger of choice.</li>
<li>At any time of your own choosing, pause the execution of the game, and examine the call stack shown in your debugger.</li>
<li>Repeat step 3 nine more times (for a total of ten pauses and ten callstacks).</li>
<li>If in seven of the ten total times you paused the game you were in the same area of code, then you may spend time optimising that area of code, even without first profiling it.</li>
</ol>
<p>The Monte Carlo test is basically very quick and ad hoc profiling.  Profiling does exactly this same process, but instead of doing it ten times, it does it millions of times, far faster than you&#8217;re able to do it manually.  It avoids having to go to the bother of setting up proper profiling, and will still point out anything that&#8217;s extremely slow in your code.</p>
<p>But back to my story.  In my case, I did do real profiling.  Here&#8217;s what it looked like in Instruments:</p>
<p><a href="http://www.vectorstorm.org/wp-content/uploads/2011/10/InstrumentsScreenSnapz002.jpg"><img class="aligncenter size-full wp-image-2271" title="InstrumentsScreenSnapz002" src="http://www.vectorstorm.org/wp-content/uploads/2011/10/InstrumentsScreenSnapz002.jpg" alt="" width="815" height="583" /></a><a href="http://www.vectorstorm.org/wp-content/uploads/2011/10/InstrumentsScreenSnapz002.jpg"><br />
</a><a href="http://www.vectorstorm.org/wp-content/uploads/2011/10/InstrumentsScreenSnapz001.jpg"><br />
</a>That graph is of CPU usage.  (Also, it totally breaks the site frame layout, but I don&#8217;t care.  I want you to see the details.  :) )  The spike at the start is the game starting up (and generating all the world geometry all at once).  The low part in the middle is just me looking around a bit, and then the heavy bit that I have highlighted is me editing a road &#8212; just dragging one of its endpoints around the map at random.</p>
<p>As you can see from the screenshot, it&#8217;s spending about 30% of the frame time in vsMeshMaker::BakeTriangleVertex, 20% of its time in vsFloor (called from vsMeshMaker::BakeTriangleVertex), 16% of the frame time in vsVector2D::SqLength() (also called from vsMeshMaker::BakeTriangleVertex)&#8230;  you get the idea.  Add it all up, and we were spending about 75% of our CPU time inside BakeTriangleVertex.  That BakeTriangleVertex function was really, really heavy for some reason, and I needed to figure out why.</p>
<p>Basically what vsMeshMaker::BakeTriangleVertex does is to look at all the triangle vertices in a procedurally generated model, and to decide (one at a time) whether they should be merged with other nearby vertices to make a smoothly curving surface.  The hardest part of this is actually finding other nearby vertices.  Previously, I had sped this up by dividing up space into grid squares, and storing each vertex into the appropriate grid space.  Then when I wanted to know about nearby vertices, I only had to check the other vertices in the same grid space, not every other vertices in the model.</p>
<p>But as it turns out, those grid spaces were too large, especially for large objects like roads, and so I was still comparing far too many vertices for merging.  So I increased the number of grid spaces (and made each grid space smaller, so there would be fewer vertices to test in each), so that instead of having an 8x8x8 grid and needing to test every vertex in those large squares, we have a 32x32x32 grid and only need to test every vertex in much smaller squares.  I had also noticed that very simple functions like vsFloor and vsVector3D::SqLength() were showing up in the profiling, and so made those functions inline, to hopefully reduce the cost of calling them.  This led to this graph:</p>
<p><a href="http://www.vectorstorm.org/wp-content/uploads/2011/10/InstrumentsScreenSnapz003.jpg"><img class="aligncenter size-full wp-image-2272" title="InstrumentsScreenSnapz003" src="http://www.vectorstorm.org/wp-content/uploads/2011/10/InstrumentsScreenSnapz003.jpg" alt="" width="815" height="583" /></a></p>
<p>This one is fascinating.  Notice that the amount of CPU being used has dropped substantially, compared to the previous one.  Also note that functions like &#8220;vsFloor&#8221; and &#8220;vsVector3D::SqLength&#8221; have vanished, since I made them inline (they&#8217;re now included in the caller&#8217;s time).  Increasing the resolution of my vertex lookup grid had sped things up a lot &#8212; we&#8217;re down from 75% of our frame time, down to an average of 40% of our frame time (and made a huge improvement to the frame rate).  But here&#8217;s the interesting thing that I hadn&#8217;t noticed previously:</p>
<p>Look at that graph, how it increases over time.  I wasn&#8217;t doing anything unusual in-game, just rapidly dragging one end of the road back and forth over a single area of terrain.  But the more time I spent editing the road, the slower editing became.  This eventually pointed me to a bug in my code, where some of the merging work from previous frames was being left-over to do again on all subsequent frames, even though it didn&#8217;t accomplish anything on the new frames.  So I fixed that bug, and profiled again:</p>
<p><a href="http://www.vectorstorm.org/wp-content/uploads/2011/10/InstrumentsScreenSnapz004.jpg"><img class="aligncenter size-full wp-image-2273" title="InstrumentsScreenSnapz004" src="http://www.vectorstorm.org/wp-content/uploads/2011/10/InstrumentsScreenSnapz004.jpg" alt="" width="626" height="481" /></a></p>
<p>Great!  Getting rid of that leftover repeated work brought us down from 40% frame time (on average, during a long editing session) to about 2.6% frame time, low enough that you don&#8217;t even notice a frame rate hit in-game.</p>
<p>The problem now was that my grid was so fine, that it actually uses a lot of memory.  A 32x32x32 grid has about 32,000 spaces in it, and each of those needed storage to hold an arbitrary number of vertices.  And I had one of these for every road (and indeed, every building, tree, etc).  That builds up fast!  And while 2.6% is low enough to be acceptable, I would have liked it to be even lower.  Let&#8217;s face it, my placeholder &#8220;road&#8221; model is ridiculously simple.  I&#8217;d really like this code to be much faster than it is now, to handle the much more detailed meshes that I&#8217;ll be throwing at it later.</p>
<p>So I set out to replace the grid with a new structure:  an octree.  For those who are interested, this implementation has been ported back into the main VectorStorm trunk, as VS_PointOctree.h, inside the VS/Utils/ directory.  It&#8217;s basically a tree structure which expands as more data is added to it, so it should behave far more predictably than the grid structure.  What&#8217;s more, it expands as data is added, instead of being a fixed (huge) size, which means that smaller models use much less space, exactly as you&#8217;d hope.  Profiling isn&#8217;t much different (down to about 2%), but memory usage is drastically lower.  So I call that a win.  And in future, I may return to this code to see if I can&#8217;t whittle it down even a little further, once it starts moving up into a prime spot in the profiling again.</p>
<p>I&#8217;ve also been doing other stuff recently, but I reckon that this blog post is enough of a novel already, so I&#8217;ll save the other stuff for tomorrow.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vectorstorm.org/2011/10/09/profiling-is-fun/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A New Look</title>
		<link>http://www.vectorstorm.org/2011/09/08/a-new-look-2/</link>
		<comments>http://www.vectorstorm.org/2011/09/08/a-new-look-2/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 13:29:25 +0000</pubDate>
		<dc:creator>trevor</dc:creator>
				<category><![CDATA[VectorStorm]]></category>

		<guid isPermaLink="false">http://www.vectorstorm.org/?p=2241</guid>
		<description><![CDATA[I&#8217;ve been maintaining this development blog (on and off) for almost four years, now. In that time,I&#8217;ve managed to complete eight &#8220;game in a week&#8221; games (one of which went substantially over schedule), and one major other project. Professionally, I&#8217;ve been a key member of the programming teams releasing three commercial console games during that [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been maintaining this development blog (on and off) for almost four years, now.  In that time,I&#8217;ve managed to complete eight &#8220;game in a week&#8221; games (one of which went substantially over schedule), and one major other project.  Professionally, I&#8217;ve<br />
been a key member of the programming teams releasing three commercial console games during that time, and have had smaller roles on others.  Also during the time since I started this blog, I spent about four months on vacation, about four months unemployed, and am now working for a new employer (where we&#8217;re only a few months away from our next commercial release)</p>
<p>In all this time, this blog has remained pretty much unchanged.  I guess I was finally feeling like it was time to air the room and let in a little more light, so welcome to the new layout.  Clean, simple, and relatively unobtrusive.</p>
<p>Of course, for those of you who read via the <a href="http://www.vectorstorm.org/feed/">RSS feed</a>, there&#8217;ll be no visible difference. But for everyone else, hopefully the site will be a bit easier on the eyes, particularly for my longer bouts of rambling.</p>
<p><!-- #VIMPRESS_TAG# http://www.vectorstorm.org/wp-content/uploads/2011/09/wpid2255-vimpress_4e68c334_mkd.txt wpid2255-vimpress_4e68c334_mkd.txt --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.vectorstorm.org/2011/09/08/a-new-look-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Multithreading</title>
		<link>http://www.vectorstorm.org/2011/08/04/multithreading/</link>
		<comments>http://www.vectorstorm.org/2011/08/04/multithreading/#comments</comments>
		<pubDate>Wed, 03 Aug 2011 14:55:29 +0000</pubDate>
		<dc:creator>trevor</dc:creator>
				<category><![CDATA[Engine]]></category>
		<category><![CDATA[Full Games]]></category>
		<category><![CDATA[MMORPG Tycoon]]></category>
		<category><![CDATA[VectorStorm]]></category>

		<guid isPermaLink="false">http://www.vectorstorm.org/?p=2156</guid>
		<description><![CDATA[Just a couple quick notes today, because I really ought to be sleeping instead of posting. Today, MMORPG Tycoon 2 has finally become a multithreaded game.  It&#8217;s not ubiquitous by any means, but it&#8217;s taken the first step;  the ground clutter is now being generated in a background thread.  The only bit of clutter-related code [...]]]></description>
			<content:encoded><![CDATA[<p>Just a couple quick notes today, because I really ought to be sleeping instead of posting.</p>
<p>Today, MMORPG Tycoon 2 has finally become a multithreaded game.  It&#8217;s not ubiquitous by any means, but it&#8217;s taken the first step;  the ground clutter is now being generated in a background thread.  The only bit of clutter-related code which is now occurring in the main thread is copying the final geometry into the buffer that OpenGL renders from.  Now all the setup work as you move around the map is being handled in separate threads.</p>
<p>This means a couple of things.  For one, it means that MMORPG Tycoon 2 can finally use a little more of the CPU time from everyone with a multi-core computer (which is just about everyone with a computer from the last six years or so), and it also means that as more tasks can be moved out into other threads, I&#8217;ll be able to do more and more processing without hurting the game&#8217;s frame rate.</p>
<p>I&#8217;ll also note that Mac OS X&#8217;s support for semaphores is half-broken, and Win32&#8242;s support for semaphores is bizarre and generally unrelated to traditional semaphores.  Makes me a sad coder.  (for the non-coders in the audience:  semaphores are a tool for synchronising multiple threads, to help keep them from stepping on each other&#8217;s toes)</p>
<p>More details tomorrow.  Or later today, I guess, technically.  And semaphores will eventually be ported back into the VectorStorm trunk, if anyone wants to look at them.  Also fixed some bugs in the vsTask class, and added features to the vsMutex.  Will need to move all those changes back to the live trunk in the near future.  Maybe over the weekend.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vectorstorm.org/2011/08/04/multithreading/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Another fix</title>
		<link>http://www.vectorstorm.org/2011/07/11/another-fix/</link>
		<comments>http://www.vectorstorm.org/2011/07/11/another-fix/#comments</comments>
		<pubDate>Mon, 11 Jul 2011 12:06:11 +0000</pubDate>
		<dc:creator>trevor</dc:creator>
				<category><![CDATA[Full Games]]></category>
		<category><![CDATA[MMORPG Tycoon]]></category>
		<category><![CDATA[VectorStorm]]></category>

		<guid isPermaLink="false">http://www.vectorstorm.org/?p=2118</guid>
		<description><![CDATA[Remember a few weeks back when I talked about how pleased I was to have fixed a bug involving vertex normals when welding together the vertices of models? Well, it turns out that I hadn&#8217;t fixed it at all;  I&#8217;d merely hidden it in a few situations.  As you can see from the screenshot on [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.vectorstorm.org/wp-content/uploads/2011/07/BeforeAfter.png"><img class="alignnone size-medium wp-image-2125" title="BeforeAfter" src="http://www.vectorstorm.org/wp-content/uploads/2011/07/BeforeAfter-300x173.png" alt="" width="300" height="173" /></a>Remember a few weeks back when I talked about how pleased I was to have fixed a bug involving vertex normals when welding together the vertices of models?</p>
<p>Well, it turns out that I hadn&#8217;t fixed it at all;  I&#8217;d merely hidden it in a few situations.  As you can see from the screenshot on the left, the problem was still visible in other places (left corner of the graveship, top of the column, and more subtly, roof of the inn).</p>
<p>I believe that I&#8217;ve now well and truly solved the problem;  certainly all those problem areas are now rendering more appropriately, as seen in the screenshot on the right.  So yay.  As I mentioned before, these fixes are in the &#8220;vsMeshMaker&#8221; utility class in the VectorStorm library.  These fixes will be brought into the live trunk sometime in the next few days, once I&#8217;m satisfied that the bug is actually fixed for real this time, and hasn&#8217;t just scampered off to hide under some different rock.</p>
<p>In other news, I spent a good half hour trying to figure out why I haven&#8217;t been able to post thumbnails of screenshots since moving to the new server.  Turns out that WordPress really wants to have php5&#8242;s gd module installed, and I had neglected to install that on the new server. Boo to WordPress&#8217;s support sites, which don&#8217;t mention that it needs this module.</p>
<p>In non-news, I&#8217;m still poking away at MMORPG Tycoon 2 and making (extremely) slow but steady progress.  There hasn&#8217;t been much to show for a while, as I&#8217;ve been re-plumbing its innards to use regular VectorStorm library functionality wherever possible, instead of using custom rendering code everywhere.   VectorStorm now supports out-of-the-box features (batched rendering, etc) which I had previously implemented explicitly within custom game-side rendering logic in MMORPG Tycoon 2.  Simpler codebases lead to faster development!  But simplifying codebases takes a lot of time.  Especially when you&#8217;re doing it in your spare time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vectorstorm.org/2011/07/11/another-fix/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Three hours to go</title>
		<link>http://www.vectorstorm.org/2011/06/19/three-hours-to-go/</link>
		<comments>http://www.vectorstorm.org/2011/06/19/three-hours-to-go/#comments</comments>
		<pubDate>Sun, 19 Jun 2011 11:09:31 +0000</pubDate>
		<dc:creator>trevor</dc:creator>
				<category><![CDATA[VectorStorm]]></category>

		<guid isPermaLink="false">http://www.vectorstorm.org/?p=2056</guid>
		<description><![CDATA[So with three hours to go, I only have a few things left on my &#8220;to do&#8221; list: One sprite to add. One sound-effect to find and trigger Add instructions.  (Probably will just be text floaters within the level, because that&#8217;ll be fastest to do) Maybe think about making the title screen less awful. Arrange [...]]]></description>
			<content:encoded><![CDATA[<p>So with three hours to go, I only have a few things left on my &#8220;to do&#8221; list:</p>
<ol>
<li>One sprite to add.</li>
<li>One sound-effect to find and trigger</li>
<li>Add instructions.  (Probably will just be text floaters within the level, because that&#8217;ll be fastest to do)</li>
<li>Maybe think about making the title screen less awful.</li>
<li>Arrange the Windows build.</li>
</ol>
<p>There were a few things I wanted to have in the game which simply aren&#8217;t going to get done in time, and the graphics are extraordinarily rough.  But by and large, I&#8217;m kind of pleased with how this is turning out.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vectorstorm.org/2011/06/19/three-hours-to-go/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Optimisations</title>
		<link>http://www.vectorstorm.org/2011/04/23/optimisations/</link>
		<comments>http://www.vectorstorm.org/2011/04/23/optimisations/#comments</comments>
		<pubDate>Sat, 23 Apr 2011 10:40:57 +0000</pubDate>
		<dc:creator>trevor</dc:creator>
				<category><![CDATA[Engine]]></category>
		<category><![CDATA[Full Games]]></category>
		<category><![CDATA[MMORPG Tycoon]]></category>
		<category><![CDATA[VectorStorm]]></category>

		<guid isPermaLink="false">http://www.vectorstorm.org/?p=1973</guid>
		<description><![CDATA[So here&#8217;s a fun one for you all.  I mentioned that I had achieved some speed boosts for rendering based upon insights from gDEBugger.  On the basis of that, I&#8217;ve been setting up some more intelligent rendering code which doesn&#8217;t tell OpenGL to do something that it was already doing. In brief, what was happening [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.vectorstorm.org/wp-content/uploads/2011/04/MMORPG-Tycoon-2ScreenSnapz001.jpg"><img class="alignnone size-medium wp-image-1974" title="MMORPG Tycoon 2ScreenSnapz001" src="http://www.vectorstorm.org/wp-content/uploads/2011/04/MMORPG-Tycoon-2ScreenSnapz001-300x173.jpg" alt="" width="300" height="173" /></a>So here&#8217;s a fun one for you all.  I mentioned that I had achieved some speed boosts for rendering based upon insights from gDEBugger.  On the basis of that, I&#8217;ve been setting up some more intelligent rendering code which doesn&#8217;t tell OpenGL to do something that it was already doing.</p>
<p>In brief, what was happening before was that MT2 (and all VectorStorm games) would render every object in the scene one at a time, setting up OpenGL to render that object individually (&#8220;Turn fog on.  Turn lighting on.  Turn zbuffer on, turn writing into color channels on, turn glow effect off, etc.&#8221;), even though 95% of those settings were the same on every object in the scene.</p>
<p>Now what happens is that each object registers those state changes onto a new object (the &#8220;vsRendererState&#8221;), and immediately before rendering, all those queued state changes are made.  Previously if (for example) the first object in a scene is using a texture and the second object is also using a texture, I&#8217;d be telling OpenGL &#8220;okay, turn on texture support&#8221;, render the first object, then &#8220;turn off texture support now&#8221;, and then &#8220;okay, turn on texture support again&#8221; before rendering the second object.  Now, it leaves texture support on until it actually starts rendering an object which isn&#8217;t using a texture;  it only changes the settings which are actually changing, instead of just naively setting everything.</p>
<p>Note that to make this work, I had to remove compiled display list support.  There&#8217;s simply no good way to keep track of OpenGL&#8217;s internal state when compiled display lists are being used.  But compiled display lists were really replaced by VBOs long ago, so this shouldn&#8217;t cause concern.  It&#8217;s similar to when I removed CPU-side shaders, and overlays.  Old technologies which have been superceded by faster, better ones.  :)</p>
<p>The screenshot today is what happens when there&#8217;s a bug in the code (in this case, not applying rendering state changes before performing post-render effects).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vectorstorm.org/2011/04/23/optimisations/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Yet more little updates</title>
		<link>http://www.vectorstorm.org/2011/04/18/more-little-updates-2/</link>
		<comments>http://www.vectorstorm.org/2011/04/18/more-little-updates-2/#comments</comments>
		<pubDate>Mon, 18 Apr 2011 12:23:57 +0000</pubDate>
		<dc:creator>trevor</dc:creator>
				<category><![CDATA[Engine]]></category>
		<category><![CDATA[VectorStorm]]></category>

		<guid isPermaLink="false">http://www.vectorstorm.org/?p=1969</guid>
		<description><![CDATA[The Windows version of the new VectorStorm multithreading code is now in place and working, and in the live trunk.  (Has been for about week, now;  I apparently forgot to post about it!) I&#8217;ve also been playing a bit with gDEBugger, an OpenGL profiler/analyser/etc, which is now free (was previously quite expensive to license).  It&#8217;s nowhere [...]]]></description>
			<content:encoded><![CDATA[<p>The Windows version of the new VectorStorm multithreading code is now in place and working, and in the live trunk.  (Has been for about week, now;  I apparently forgot to post about it!)</p>
<p>I&#8217;ve also been playing a bit with <a href="http://www.gremedy.com/" onclick="pageTracker._trackPageview('/outgoing/www.gremedy.com/?referer=');">gDEBugger</a>, an OpenGL profiler/analyser/etc, which is now free (was previously quite expensive to license).  It&#8217;s nowhere near <a href="http://en.wikipedia.org/wiki/PIX_(Microsoft)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/PIX_Microsoft?referer=');">PIX</a> in terms of power and insight, but it&#8217;s as close as we have under OpenGL at the moment.  And you can&#8217;t argue with the price.  And it works on all the major platforms, which is pretty awesome to see.  I&#8217;ve already made some sizeable rendering speed boosts for VectorStorm just on the basis of its insights into MMORPG Tycoon 2, and will have more in the near future.  Once I have these mostly sorted out, I&#8217;ll port them back into trunk as well.</p>
<p>This tool has also pointed out that lots of the techniques VectorStorm&#8217;s core rendering architecture use have been declared obsolete as of OpenGL 3.1.  Which surprised me, since I kind of designed VectorStorm for OpenGL 1.4 (which was the most that my ancient laptop could handle at the time);  I really didn&#8217;t think that the interfaces I was using would last all the way up to 3.1!  But it does suggest that someday I should be thinking about looking forward to the more modern revisions of OpenGL;  purging some of my old rendering architecture, and replacing it with more modern approaches.  That won&#8217;t be until after MT2, though, unless MT2 really calls for some modern rendering techniques.  (I&#8217;d really like to have some basic shadows.  But otherwise, I&#8217;m not too fussed over fancy rendering techniques for MT2).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vectorstorm.org/2011/04/18/more-little-updates-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>More little updates</title>
		<link>http://www.vectorstorm.org/2011/03/29/more-little-updates/</link>
		<comments>http://www.vectorstorm.org/2011/03/29/more-little-updates/#comments</comments>
		<pubDate>Tue, 29 Mar 2011 12:22:49 +0000</pubDate>
		<dc:creator>trevor</dc:creator>
				<category><![CDATA[Engine]]></category>
		<category><![CDATA[VectorStorm]]></category>

		<guid isPermaLink="false">http://www.vectorstorm.org/?p=1963</guid>
		<description><![CDATA[A bunch of little technical updates today. First, I&#8217;ve updated the VectorStorm engine so that it&#8217;ll compile successfully against iOS SDK v4.3.  I&#8217;ve also got both the standard VectorStorm Testbeds and MMORPG Tycoon 2 compiling under the newly released XCode 4.  My opinion of XCode 4 is complicated;  I can understand the general outcry from [...]]]></description>
			<content:encoded><![CDATA[<p>A bunch of little technical updates today.</p>
<p>First, I&#8217;ve updated the VectorStorm engine so that it&#8217;ll compile successfully against iOS SDK v4.3.  I&#8217;ve also got both the standard VectorStorm Testbeds and MMORPG Tycoon 2 compiling under the newly released XCode 4.  My opinion of XCode 4 is complicated;  I can understand the general outcry from many developers, but there&#8217;s lots of cool stuff in there too.  Whether the cool stuff outweighs the concerns, I&#8217;m not really sure.  But for the next couple of days, I&#8217;ll be using XCode 4 as my day-in day-out compiler to see how well I adapt.</p>
<p>Second, I&#8217;ve begun implementing some threading primitives into VectorStorm.  These are not yet compiling under Windows (since Microsoft has an entirely different threading model than UNIX-based systems), but I do now have both mutexes and threads working under OS X.  I&#8217;ll get the Windows version working tomorrow.  These little tools are going to be critical for MMORPG Tycoon 2, due to the amount of processing that it has to do;  it&#8217;s just going to be a lot easier to put some of that work into a separate thread.</p>
<p>Do be aware, though, that none of the rest of VectorStorm is written to be threadsafe.  These multithreading classes should really only be used for simple tasks that don&#8217;t involve calling into the various VectorStorm libraries at all.  If you have lots of calculations to be done in the background, then that&#8217;s fine.  But probably best not to try to allocate memory or start playing sounds from inside a thread or anything.  :)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vectorstorm.org/2011/03/29/more-little-updates/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>VectorStorm library update</title>
		<link>http://www.vectorstorm.org/2011/03/24/vectorstorm-library-update/</link>
		<comments>http://www.vectorstorm.org/2011/03/24/vectorstorm-library-update/#comments</comments>
		<pubDate>Thu, 24 Mar 2011 11:51:06 +0000</pubDate>
		<dc:creator>trevor</dc:creator>
				<category><![CDATA[Engine]]></category>
		<category><![CDATA[Full Games]]></category>
		<category><![CDATA[MMORPG Tycoon]]></category>
		<category><![CDATA[VectorStorm]]></category>

		<guid isPermaLink="false">http://www.vectorstorm.org/?p=1960</guid>
		<description><![CDATA[For the first time since getting my new job, I&#8217;ve finally sat down and written a little code on my home projects.  It&#8217;s not too much, but it felt pretty good to write it. I&#8217;ve fixed the VectorStorm engine bug which was causing problems with the middle mouse button and right mouse buttons (often swapping [...]]]></description>
			<content:encoded><![CDATA[<p>For the first time since getting my new job, I&#8217;ve finally sat down and written a little code on my home projects.  It&#8217;s not too much, but it felt pretty good to write it.</p>
<p>I&#8217;ve fixed the VectorStorm engine bug which was causing problems with the middle mouse button and right mouse buttons (often swapping the two, or causing them not to work at all).  It was an embarrassing mistake;  I had just mis-assigned labels for the controls, causing some minor swapping when loading saved control preferences.  I&#8217;ve made this bug fix both within MMORPG Tycoon 2 (where it was a major problem), and within the trunk VectorStorm library (where it was less of a problem, since no standard VectorStorm games were using mouse control).  If any of you have been looking at or using the VectorStorm library, you should go get those fixes.  If not, don&#8217;t worry about it too much, just be aware that I&#8217;m back to the compiler again.  :)</p>
<p>I&#8217;ve also begun poking with Tycoon code again.  Not a whole lot;  am just slowly easing myself back into it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vectorstorm.org/2011/03/24/vectorstorm-library-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What I don&#8217;t want MMORPG Tycoon 2 to look like</title>
		<link>http://www.vectorstorm.org/2011/01/18/what-i-dont-want-mmorpg-tycoon-2-to-look-like/</link>
		<comments>http://www.vectorstorm.org/2011/01/18/what-i-dont-want-mmorpg-tycoon-2-to-look-like/#comments</comments>
		<pubDate>Tue, 18 Jan 2011 09:32:34 +0000</pubDate>
		<dc:creator>trevor</dc:creator>
				<category><![CDATA[VectorStorm]]></category>

		<guid isPermaLink="false">http://www.vectorstorm.org/?p=1920</guid>
		<description><![CDATA[Maybe it&#8217;s just me.  But I&#8217;m completely paranoid about MMORPG Tycoon 2 ending up looking something like this;  an endless expanse of identical trees, sprouting from all sorts of improbable places, in the middle of a simple height map that manages to look matte and unlit, despite the presence of a directional light. I&#8217;m not [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.vectorstorm.org/wp-content/uploads/2011/01/eek.jpg"><img class="alignnone size-medium wp-image-1921" title="eek" src="http://www.vectorstorm.org/wp-content/uploads/2011/01/eek-300x252.jpg" alt="" width="300" height="252" /></a>Maybe it&#8217;s just me.  But I&#8217;m completely paranoid about MMORPG Tycoon 2 ending up looking something like this;  an endless expanse of identical trees, sprouting from all sorts of improbable places, in the middle of a simple height map that manages to look matte and unlit, despite the presence of a directional light.</p>
<p>I&#8217;m not sure precisely what I need to do to avoid this, since the sort of asset re-use that was key in making this awful vista is also going to be required in MMORPG Tycoon 2.  Maybe if there were any sort of shadows being cast it&#8217;d help.  Or maybe if the trees weren&#8217;t quite so awful.  Or if the rocks weren&#8217;t simply amorphous blobs wedged into a monochromatic height map.  I don&#8217;t know.  I saw this vista in a modern MMO the other day, and was immediately seized by the terror of &#8220;how do I avoid creating this, myself?&#8221;</p>
<p>Anybody have thoughts?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vectorstorm.org/2011/01/18/what-i-dont-want-mmorpg-tycoon-2-to-look-like/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

