<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>ReTurn from Interrupt</title>
	<atom:link href="http://robinelvin.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://robinelvin.wordpress.com</link>
	<description>The weblog of Robin Elvin</description>
	<lastBuildDate>Fri, 05 Aug 2011 14:34:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='robinelvin.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>ReTurn from Interrupt</title>
		<link>http://robinelvin.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://robinelvin.wordpress.com/osd.xml" title="ReTurn from Interrupt" />
	<atom:link rel='hub' href='http://robinelvin.wordpress.com/?pushpress=hub'/>
		<item>
		<title>World Editor</title>
		<link>http://robinelvin.wordpress.com/2011/08/05/world-editor/</link>
		<comments>http://robinelvin.wordpress.com/2011/08/05/world-editor/#comments</comments>
		<pubDate>Fri, 05 Aug 2011 14:22:32 +0000</pubDate>
		<dc:creator>Robin Elvin</dc:creator>
				<category><![CDATA[OpenGL Game]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[opengl]]></category>
		<category><![CDATA[opentk]]></category>

		<guid isPermaLink="false">http://robinelvin.wordpress.com/?p=62</guid>
		<description><![CDATA[World Editor Here&#8217;s screenshot of the work I&#8217;ve done so far on creating a world editing tool. It&#8217;s written in C# using the excellent OpenTK library. With this utility I will be able to create sections of the world from tiles stitched together at any of their anchor points.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=robinelvin.wordpress.com&amp;blog=9309697&amp;post=62&amp;subd=robinelvin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h1>World Editor</h1>
<p>Here&#8217;s screenshot of the work I&#8217;ve done so far on creating a world editing tool. It&#8217;s written in C# using the excellent <a title="OpenTK" href="http://www.opentk.com">OpenTK </a>library. With this utility I will be able to create sections of the world from tiles stitched together at any of their anchor points.</p>
<p><a href="http://robinelvin.files.wordpress.com/2011/08/worldedit.jpg"><img class="aligncenter size-full wp-image-63" title="World Editor" src="http://robinelvin.files.wordpress.com/2011/08/worldedit.jpg?w=630&#038;h=349" alt="" width="630" height="349" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/robinelvin.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/robinelvin.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/robinelvin.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/robinelvin.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/robinelvin.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/robinelvin.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/robinelvin.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/robinelvin.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/robinelvin.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/robinelvin.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/robinelvin.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/robinelvin.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/robinelvin.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/robinelvin.wordpress.com/62/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=robinelvin.wordpress.com&amp;blog=9309697&amp;post=62&amp;subd=robinelvin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://robinelvin.wordpress.com/2011/08/05/world-editor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/539c06eb809028369739bee111e3de1c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">robinelvin</media:title>
		</media:content>

		<media:content url="http://robinelvin.files.wordpress.com/2011/08/worldedit.jpg" medium="image">
			<media:title type="html">World Editor</media:title>
		</media:content>
	</item>
		<item>
		<title>Creating the World</title>
		<link>http://robinelvin.wordpress.com/2011/06/03/creating-the-world/</link>
		<comments>http://robinelvin.wordpress.com/2011/06/03/creating-the-world/#comments</comments>
		<pubDate>Fri, 03 Jun 2011 15:01:46 +0000</pubDate>
		<dc:creator>Robin Elvin</dc:creator>
				<category><![CDATA[OpenGL Game]]></category>

		<guid isPermaLink="false">http://robinelvin.wordpress.com/?p=59</guid>
		<description><![CDATA[Re-shaping the landscape You may remember previously I talked about using generated terrain with realtime level-of-detail. That was when I had decided to create a more &#8216;open&#8217; world to explore and when the game was going to be a vehicle based strategy game. All change! Well, that was then and this is now as they [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=robinelvin.wordpress.com&amp;blog=9309697&amp;post=59&amp;subd=robinelvin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2>Re-shaping the landscape</h2>
<p>You may remember previously I talked about using generated terrain with realtime level-of-detail. That was when I had decided to create a more &#8216;open&#8217; world to explore and when the game was going to be a vehicle based strategy game.</p>
<h2>All change!</h2>
<p>Well, that was then and this is now as they say. Now I have settled on the idea of an RPG with some design features which have interesting and beneficial side-effects.</p>
<h3>Camera</h3>
<h5>How it will work</h5>
<p>The camera will be third person and always looking down at the character. This will be true even though the camera can be moved up and down. When it is in the furthest up position it will be almost overhead and when it is in the furthest down position it will be almost level with the character&#8217;s head. The camera will be able to rotate through the full 360° and be able to zoom in and out by a set amount.</p>
<h5>Benefits</h5>
<p>The obvious benefit is the restricted field of view and therefore the finite amount of game world in the viewing volume at any one time. Firstly, the lowest position the camera can be means it will never quite get the horizon in view. Secondly, as the distance you can zoom out is limited, the camera will never have a massive field of view.</p>
<h3>The Well-trodden Path</h3>
<h5>How it will work</h5>
<p>The world will not be free-roaming. It will appear to be free-roaming in as much as the real world is free-roaming. For example, you could climb up that sheer cliff face with the right equipment but it&#8217;s far simpler to find another way up. Therefore the landscape will be designed in such a way as to keep your character to the defined paths and corridors. This makes the game become more &#8216;on the rails&#8217; without feeling like it has been forced upon the player.</p>
<h5>Benefits</h5>
<p>Doing this means the world can be defined more rigidly and therefore there are less game engine rules to write. If you can&#8217;t fall down that well then I don&#8217;t have to write the falling routine. Much simpler to put a wall around it.</p>
<h2>Blocks and Sections</h2>
<p>I&#8217;ve been thinking of how to create the world and there are a list of game features I want to implement.</p>
<ol>
<li>A seamless world. No loading screens whilst in play.</li>
<li>Re-use of meshes.</li>
<li>Least complex editing tools.</li>
</ol>
<p>The solution I&#8217;ve come up with to address all of these features is to build the world out of 3D &#8217;tiles&#8217; which are linked together. Tiles will be linked into sections and sections linked together to form the world.</p>
<h4>Seamless World</h4>
<p>As the character and the viewing volume moves through the world so the &#8217;tiles&#8217; just outside the view can be loaded up ready. As they move out of view and then a distance away they can be discarded. All this means that the parts of the world which are in memory at once is kept to a minimum. Moving through a very large world should be possible with this method.</p>
<h4>Mesh Re-use</h4>
<p>Tiles which are the same geometrically such as the section of a wall or ground would only need to be loaded once but could be referenced by the world definition multiple times. This has the advantage of low memory usage and the fact I won&#8217;t have to create so many meshes. Imagine a courtyard with a fountain in the middle and a wall surrounding it. With this method I would only have to load possibly 4 meshes and their textures. They would be the floor, the fountain, wall sides and corners. The wall sides and corners would have the relevant rotation applied. In many ways this is much easier than 2D tiles.</p>
<h4>Editing Tools</h4>
<p>As I want to spend as much time programming the actual game code and the least amount of time possible coding supporting tools, I want to make it as easy as possible to edit the game world. Using the tiling method and only editing once section at a time means the tool can be less complex.</p>
<h2>Next Steps</h2>
<p>Now I am at the point where I have to define the world data format, the file and data structure which will define the world. I&#8217;m also looking at mesh formats and object description files. The next milestone will be to get a prototype of a world section up and running.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/robinelvin.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/robinelvin.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/robinelvin.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/robinelvin.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/robinelvin.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/robinelvin.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/robinelvin.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/robinelvin.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/robinelvin.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/robinelvin.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/robinelvin.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/robinelvin.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/robinelvin.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/robinelvin.wordpress.com/59/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=robinelvin.wordpress.com&amp;blog=9309697&amp;post=59&amp;subd=robinelvin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://robinelvin.wordpress.com/2011/06/03/creating-the-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/539c06eb809028369739bee111e3de1c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">robinelvin</media:title>
		</media:content>
	</item>
		<item>
		<title>Multiple Materials and Game Data Formats</title>
		<link>http://robinelvin.wordpress.com/2011/05/11/multiple-materials-and-data-formats/</link>
		<comments>http://robinelvin.wordpress.com/2011/05/11/multiple-materials-and-data-formats/#comments</comments>
		<pubDate>Wed, 11 May 2011 16:38:56 +0000</pubDate>
		<dc:creator>Robin Elvin</dc:creator>
				<category><![CDATA[OpenGL Game]]></category>
		<category><![CDATA[csharp]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[models]]></category>

		<guid isPermaLink="false">http://robinelvin.wordpress.com/?p=55</guid>
		<description><![CDATA[The latest thing I&#8217;ve added is the support of multiple materials in the .OBJ format. This has made me think about what format I should actually use. I should mention at this point that I&#8217;ve decided to now go for a downward looking third person view.  So rather than using procedural landscapes I will be [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=robinelvin.wordpress.com&amp;blog=9309697&amp;post=55&amp;subd=robinelvin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The latest thing I&#8217;ve added is the support of multiple materials in the .OBJ format. This has made me think about what format I should actually use. I should mention at this point that I&#8217;ve decided to now go for a downward looking third person view.  So rather than using procedural landscapes I will be using pre-built models for the terrain and interior areas with further models placed in the scene for trees, plants, buildings, furniture etc.</p>
<p>To tie all this together needs at least a file to describe all the relationships and other things such as lighting, effects etc. So it seems logical to turn objects created in a modelling utility into an internal format packed together to form a game level. To be honest I have a lot of it mapped in my head and it&#8217;s way too much to write here at present. I&#8217;ll serialise it as I start to implement it.</p>
<p>To work on the level files I&#8217;m going to need a utility which I had thought of doing as a GTK# app in <a title="Monodevelop" href="http://monodevelop.com">Monodevelop</a> but my work machine is running Centos and it&#8217;s just been a total pain trying to build all the dependencies. I&#8217;d still like to. Maybe I need a laptop I can bring to work <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/robinelvin.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/robinelvin.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/robinelvin.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/robinelvin.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/robinelvin.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/robinelvin.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/robinelvin.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/robinelvin.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/robinelvin.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/robinelvin.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/robinelvin.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/robinelvin.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/robinelvin.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/robinelvin.wordpress.com/55/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=robinelvin.wordpress.com&amp;blog=9309697&amp;post=55&amp;subd=robinelvin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://robinelvin.wordpress.com/2011/05/11/multiple-materials-and-data-formats/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/539c06eb809028369739bee111e3de1c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">robinelvin</media:title>
		</media:content>
	</item>
		<item>
		<title>Alias Wavefront .obj Loader</title>
		<link>http://robinelvin.wordpress.com/2011/04/19/alias-wavefront-obj-loader/</link>
		<comments>http://robinelvin.wordpress.com/2011/04/19/alias-wavefront-obj-loader/#comments</comments>
		<pubDate>Tue, 19 Apr 2011 10:48:36 +0000</pubDate>
		<dc:creator>Robin Elvin</dc:creator>
				<category><![CDATA[OpenGL Game]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[models]]></category>
		<category><![CDATA[opengl]]></category>

		<guid isPermaLink="false">http://robinelvin.wordpress.com/?p=49</guid>
		<description><![CDATA[Just another brief update on progress. I&#8217;ve coded up a loader for the .obj format http://en.wikipedia.org/wiki/Wavefront_.obj_file It loads in the geometry for the vertices, normals and texture coords along with the materials and the lighting model. I started with rendering a flat shaded model followed by getting the texturing working. For some reason the .tga files [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=robinelvin.wordpress.com&amp;blog=9309697&amp;post=49&amp;subd=robinelvin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Just another brief update on progress.</p>
<p>I&#8217;ve coded up a loader for the .obj format <a href="http://en.wikipedia.org/wiki/Wavefront_.obj_file">http://en.wikipedia.org/wiki/Wavefront_.obj_file</a><br />
It loads in the geometry for the vertices, normals and texture coords along with the materials and the lighting model. I started with rendering a flat shaded model followed by getting the texturing working. For some reason the .tga files seem to have some of the wrong colours. Also some of the texture coords seem to be off but not that many. I wonder if it&#8217;s an error in the file.</p>
<p>Anyway, here&#8217;s another screenshot:</p>
<p><a href="http://robinelvin.files.wordpress.com/2011/04/screenshot-1.png"><img class="alignnone size-full wp-image-50" title=".obj models" src="http://robinelvin.files.wordpress.com/2011/04/screenshot-1.png?w=630&#038;h=489" alt="Picture of church and house" width="630" height="489" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/robinelvin.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/robinelvin.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/robinelvin.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/robinelvin.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/robinelvin.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/robinelvin.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/robinelvin.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/robinelvin.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/robinelvin.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/robinelvin.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/robinelvin.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/robinelvin.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/robinelvin.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/robinelvin.wordpress.com/49/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=robinelvin.wordpress.com&amp;blog=9309697&amp;post=49&amp;subd=robinelvin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://robinelvin.wordpress.com/2011/04/19/alias-wavefront-obj-loader/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/539c06eb809028369739bee111e3de1c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">robinelvin</media:title>
		</media:content>

		<media:content url="http://robinelvin.files.wordpress.com/2011/04/screenshot-1.png" medium="image">
			<media:title type="html">.obj models</media:title>
		</media:content>
	</item>
		<item>
		<title>Landscapes and Vehicles</title>
		<link>http://robinelvin.wordpress.com/2011/04/08/landscapes-and-vehicles/</link>
		<comments>http://robinelvin.wordpress.com/2011/04/08/landscapes-and-vehicles/#comments</comments>
		<pubDate>Fri, 08 Apr 2011 12:29:28 +0000</pubDate>
		<dc:creator>Robin Elvin</dc:creator>
				<category><![CDATA[OpenGL Game]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[opengl]]></category>

		<guid isPermaLink="false">http://robinelvin.wordpress.com/?p=43</guid>
		<description><![CDATA[Here&#8217;s an update on how my game engine is progressing. I&#8217;ve made some good progress lately and I&#8217;m motivated to continue now The latest things I&#8217;ve added are, landscape rendering, texture loading, MD2 model loading &#38; rendering and font rendering. Landscape I&#8217;ve started by rendering some terrain data using the Robot Frog algorithm &#8211; see http://www.stuffwithstuff.com/robot-frog/3d/hills/index.html [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=robinelvin.wordpress.com&amp;blog=9309697&amp;post=43&amp;subd=robinelvin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s an update on how my game engine is progressing. I&#8217;ve made some good progress lately and I&#8217;m motivated to continue now <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The latest things I&#8217;ve added are, landscape rendering, texture loading, MD2 model loading &amp; rendering and font rendering.</p>
<h2>Landscape</h2>
<p>I&#8217;ve started by rendering some terrain data using the Robot Frog algorithm &#8211; see <a href="http://www.stuffwithstuff.com/robot-frog/3d/hills/index.html">http://www.stuffwithstuff.com/robot-frog/3d/hills/index.html</a></p>
<p>I&#8217;ve created a utility program which generates the heightmap data and writes it out to a custom binary format which the engine reads in. The rendering is not optimised in any way at present. My crude rendering algorithm at the moment is simply using a nested loop to iterate through the heightmap data in both dimensions and plotting the 2 triangle required to represent 1 terrain square. For each triangle vertex the y co-ordinate is the heightmap data at the corresponding location and the z co-ordinate is the outer loop&#8217;s counter. The x co-ordinate comes from the inner loop.</p>
<p>Obviously I need to work on several things here:</p>
<ul>
<li>OpenGL Triangle Strips &#8211; these will be more efficient than single polygons</li>
<li>Level-Of-Detail &#8211; large terrain areas of similar height can be represented by less polygons</li>
<li>View Frustum Culling &#8211; not rendering polygons outside the viewing cone</li>
</ul>
<p>Those things are next to tackle on my list but not necessarily in that order. I can see a lot of interdependencies and chicken-egg things so not sure where to start. Probably the frustum culling.</p>
<h2>MD2 Models</h2>
<p>I&#8217;ve added a class which represents a Quake 2 MD2 format model. To be honest this code was mostly lifted from David Henry&#8217;s site <a href="http://tfc.duke.free.fr/old/models/md2.htm">http://tfc.duke.free.fr/old/models/md2.htm</a> with tailoring for my purpose/code style. I&#8217;ve chosen MD2 as it seems a popular enough format, because it is documented and there is sample code around.</p>
<p>Currently the engine loads up 1 model and places it in the world. I need to flash out the model class to include movement, rotation, bounding tests amongst other things. I also need to create a list of objects in the engine so that it can manage many models.</p>
<h2>Font Rendering</h2>
<p>I&#8217;ve also added some crude font rendering which allows on-screen output rather than printing to the shell. I expect to beef this up as development continues.</p>
<h2>Screenshot</h2>
<p>Here is a screenshot of work so far</p>
<p><a href="http://robinelvin.files.wordpress.com/2011/04/screenshot1.png"><img class="alignnone size-full wp-image-47" title="Progress so far" src="http://robinelvin.files.wordpress.com/2011/04/screenshot1.png?w=630&#038;h=484" alt="Wireframe landscape" width="630" height="484" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/robinelvin.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/robinelvin.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/robinelvin.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/robinelvin.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/robinelvin.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/robinelvin.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/robinelvin.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/robinelvin.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/robinelvin.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/robinelvin.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/robinelvin.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/robinelvin.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/robinelvin.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/robinelvin.wordpress.com/43/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=robinelvin.wordpress.com&amp;blog=9309697&amp;post=43&amp;subd=robinelvin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://robinelvin.wordpress.com/2011/04/08/landscapes-and-vehicles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/539c06eb809028369739bee111e3de1c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">robinelvin</media:title>
		</media:content>

		<media:content url="http://robinelvin.files.wordpress.com/2011/04/screenshot1.png" medium="image">
			<media:title type="html">Progress so far</media:title>
		</media:content>
	</item>
		<item>
		<title>Python C extension &#8216;memory leak&#8217;</title>
		<link>http://robinelvin.wordpress.com/2011/03/24/python-c-extension-memory-leak/</link>
		<comments>http://robinelvin.wordpress.com/2011/03/24/python-c-extension-memory-leak/#comments</comments>
		<pubDate>Thu, 24 Mar 2011 16:21:50 +0000</pubDate>
		<dc:creator>Robin Elvin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://robinelvin.wordpress.com/?p=38</guid>
		<description><![CDATA[When creating extensions to Python using C you must be very careful with your reference counting or you will get a memory leak. It&#8217;s because the Python Garbage Collector cannot release the memory used by objects if they still have a reference. It gets tricky when determining the difference between a real reference and a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=robinelvin.wordpress.com&amp;blog=9309697&amp;post=38&amp;subd=robinelvin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When creating extensions to Python using C you must be very careful with your reference counting or you will get a memory leak. It&#8217;s because the Python Garbage Collector cannot release the memory used by objects if they still have a reference.</p>
<p>It gets tricky when determining the difference between a real reference and a so-called &#8216;borrowed&#8217; reference. A borrowed reference is one where some code, say a method call, uses the reference already owned by the caller.</p>
<p>Recently I had cause to write a C extension to Python which created and returned a dictionary object. My initial code contained something like this:</p>
<pre>my_dict = PyDict_New();
PyDict_SetItemString(my_dict, "id", Py_BuildValue("i", 1) );
return my_dict;</pre>
<p>However, using this method of creating a PyObject and assigning it to the dict in one call caused the reference count to be 1 higher than it should be and therefore unable to be garbage collected. That as we know is a bad thing. I am still unsure as to why this should increment the reference count when Py_BuildValue is called and then increment it again when given to the dictionary.</p>
<p>So, a bit more code is needed in order for us to keep the reference count at the right level. Here is the equivalent code to the above done in the correct way:</p>
<pre>my_dict = PyDict_New();
PyObject *id = Py_BuildValue("i", 1);
PyDict_SetItemString(my_dict, "id", id);
Py_DECREF(id);
return my_dict;</pre>
<p>The obvious difference is that we create the PyObject first, assign it to the dict and then decrease the reference count as we no longer need it.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/robinelvin.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/robinelvin.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/robinelvin.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/robinelvin.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/robinelvin.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/robinelvin.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/robinelvin.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/robinelvin.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/robinelvin.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/robinelvin.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/robinelvin.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/robinelvin.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/robinelvin.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/robinelvin.wordpress.com/38/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=robinelvin.wordpress.com&amp;blog=9309697&amp;post=38&amp;subd=robinelvin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://robinelvin.wordpress.com/2011/03/24/python-c-extension-memory-leak/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/539c06eb809028369739bee111e3de1c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">robinelvin</media:title>
		</media:content>
	</item>
		<item>
		<title>Start of Terrain Engine LOD</title>
		<link>http://robinelvin.wordpress.com/2010/10/19/starting-terrain-engine-lod/</link>
		<comments>http://robinelvin.wordpress.com/2010/10/19/starting-terrain-engine-lod/#comments</comments>
		<pubDate>Tue, 19 Oct 2010 11:29:47 +0000</pubDate>
		<dc:creator>Robin Elvin</dc:creator>
				<category><![CDATA[OpenGL Game]]></category>
		<category><![CDATA[algorithms]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[opengl]]></category>

		<guid isPermaLink="false">http://robinelvin.wordpress.com/?p=27</guid>
		<description><![CDATA[Here&#8217;s another brief update on the game project. I&#8217;ve been looking at terrain LOD algorithms and I&#8217;ve found the papers a bit heavy going. It&#8217;s weird that all the maths looks really complicated when written down and yet I can read the implementation in code and understand it much easier. I&#8217;ve been looking at this [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=robinelvin.wordpress.com&amp;blog=9309697&amp;post=27&amp;subd=robinelvin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s another brief update on the game project. I&#8217;ve been looking at terrain LOD algorithms and I&#8217;ve found the papers a bit heavy going. It&#8217;s weird that all the maths looks really complicated when written down and yet I can read the implementation in code and understand it much easier.</p>
<p>I&#8217;ve been looking at <a href="http://www.google.co.uk/url?sa=t&amp;source=web&amp;cd=4&amp;sqi=2&amp;ved=0CCUQFjAD&amp;url=http%3A%2F%2Fwww.academypublisher.com%2Fojs%2Findex.php%2Fjsw%2Farticle%2FviewFile%2F0507769776%2F1957&amp;ei=yxK8TIurCNCWOsuRoZ4N&amp;usg=AFQjCNGWqiVrEE56k2-OTDonEtLrjzR_bQ">this algorithm</a> as it looks quite simple and I&#8217;m all for keeping things simple. I&#8217;ve made a start already and hope to get it working by the end of the week!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/robinelvin.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/robinelvin.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/robinelvin.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/robinelvin.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/robinelvin.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/robinelvin.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/robinelvin.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/robinelvin.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/robinelvin.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/robinelvin.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/robinelvin.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/robinelvin.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/robinelvin.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/robinelvin.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=robinelvin.wordpress.com&amp;blog=9309697&amp;post=27&amp;subd=robinelvin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://robinelvin.wordpress.com/2010/10/19/starting-terrain-engine-lod/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/539c06eb809028369739bee111e3de1c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">robinelvin</media:title>
		</media:content>
	</item>
		<item>
		<title>OpenGL Game Project</title>
		<link>http://robinelvin.wordpress.com/2010/10/18/opengl-game-project/</link>
		<comments>http://robinelvin.wordpress.com/2010/10/18/opengl-game-project/#comments</comments>
		<pubDate>Mon, 18 Oct 2010 10:44:04 +0000</pubDate>
		<dc:creator>Robin Elvin</dc:creator>
				<category><![CDATA[OpenGL Game]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[opengl]]></category>
		<category><![CDATA[sdl]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://robinelvin.wordpress.com/?p=25</guid>
		<description><![CDATA[Just a quick post on my latest personal project: a free-roaming strategy game. So far I have set up my dev environment which is: Linux &#8211; Ubuntu 10.4 SDL OpenGL Code::Blocks Code::Blocks seems to be just what I need which is a no-nonsense C/C++ IDE that handles the GNU Toolchain setup for me. This means [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=robinelvin.wordpress.com&amp;blog=9309697&amp;post=25&amp;subd=robinelvin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Just a quick post on my latest personal project: a free-roaming strategy game.</p>
<p>So far I have set up my dev environment which is:</p>
<ul>
<li>Linux &#8211; Ubuntu 10.4</li>
<li>SDL</li>
<li>OpenGL</li>
<li>Code::Blocks</li>
</ul>
<p>Code::Blocks seems to be just what I need which is a no-nonsense C/C++ IDE that handles the GNU Toolchain setup for me. This means I can just get on with coding. However, I spent all of Sunday evening trying to get it working with SDL on Mac OS with no luck. I&#8217;ll be sticking to Linux for now and I&#8217;ll revisit that some other time as it isn&#8217;t a priority.</p>
<p>So far I have got the basics which is to say I have opened a window, got an OpenGL rendering context and drawn a colourful pyramid. Next up is the generation and rendering of some terrain data.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/robinelvin.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/robinelvin.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/robinelvin.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/robinelvin.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/robinelvin.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/robinelvin.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/robinelvin.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/robinelvin.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/robinelvin.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/robinelvin.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/robinelvin.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/robinelvin.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/robinelvin.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/robinelvin.wordpress.com/25/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=robinelvin.wordpress.com&amp;blog=9309697&amp;post=25&amp;subd=robinelvin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://robinelvin.wordpress.com/2010/10/18/opengl-game-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/539c06eb809028369739bee111e3de1c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">robinelvin</media:title>
		</media:content>
	</item>
		<item>
		<title>AutoFS with Guest Account</title>
		<link>http://robinelvin.wordpress.com/2010/09/06/autofs-with-guest-account/</link>
		<comments>http://robinelvin.wordpress.com/2010/09/06/autofs-with-guest-account/#comments</comments>
		<pubDate>Mon, 06 Sep 2010 11:40:35 +0000</pubDate>
		<dc:creator>Robin Elvin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[AutoFS]]></category>
		<category><![CDATA[CIFS]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Samba]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://robinelvin.wordpress.com/?p=23</guid>
		<description><![CDATA[Today I tried to get an Ubuntu server running AutoFS to connect to my MacBook using a guest account. Here&#8217;s how I got it working. First up, open up your System Preferences on the Mac and under Accounts add a sharing only account with the username guest having no password. Next go to the Sharing [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=robinelvin.wordpress.com&amp;blog=9309697&amp;post=23&amp;subd=robinelvin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Today I tried to get an Ubuntu server running AutoFS to connect to my MacBook using a guest account. Here&#8217;s how I got it working.</p>
<p>First up, open up your System Preferences on the Mac and under Accounts add a sharing only account with the username guest having no password. Next go to the Sharing section ensure File Sharing is enabled with Windows Sharing on. Click Options and select the guest account you just made. I would recommend you only allow the guest account read-only access by setting the share permissions on the &#8216;Everyone&#8217; user.</p>
<p>Now follow these instructions for setting up the Ubuntu side: <a title="Ubuntu AutoFS Samba CIFS Tweak" href="http://www.vurt.co.uk/2010/02/25/ubuntu-autofs-sambacifs-tweak/">http://www.vurt.co.uk/2010/02/25/ubuntu-autofs-sambacifs-tweak/</a></p>
<p>Now create an autofs.smb.master file containing:</p>
<pre>username=guest
password=</pre>
<p>After this you can access the Mac shares under /smb/<em>mac-hostname</em>/</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/robinelvin.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/robinelvin.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/robinelvin.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/robinelvin.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/robinelvin.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/robinelvin.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/robinelvin.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/robinelvin.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/robinelvin.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/robinelvin.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/robinelvin.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/robinelvin.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/robinelvin.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/robinelvin.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=robinelvin.wordpress.com&amp;blog=9309697&amp;post=23&amp;subd=robinelvin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://robinelvin.wordpress.com/2010/09/06/autofs-with-guest-account/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/539c06eb809028369739bee111e3de1c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">robinelvin</media:title>
		</media:content>
	</item>
		<item>
		<title>Trac Locale setting in WSGI</title>
		<link>http://robinelvin.wordpress.com/2010/03/04/trac-locale-setting-in-wsgi/</link>
		<comments>http://robinelvin.wordpress.com/2010/03/04/trac-locale-setting-in-wsgi/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 13:01:42 +0000</pubDate>
		<dc:creator>Robin Elvin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[trac]]></category>
		<category><![CDATA[wsgi]]></category>

		<guid isPermaLink="false">http://robinelvin.wordpress.com/?p=18</guid>
		<description><![CDATA[If you are running Trac under mod_wsgi and you are not in the US then you will probably need to set your locale. This is achieved by the following wsgi script: import trac.web.main _application = trac.web.main.dispatch_request def application(environ, start_response):   environ['trac.locale'] = 'en-GB'   return _application(environ, start_response)<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=robinelvin.wordpress.com&amp;blog=9309697&amp;post=18&amp;subd=robinelvin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you are running Trac under mod_wsgi and you are not in the US then you will probably need to set your locale.</p>
<p>This is achieved by the following wsgi script:</p>
<pre>import trac.web.main

_application = trac.web.main.dispatch_request

def application(environ, start_response):
  environ['trac.locale'] = 'en-GB'
  return _application(environ, start_response)</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/robinelvin.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/robinelvin.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/robinelvin.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/robinelvin.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/robinelvin.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/robinelvin.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/robinelvin.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/robinelvin.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/robinelvin.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/robinelvin.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/robinelvin.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/robinelvin.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/robinelvin.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/robinelvin.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=robinelvin.wordpress.com&amp;blog=9309697&amp;post=18&amp;subd=robinelvin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://robinelvin.wordpress.com/2010/03/04/trac-locale-setting-in-wsgi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/539c06eb809028369739bee111e3de1c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">robinelvin</media:title>
		</media:content>
	</item>
	</channel>
</rss>
