<?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>:: JimBlackhurst.com :: &#187; Games Design</title>
	<atom:link href="http://jimblackhurst.com/wp/category/games-design/feed/" rel="self" type="application/rss+xml" />
	<link>http://jimblackhurst.com/wp</link>
	<description>Electronics, Data, Space, Games Design, other random geekieness</description>
	<lastBuildDate>Fri, 18 May 2012 10:05:48 +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>Heatmaps, Point Clouds and Big Data in Processing</title>
		<link>http://jimblackhurst.com/wp/2011/05/17/heatmaps-point-clouds-and-big-data-in-processing/</link>
		<comments>http://jimblackhurst.com/wp/2011/05/17/heatmaps-point-clouds-and-big-data-in-processing/#comments</comments>
		<pubDate>Tue, 17 May 2011 15:58:54 +0000</pubDate>
		<dc:creator>Jim</dc:creator>
				<category><![CDATA[Data Viz]]></category>
		<category><![CDATA[Digital Culture]]></category>
		<category><![CDATA[Games Design]]></category>
		<category><![CDATA[graphics]]></category>

		<guid isPermaLink="false">http://jimblackhurst.com/wp/?p=213</guid>
		<description><![CDATA[**UPDATE** I&#8217;ve just posted a new video to youtube, and embeded at the bottom of this post, showing the point cloud visualisation running in realtime. You may know from this blog, that I work for a company called Square Enix, and before that Eidos.  SE is a video games publisher, famous for Final Fantasy, and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://jimblackhurst.com/wp/2011/05/17/heatmaps-point-clouds-and-big-data-in-processing/"><em>Click here to view the embedded video.</em></a></p>
<p>**UPDATE** I&#8217;ve just posted a new video to youtube, and embeded at the bottom of this post, showing the point cloud visualisation running in realtime.</p>
<p>You may know from this blog, that I work for a company called Square Enix, and before that Eidos.  SE is a video games publisher, famous for Final Fantasy, and through the acquisition of UK publisher Eidos, Tomb Raider.  Among other duties, I manage the metrics system and create data and visualisations that the business uses to make better games.  All the data we collect is anonymous. For a while now I&#8217;ve been using this data to create <a href="http://cdn2.netops.eidosinteractive.com/pringo3/data/assets/justcause/images/heatmaps/extraction.jpg">Heatmaps</a> of player activity.  You can see some of these on the <a href="http://justcause.com/game_stats">Just Cause website</a>.</p>
<p>I&#8217;ve been using <a href="http://processing.org" target="_blank">Processing </a>to create tools that render the heatmaps, but while the logical structure of program is fairly simple, there are significant challenges in working with large datasets.  The primary challenge is loading the data into memory.  The data is all held in a SQL database, and while I could connect to the DB directly using processing, the DB is optimised for data-in operations, not data-out, so you don&#8217;t want to be pulling the data out too often.  Instead, I dump the raw spatial data (X,Y,Z coordinates) into a CSV file, one record per row. I usually create heatmaps from datasets in excess of 1 million rows, and most of them are between 5 &#8211; 20 million rows (I have one that is 22 million rows!).  A CSV file containing 10 million rows of spatial data is about 364MiB in size (the 22.3m row CSV is 802MiB!).  In order to create the data structures in memory to hold sets this large, I have to <a href="http://forum.processing.org/topic/processing-opengl-and-windows-x64" target="_blank">work in 64bit mode</a> to get over the Windows 32bit memory restrictions.</p>
<p>When I wrote the tool for heatmapping, I was pretty fresh to processing, and I can now see many ways to optimise this process to be more efficient at memory usage, but I&#8217;m not great at refactoring, and as it works, I&#8217;ve not been back to optimise it.  The heatmapper application works by looking at the resolution of the image you want to create (eg. 2000x2000px) and then subdividing this into a cell structure whose size determined by the &#8220;cell resolution&#8221; variable.  The cells are essentially buckets, into which I put the rows of raw data.  Each row of raw data (the data&#8217;s X and Y value) is processed to find out which bucket that row of data fall in and then a Cell&#8217;s value is incremented by one every time an element of the raw data lands in it.</p>
<div id="attachment_236" class="wp-caption aligncenter" style="width: 510px"><a href="http://jimblackhurst.com/wp/wp-content/uploads/2011/05/JC2-Extraction-heatmap.jpg"><img class="size-medium wp-image-236" title=" JC2 Extraction heatmap" src="http://jimblackhurst.com/wp/wp-content/uploads/2011/05/JC2-Extraction-heatmap-500x500.jpg" alt="" width="500" height="500" /></a><p class="wp-caption-text">A heatmap of more than 22.3 million player &#39;Extraction&#39; events from Just Cause 2</p></div>
<p>Once the whole raw dataset has been parsed, and the Cells populated with counts, we render the cells.  This is a simple process of drawing a circle of the same diameter as the cell size. The colour of which is determined by the number of the raw data elements that landed in that cell. The palette is scaled so that the cell with the largest value of counts is always pure white, so there is no clipping in the colour (although you can remove this scaling, meaning that any cell with more than 255 counts in it will be white, the trade off is increased colour resolution for the less populated cells).  I use a simple alpha blend to help smooth out the rendering.  The results are pretty good.</p>
<p>What was bugging me was that I was getting this huge set of raw data, but only using two thirds of it.  I never ventured into third dimension by factoring the Z coordinate (the &#8216;height&#8217; spatial component) into the process.  At the beginning of this year, I decided to do something about this. I started a project to rebuild the heatmapping application in 3D.</p>
<p>My first results we truly awful. I rendered 9000 points in rows using the OpenGL renderer, with colour to show the relative height of the points.  With only 9k rows, I couldn&#8217;t manage more than a couple of frames a second. The culprit was the Map() function that I was using for scaling the colour palette, for each point, each frame.  Once I removed that, Life got a lot better, but I couldn&#8217;t render more than a few thousand points without the framerate falling off a cliff.</p>
<div id="attachment_234" class="wp-caption aligncenter" style="width: 510px"><a href="http://jimblackhurst.com/wp/wp-content/uploads/2011/05/early_pointcloud.jpg"><img class="size-medium wp-image-234" title="early_pointcloud" src="http://jimblackhurst.com/wp/wp-content/uploads/2011/05/early_pointcloud-500x291.jpg" alt="" width="500" height="291" /></a><p class="wp-caption-text">Early rendering of a point cloud from the JC2 Data</p></div>
<p>It became obvious that I would need to start getting a bit more low level with OpenGL to get more performance.  This is where I discovered the work of Andrés Colubri and his <a href="http://glgraphics.sourceforge.net/" target="_blank">GLGraphics library</a> for Processing.  With some great <a href="http://forum.processing.org/topic/getting-started-with-glgraphics" target="_blank">support through the Processing Forums</a>, I was able to move a lot of the heavy lifting from the CPU to the GFX card, and ultimately create a vertex buffer object holding the points.  I can render 11 million points in realtime at 30fps, on my desktop computer.  This was several orders of magnitude greater performance than I ever thought would be possible.</p>
<p>The JustCause2 dataset that I was using was a selection of player deaths specifically where the player had died from an impact event.  This was great because players tend to spend a lot of time jumping off tall buildings or riding around in helicopters and planes, so impact in this context is generally impact with the geometry of the environment. When the data is rendered, you can see the underlying world, almost as clearly as if we were rendering the 3d mesh itself.</p>
<p>Finally, and arguably the most important aspect of any data visualisation is working out the best way to communicate it.  The data looked great, but I couldn&#8217;t distribute it as source because of the size of the CSV files that accompany it.  I needed to some way of taking the viewer through the data and showing them points of interest.  Up stepped another Processing hero,  Jean Pierre Charalambos and the <a href="http://code.google.com/p/proscene/" target="_blank">ProScene library</a>.  With ProScene, and Jean Pierre&#8217;s <a href="http://forum.processing.org/topic/slowing-down-interpolation-in-proscene" target="_blank">help</a> I was able to direct the camera around to create a visual tour of the data which I then rendered out as individual 1080p frames, and assembled later into an animation.</p>
<p>It&#8217;s not over, in fact this journey into 3D visualisation of big data is only just starting.  The JC2 Point Cloud animation isn&#8217;t really a heatmap at all, more like a 3D scatter graph of points. I will be investigating how to build a 3D cellular structure next, to create a true study of interactions in the 3D space.  I will most likely be using data from the upcoming Square Enix game, <a href="http://www.deusex.com/">Deus Ex: Human Revolution</a> as it&#8217;s level based structure is more suitable for this project than the vast open world of Just Cause 2.</p>
<p>&nbsp;</p>
<p><a href="http://jimblackhurst.com/wp/2011/05/17/heatmaps-point-clouds-and-big-data-in-processing/"><em>Click here to view the embedded video.</em></a></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://jimblackhurst.com/wp/2011/05/17/heatmaps-point-clouds-and-big-data-in-processing/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Elite</title>
		<link>http://jimblackhurst.com/wp/2009/07/15/elite/</link>
		<comments>http://jimblackhurst.com/wp/2009/07/15/elite/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 21:06:49 +0000</pubDate>
		<dc:creator>Jim</dc:creator>
				<category><![CDATA[Games Design]]></category>

		<guid isPermaLink="false">http://jimblackhurst.com/wp/?p=92</guid>
		<description><![CDATA[I always thought this Blog would be about my two joint passions, Video games and Space geekery, but there has been little in the way of games that I&#8217;ve been motivated to write about.  Just occasionally, however, something happens that reminds me of how cool the games biz is and inspires me to write about [...]]]></description>
			<content:encoded><![CDATA[<p>I always thought this Blog would be about my two joint passions, Video games and Space geekery, but there has been little in the way of games that I&#8217;ve been motivated to write about.  Just occasionally, however, something happens that reminds me of how cool the games biz is and inspires me to write about it.  I&#8217;ve been at the Develop Conference in Brighton this week, and I was looking forward to seeing a session with David Braben and Dave Jones comparing their two most famous titles, Elite and GTA1 respectively.  I&#8217;ve played GTA1 many times, and I appreciate it&#8217;s place in history, but Elite is the whole reason I am in the in the games industry and making games today.  I was not quite prepared for just how damm emotional it was seeing it running on a BBC 32k again (well an emu, but it felt the same).</p>
<p><a href="http://jimblackhurst.com/wp/wp-content/uploads/2009/07/dsc00267.jpg"><img class="aligncenter size-medium wp-image-93" title="David Braben at Devlop09 playing Elite" src="http://jimblackhurst.com/wp/wp-content/uploads/2009/07/dsc00267-500x375.jpg" alt="David Braben at Devlop09 playing Elite" width="500" height="375" /></a></p>
<p>He was asked during the Q&amp;A if we would ever see Elite again, to which he just replied &#8216;Yes&#8217;.<a href="http://www.eliteforum.org/" target="_blank"> Of course that&#8217;s nothing new, we&#8217;ve known for years that Elite is supposed to be in active development</a>, but he simply won&#8217;t be drawn on any details. My first thought was that i hope he uses Eve as a graphic reference, but beats Eve into a bloody mess by putting some real ship control and combat in there, rather than eve&#8217;s lame point and click navigation and warfare.  My second thought which was much sadder was that whatever he does, it&#8217;s never going to meet our expectations.</p>
<p>One thing that did freak me out a little was when he mentioned something that addressed a deep sense of inadequacy I&#8217;ve carried since being a child.  Even friends who only dabbled with Elite were able to stumble across one or more of the mythical missions, however I never did.  Despite achieving a rank of dangerous, I never had so much as a suggestion of a mission.  How could I ever pretend to be worthy of my commander rank?  Of course, it was obvious. I was playing on an Acorn Electron, and the missions were the bit that was chopped to shoehorn the game into the reduced memory space.  I can&#8217;t tell you how much of a relief it was to hear that!</p>
<p><a href="http://jimblackhurst.com/wp/2009/07/15/elite/"><em>Click here to view the embedded video.</em></a></p>
<p>I&#8217;d also forgotten how painful it must of been to play, it took 20 mins to load it in by tape! This, according to Braben, allowed for a degree of forgiveness by the players for the very steep learning curve.  It may have been hard to play if you were new to it, but after waiting 20mins for it to load, you&#8217;d at least give it a few mins of playing to see if you could master it.  I&#8217;m sure that’s a trick being used on some PS3 games today <img src='http://jimblackhurst.com/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://jimblackhurst.com/wp/2009/07/15/elite/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GDC 2008</title>
		<link>http://jimblackhurst.com/wp/2008/02/26/gdc-2008/</link>
		<comments>http://jimblackhurst.com/wp/2008/02/26/gdc-2008/#comments</comments>
		<pubDate>Tue, 26 Feb 2008 16:37:32 +0000</pubDate>
		<dc:creator>Jim</dc:creator>
				<category><![CDATA[Games Design]]></category>

		<guid isPermaLink="false">http://www.jimblackhurst.com/blog/?p=17</guid>
		<description><![CDATA[So it’s all over and we’re home and mostly cleared of the jetlag. Overall it was a busy show, the effect of E3 dying is obvious to see, GDC is now as much about business development as it is about games development. I actually found it a bit frustrating to get around simply due to [...]]]></description>
			<content:encoded><![CDATA[<p>So it’s all over and we’re home and mostly cleared of the jetlag.  Overall it was a busy show, the effect of E3 dying is obvious to see, GDC is now as much about business development as it is about games development.  I actually found it a bit frustrating to get around simply due to the number of people present. And I didn’t get a T-shirt.</p>
<p>I can’t believe I’m going to say it but… I think the iPhone is going to be a great gaming device.  Damm Apple and all their ultra popular design.  I was turned off touch screen by a generation of weak underpowered devices who didn’t have enough processor grunt to refresh the touch and update the screen, let alone run any games, but then I saw the LG Viewty.  At last there was a touch screen device that responded to a touch with out having to wait a week for anything to happen.  Nearly.  Then I relented and allowed myself to be in the same room as an apple device for a short time, and found that I was deeply impressed.  The screen is huge, both in resolution and real estate and the touch is so responsive, it almost feels predictive.  The motion sensor works and the multi touch pinch is fun.  This could be a great gaming platform.  I’ve never been at a show where there was more anticipation for one technology release, namely the official iPhone SDK (<a href="http://www.theregister.co.uk/2008/02/26/iphone_sdk_slip/">now delayed untill march</a>).</p>
<p>The main event also had it’s moments.  I have been thinking a lot about <a href="http://www.engadget.com/2007/03/07/playstation-home-revealed/">PS3 Home</a>, and I can’t help thinking that it’s not going to be a mediocre so-so.  It will either be the most laughable attempt at community ever or a brilliant success.  My game of the show was <a href="http://www.gamedesign.jp/flash/chatnoir/chatnoir.html">Chat Noir </a>which I thought was perfect in every way.  The experimental gameplay sessions, was terribly disappointing except for a few notable highlights, namely <a href="http://dinomogames.blogspot.com/">Ricky </a>showing off Bernie, which was brilliant and a preview of the awesome <a href="http://www.kloonigames.com/crayon/">Crayon Physics Deluxe</a>.  Where was the indie game jam? The whole event seemed to be lacking the energy of previous years, it was the first time in 6 years that I’ve seen empty seats in that room.</p>
<p>It rained a lot too.</p>
<p><img src='http://jimblackhurst.com/wp/wp-content/uploads/2008/02/img00013-ricky_500.jpg' alt='Ricky and Bernie at GDC08' /></p>
]]></content:encoded>
			<wfw:commentRss>http://jimblackhurst.com/wp/2008/02/26/gdc-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VR head tracking with a Wii Remote</title>
		<link>http://jimblackhurst.com/wp/2008/02/01/vr-head-tracking-with-a-wii-remote/</link>
		<comments>http://jimblackhurst.com/wp/2008/02/01/vr-head-tracking-with-a-wii-remote/#comments</comments>
		<pubDate>Fri, 01 Feb 2008 17:33:08 +0000</pubDate>
		<dc:creator>Jim</dc:creator>
				<category><![CDATA[Games Design]]></category>

		<guid isPermaLink="false">http://www.jimblackhurst.com/blog/?p=15</guid>
		<description><![CDATA[I love it when people are inspired to really think differently about games and how to use games hardware. Is it just me or are we seeing something of the future in this video?]]></description>
			<content:encoded><![CDATA[<p>I love it when people are inspired to really think differently about games and how to use games hardware.  Is it just me or are we seeing something of the future in this video?  <p><a href="http://jimblackhurst.com/wp/2008/02/01/vr-head-tracking-with-a-wii-remote/"><em>Click here to view the embedded video.</em></a></p></p>
]]></content:encoded>
			<wfw:commentRss>http://jimblackhurst.com/wp/2008/02/01/vr-head-tracking-with-a-wii-remote/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

