<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8386776496812196127</id><updated>2011-10-14T06:53:56.250-07:00</updated><category term='http://2.bp.blogspot.com/_e9SD96r57E0/TEx2oXQyVII/AAAAAAAAAIE/kNVmwYFxisw/s1600/basic_ai.png'/><title type='text'>The P Project</title><subtitle type='html'>Powermonger Remake</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://arkiruthis.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://arkiruthis.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Arkiruthis</name><uri>http://www.blogger.com/profile/07908927621630737811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://3.bp.blogspot.com/_e9SD96r57E0/TFP26a9Y3QI/AAAAAAAAAJE/ka6uNW5ovC0/S220/Squadron+Commander+Flashart(1).jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>26</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8386776496812196127.post-2474602347841284609</id><published>2011-06-23T01:01:00.000-07:00</published><updated>2011-06-23T01:28:45.849-07:00</updated><title type='text'>Lorem ipsum dolor sit amet</title><content type='html'>What's been happening? Not much. My PC has been in boxes for a couple of weeks whilst I've been moving house, this coupled with a heavy workload (but learning Android development, fun!), doing French, Russian and Ju Jitsu in the evenings (not at the same class) and attempting to draw again and remixing some tracks for a friend is making dev time somewhat scarce.&lt;br /&gt;&lt;br /&gt;However, a commenter asks (thanks "WebSurfinMurf") whether the source will be available. Yes, absolutely. In fact, it may even be necessary to see certain portions of the game finished that I'm not terribly interested in. My plan is to do a decent tidy of the source code and then put it on a free account at GitHub, despite the fact I've been using SVN so far and have no real experience with Git... though I'm told it's easy enough.&lt;br /&gt;&lt;br /&gt;Videos... videos! No apologies for the quality of this one, I'm using a USB2.0 video capture dongle with good old NTSC. So it looks like a lot of the US TV shows that got shown over here in the 80s. ;-)&lt;br /&gt;&lt;br /&gt;&lt;iframe width="480" height="390" src="http://www.youtube.com/embed/xdLOQFCnvY0" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Currently things are based on context. Click on an area of land, Captain moves there. Click on a Settlement banner, he'll recruit if it's friendly, attack if it's hostile. Likewise for entities. I'll set it so that clicking on buildings and agents goes up the heirarchy if appropriate. For buildings, clicking the workshop will initiate a workshop process, etc. No need for icons.&lt;br /&gt;&lt;br /&gt;The resources for the project aren't too bad, but I need to strip everything out of the default Ogre media folder that isn't directly related to the project.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Instancing&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A problem that's come up lately (particularly on a couple of low-end machines) is that OGRE slows down massively with multiple entities. (in Ogre, an Entity is a mesh, with material and animations, and attached to a positional node in the 3D scene). With about 50 units in a large army, and 50 units in large towns, often about 300-400 geometry batches are being sent to the graphics card. It's not really the 'amount' of triangles, it's more the fact that it's being sent in many batches, as apposed to sending a few batches with tons of triangles which is much more efficient.&lt;br /&gt;&lt;br /&gt;OGRE has support for Instancing ( http://www.ogre3d.org/docs/api/html/classOgre_1_1InstancedGeometry.html ) , but the changes required in the code to support this are pretty horrendous and kinda break the paradigm that links game entities with their OGRE entities.&lt;br /&gt;&lt;br /&gt;We may have to just see how it plays on people's machines to see if it's going to be an issue. Also, I'd like to keep individual entities as it makes selection much easier.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8386776496812196127-2474602347841284609?l=arkiruthis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arkiruthis.blogspot.com/feeds/2474602347841284609/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arkiruthis.blogspot.com/2011/06/lorem-ipsum-dolor-sit-amet.html#comment-form' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/2474602347841284609'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/2474602347841284609'/><link rel='alternate' type='text/html' href='http://arkiruthis.blogspot.com/2011/06/lorem-ipsum-dolor-sit-amet.html' title='Lorem ipsum dolor sit amet'/><author><name>Arkiruthis</name><uri>http://www.blogger.com/profile/07908927621630737811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://3.bp.blogspot.com/_e9SD96r57E0/TFP26a9Y3QI/AAAAAAAAAJE/ka6uNW5ovC0/S220/Squadron+Commander+Flashart(1).jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/xdLOQFCnvY0/default.jpg' height='72' width='72'/><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8386776496812196127.post-6394153201960436532</id><published>2011-04-18T06:08:00.000-07:00</published><updated>2011-04-18T08:39:52.419-07:00</updated><title type='text'>But before I go...</title><content type='html'>I didn't want to leave the blog for a while without posting a video of the current build in &lt;a href="http://www.ogre3d.org/"&gt;Ogre3D&lt;/a&gt;. So I didn't. So there. Annotated for maximum annoyance. ;o)&lt;br /&gt;&lt;br /&gt;&lt;iframe title="YouTube video player" src="http://www.youtube.com/embed/Z0Xrhl1RsKU" allowfullscreen="" frameborder="0" height="390" width="480"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Code&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I've started getting into Boost recently. It's a dependency of Ogre, so it makes sense to use it. In particular, it's filter_iterator is immensely useful.&lt;br /&gt;&lt;br /&gt;Also, some of the new features of &lt;a href="http://en.wikipedia.org/wiki/C%2B%2B0x"&gt;C++0x&lt;/a&gt; are proving useful as well. I love the new &lt;a href="http://en.wikipedia.org/wiki/C%2B%2B0x#Type_inference"&gt;auto&lt;/a&gt; keyword, where the compiler automatically works out what type the variable should be based upon the assignment it gets.&lt;br /&gt;&lt;br /&gt;Unfortunately... the version of GCC that comes with XCode doesn't support these yet, so much time was spent changing things like:&lt;br /&gt;&lt;pre class="csharpcode"&gt;auto filterIt;&lt;/pre&gt;&lt;br /&gt;back to...&lt;br /&gt;&lt;pre class="csharpcode"&gt;boost::filter_iterator&amp;lt;std::const_mem_fun&amp;lt;&lt;span class="kwrd"&gt;bool&lt;/span&gt;, Agent*&amp;gt;, &lt;span class="rem"&gt;// continued...&lt;/span&gt;&lt;br /&gt;vector&amp;lt;Agent*&amp;gt;::iterator&amp;gt; filterIt; &lt;span class="rem"&gt;// ... on a new line.&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;which was fun...&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Music&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Also, a quick note to awesome composer Tim Wright. I was curious about the synths and sounds used in the original Powermonger themetune. I dropped an email to Tim ( &lt;a href="http://www.coldstorage.org.uk/"&gt;www.coldstorage.org.uk&lt;/a&gt; ) who did the original. He very kindly sent me an email with all sorts of interesting stuff about the original theme (some sounds were from the KAWAI K1 and others from actual orchestral recordings), which was awesome. He also did the music for the (acoustically and visually amazing) ST/Amiga games "Shadow Of the Beast II" and "III" which are well worth a listen if you have something that plays .mod files. He's still very much the top composer, so I heartily recommend dropping by his website and having a listen. Thanks Tim!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8386776496812196127-6394153201960436532?l=arkiruthis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arkiruthis.blogspot.com/feeds/6394153201960436532/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arkiruthis.blogspot.com/2011/04/but-before-i-go.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/6394153201960436532'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/6394153201960436532'/><link rel='alternate' type='text/html' href='http://arkiruthis.blogspot.com/2011/04/but-before-i-go.html' title='But before I go...'/><author><name>Arkiruthis</name><uri>http://www.blogger.com/profile/07908927621630737811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://3.bp.blogspot.com/_e9SD96r57E0/TFP26a9Y3QI/AAAAAAAAAJE/ka6uNW5ovC0/S220/Squadron+Commander+Flashart(1).jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/Z0Xrhl1RsKU/default.jpg' height='72' width='72'/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8386776496812196127.post-2091565323790435081</id><published>2011-03-31T06:23:00.000-07:00</published><updated>2011-03-31T06:41:05.604-07:00</updated><title type='text'>Big long post (and then a break).</title><content type='html'>Hi guys, I want to wait until I have something playable before posting again, so there's going to be a long break. &lt;br /&gt;&lt;br /&gt;I'm having a "dark night of the soul" about a few things, and wanted some feedback. &lt;br /&gt;&lt;br /&gt;I think a lot of people are expecting an exact replica of Powermonger's interface, with the stone table, map on the left, captains at the back, etc.&lt;br /&gt;&lt;br /&gt;To be honest, one of the things I hated about Powermonger was the usability aspects:&lt;br /&gt;- The table buttons were (for me) hard to click, and find quickly. &lt;br /&gt;- The isometric view made things terrible to select, find at certain angles, the rotation was useless (and screwed up move direction).&lt;br /&gt;- The extra Captains didn't really 'work' properly enough to be worth utilising (unless you sent them to fight a Captain with an archer army where your Captain would get killed very quickly). &lt;br /&gt;&lt;br /&gt;If I end up just remaking the existing game, I can't help feeling I will have:&lt;br /&gt;- Made a poor-man's imitation of something the original PowerMonger on DOSBox did better.&lt;br /&gt;- Possibly be asked to take it down by EA. (who have mused recently about resurrecting old IPs) &lt;br /&gt;&lt;br /&gt;Q: At what point does a Powermonger clone stop being Powermonger?&lt;br /&gt;&lt;br /&gt;For me, at least, Powermonger is the game. No micromanagement-nonsense that ruined Black and White. Not the horrible restricted view and table interface that ruined Powermonger (for me, at least). An immediately accessible game where you start out with a small rabble and impose your will on a very pretty map of nasties, with all the fun of building weapons, eating sheep and watching little people go about their business. &lt;br /&gt;&lt;br /&gt;My own dream about Powermonger is the full 3D interface of "Black and White 2", where you were free to roam and spin the map in a very usable (imho) way. But 'in world' everything is like the original Powermonger. I want the user to be able to move around the game map freely, easily and efficiently, setting up the view camera anywhere. However, if you zoom out fully, you see the whole world, it's settlements, flags and troops... and the whole war room and table, with captains standing around.&lt;br /&gt;&lt;br /&gt;So... if you have the time to spare:-&lt;br /&gt;&lt;br /&gt;What aspects of the game actually made it Powermonger to you? (and without which it's not the same)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8386776496812196127-2091565323790435081?l=arkiruthis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arkiruthis.blogspot.com/feeds/2091565323790435081/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arkiruthis.blogspot.com/2011/03/big-long-post-and-then-break.html#comment-form' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/2091565323790435081'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/2091565323790435081'/><link rel='alternate' type='text/html' href='http://arkiruthis.blogspot.com/2011/03/big-long-post-and-then-break.html' title='Big long post (and then a break).'/><author><name>Arkiruthis</name><uri>http://www.blogger.com/profile/07908927621630737811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://3.bp.blogspot.com/_e9SD96r57E0/TFP26a9Y3QI/AAAAAAAAAJE/ka6uNW5ovC0/S220/Squadron+Commander+Flashart(1).jpg'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8386776496812196127.post-3875708241327292148</id><published>2011-03-25T05:04:00.000-07:00</published><updated>2011-03-25T05:24:02.952-07:00</updated><title type='text'>Advice needed on plug&amp;play GameWorlds.</title><content type='html'>At the moment, my BaseGameEntity classes (inside my main GameWorld  class) have a virtual Draw() function which derived classes use to call some OpenGL commands.&lt;br /&gt;&lt;br /&gt;Ideally, I would like to make my main GameWorld class completely locked up and independant of any rendering engine.&lt;br /&gt;&lt;br /&gt;i.e., GameWorld can create a world, populate it, accept input messages and take a time value (delta time) to update the GameWorld. Completely on it's own without any 3rd party, OpenGL, DirectX, OGRE3D etc. proprietry engine.&lt;br /&gt;&lt;br /&gt;For those in the know, what is the best (or most common sense) way to 'interface' such a closed system? The renderering engine (which I'll call &lt;span style="font-weight: bold;"&gt;AssociatedRenderer&lt;/span&gt;)  basically needs to have knowledge of each entity it renders. For all intents and purposes, it's needs a "BaseGameEntity" pointer handed to it for each entity in the game, updated each loop cycle.&lt;br /&gt;&lt;br /&gt;Should I add an &lt;span style="font-weight: bold;"&gt;AssociatedRenderer &lt;/span&gt;'interface' class to each BaseGameEntity that has the following properties?&lt;br /&gt;&lt;br /&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;class&lt;/span&gt; AssociatedRenderer {&lt;br /&gt;- &lt;span class="kwrd"&gt;void&lt;/span&gt; Attach(BaseGameEntity *); &lt;span class="rem"&gt;// i.e., -&amp;gt;Attach(this);&lt;br&gt; called in BaseGameEntity constructor&lt;/span&gt;&lt;br /&gt;- &lt;span class="kwrd"&gt;void&lt;/span&gt; Update(&lt;span class="kwrd"&gt;void&lt;/span&gt;); &lt;span class="rem"&gt;// i.e., in OpenGL this draws, in OGRE&lt;br&gt; this updates entity positions.&lt;/span&gt;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;... and leave it to each project that uses GameWorld how to implement AssociatedRenderer?&lt;br /&gt;&lt;br /&gt;The downside is that I end up with different versions of AssociatedRenderer in each project that implements it differently. Could get confusing very quickly.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8386776496812196127-3875708241327292148?l=arkiruthis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arkiruthis.blogspot.com/feeds/3875708241327292148/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arkiruthis.blogspot.com/2011/03/advice-on-plug-gameworlds.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/3875708241327292148'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/3875708241327292148'/><link rel='alternate' type='text/html' href='http://arkiruthis.blogspot.com/2011/03/advice-on-plug-gameworlds.html' title='Advice needed on plug&amp;play GameWorlds.'/><author><name>Arkiruthis</name><uri>http://www.blogger.com/profile/07908927621630737811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://3.bp.blogspot.com/_e9SD96r57E0/TFP26a9Y3QI/AAAAAAAAAJE/ka6uNW5ovC0/S220/Squadron+Commander+Flashart(1).jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8386776496812196127.post-4163202291699768000</id><published>2011-03-19T05:31:00.000-07:00</published><updated>2011-03-19T05:55:31.343-07:00</updated><title type='text'>Go with the (state) flow.</title><content type='html'>Been very busy with job and stuff since the last update, but work on the game has still been going on in the meantime. Mostly annoyances with a screwed-up state flow that was causing some very wierd behaviour from agents. Mostly in the message phases where agents, settlements and captains respond to messages from other entities. Also delayed messages were occasionally being repeated resulting in huge stacks of delayed messages.&lt;br /&gt;&lt;br /&gt;But since last update:&lt;br /&gt;- Properly implemented Retreat states for Captains and Agents. (similarly to the original, if a Captain dies, then his troops disband and run off back home. If their home has changed allegiance, they'll join that settlement's new allegiance.)&lt;br /&gt;- Added Aggression (Min, Med, Max) similar to the original. (i.e., auto Max if attacked by another agent, or defending a settlement).&lt;br /&gt;- Added Captains to anything larger than a medium settlement.&lt;br /&gt;- Captains have 'Marauder' status, which determines whether they stay at home or go on conquests.&lt;br /&gt;- Visual C++, XCode and Codeblocks projects. (I jump between them as occasionally something comes up I wouldn't have spotted on another platform. In particular, on OSX a 3rd party font library I was using was pulling a struct pointer value from a file { it must've dumped the pointer doing an fwrite of a struct with a pointer member } ... and on OSX it was pulling a 64bit pointer instead of a 32bit one, so the graphics were all garbled.)&lt;br /&gt;&lt;br /&gt;&lt;iframe title="YouTube video player" src="http://www.youtube.com/embed/MToeuIAgdV0" allowfullscreen="" frameborder="0" height="390" width="480"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;I could be tempted to move into the graphical phase now, adding a Terrain class, etc. I think I will probably end up using Ogre to do the 3D part as it makes selection of 3D objects very easy, and also handles a lot of tasks that have very little bearing on the game itself. Also, I don't really want to waste time bogged down in certain areas. Ideally, the Game class will run in it's encapsulated form so that it can be plugged in with Ogre or anything else.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8386776496812196127-4163202291699768000?l=arkiruthis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arkiruthis.blogspot.com/feeds/4163202291699768000/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arkiruthis.blogspot.com/2011/03/go-with-state-flow.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/4163202291699768000'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/4163202291699768000'/><link rel='alternate' type='text/html' href='http://arkiruthis.blogspot.com/2011/03/go-with-state-flow.html' title='Go with the (state) flow.'/><author><name>Arkiruthis</name><uri>http://www.blogger.com/profile/07908927621630737811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://3.bp.blogspot.com/_e9SD96r57E0/TFP26a9Y3QI/AAAAAAAAAJE/ka6uNW5ovC0/S220/Squadron+Commander+Flashart(1).jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/MToeuIAgdV0/default.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8386776496812196127.post-7747046101885605367</id><published>2011-01-09T06:21:00.001-08:00</published><updated>2011-01-09T06:42:17.197-08:00</updated><title type='text'>Texture testing.</title><content type='html'>As lovely as OGRE is, I think I'll probably stick with OpenGL/SDL for now. There's always the possibility of porting later. Kinda ties in with the next bit.&lt;br /&gt;&lt;br /&gt;In order to picque my interest, I started playing around ideas for the terrain engine.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.mobygames.com/images/shots/l/13089-populous-the-beginning-windows-screenshot-my-followers-having.jpg"&gt;&lt;img style="float: left; margin: 0pt 10px 10px 0pt; cursor: pointer; width: 193px; height: 144px;" src="http://www.mobygames.com/images/shots/l/13089-populous-the-beginning-windows-screenshot-my-followers-having.jpg" alt="" border="0" /&gt;&lt;/a&gt;A few years back, a sequel to Populous was released, called "Populous: The Beginning". I remember seeing the preview screenshots in a magazine (PC Gamer, possibly) and in particular I liked the way they did the terrain. (Image courtesy of MobyGames)&lt;br /&gt;&lt;br /&gt;Whilst you couldn't arbitrarily raise and lower the land, you could use your shaman to build bridges across the terrain. The effect was very funky. Land would rise out of the ocean and the textures for sand and grass came through a kind of textured 'stencil'.&lt;br /&gt;&lt;br /&gt;So, I started playing around this weekend with something similar. The screenshot is just a single tile where each corner has a height value.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_e9SD96r57E0/TSnIETcY2lI/AAAAAAAAAKQ/F1Bm1-djHC0/s1600/texture_combination.jpg"&gt;&lt;img style="float: left; margin: 0pt 10px 10px 0pt; cursor: pointer; width: 200px; height: 172px;" src="http://1.bp.blogspot.com/_e9SD96r57E0/TSnIETcY2lI/AAAAAAAAAKQ/F1Bm1-djHC0/s200/texture_combination.jpg" alt="" id="BLOGGER_PHOTO_ID_5560195191229962834" border="0" /&gt;&lt;/a&gt;The process I went for is roughly this:&lt;br /&gt;1. Do a bilinear interpolation between the corner terrain height values to get a smooth heightmap (just greyscale).&lt;br /&gt;2. Apply a displacement map loaded from a texture (greyscale as well).&lt;br /&gt;3. Use this heightmap as the basis for mixing pixels between 2 different textures (e.g., grass, sand, ocean, mountain etc.). If your range is (0-255) and the current height is 63, then you would take (63/256.f)*TextureOne + (1 - (63/256.f))*TextureTwo for each RGB bit.&lt;br /&gt;4. At each point on the heightmap, do a cheeky (heightmap(x, z) - heightmap(x+1, z)) to get a cheap 'gradient' value which you can add to the colour fragments to obtain a cheap bump effect.&lt;br /&gt;&lt;br /&gt;For performance I'll probably have to use one 256x256 map over a group of vertices... rather than one per quad!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8386776496812196127-7747046101885605367?l=arkiruthis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arkiruthis.blogspot.com/feeds/7747046101885605367/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arkiruthis.blogspot.com/2011/01/texture-testing.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/7747046101885605367'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/7747046101885605367'/><link rel='alternate' type='text/html' href='http://arkiruthis.blogspot.com/2011/01/texture-testing.html' title='Texture testing.'/><author><name>Arkiruthis</name><uri>http://www.blogger.com/profile/07908927621630737811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://3.bp.blogspot.com/_e9SD96r57E0/TFP26a9Y3QI/AAAAAAAAAJE/ka6uNW5ovC0/S220/Squadron+Commander+Flashart(1).jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_e9SD96r57E0/TSnIETcY2lI/AAAAAAAAAKQ/F1Bm1-djHC0/s72-c/texture_combination.jpg' height='72' width='72'/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8386776496812196127.post-8643434726321443513</id><published>2010-12-30T07:11:00.000-08:00</published><updated>2010-12-30T09:17:37.976-08:00</updated><title type='text'>Re-inventing the wheel.</title><content type='html'>As it transpired, the font rendering code (gltexfont) I used for the console didn't seem to work on the Mac versions (just got garbled output). Not sure whether it was a difference in the way files are read, etc. Anyway, I realised at this point I should probably start working on Texture loading/utilising code and Font code etc. which didn't take too long.&lt;br /&gt;&lt;br /&gt;Basically, there are some tasks that just bore me. Texture loaders, managers, font rendering, image loading, object loading, etc. Basically, anything that stands in the way of actually putting a game together.&lt;br /&gt;&lt;br /&gt;About a week before Christmas I started looking into game engine frameworks that could be used to save a lot of time. I tested out a few before looking into OGRE3D ( &lt;a href="http://www.ogre3d.org/"&gt;www.ogre3d.org&lt;/a&gt; ) , which seems to be implemented in a straightforward way (in fact, even basic classes like Vector3, etc. are implemented almost identically to the ones I've been using already... their coders must have a copy of the same book.).&lt;br /&gt;&lt;br /&gt;After an immensely frustrating week battling with CMake, XCode, building from source, fixing dependencies, installing boost, uninstalling boost... I was beginning to get the impression that I had wasted a lot of time. However, a week later (and thanks to some very kind and helpful people on the OGRE forums), I'm working with Ogre3D and really enjoying it. It handles things in a very intelligent way, meshes are loaded into the scene and attached to nodes and everything works on a heirarchical basis.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_e9SD96r57E0/TRy-RblbqZI/AAAAAAAAAKI/q7UEnDCB2OA/s1600/Screen%2Bshot%2B2010-12-30%2Bat%2B15.10.21.png"&gt;&lt;img style="float: left; margin: 0pt 10px 10px 0pt; cursor: pointer; width: 200px; height: 125px;" src="http://3.bp.blogspot.com/_e9SD96r57E0/TRy-RblbqZI/AAAAAAAAAKI/q7UEnDCB2OA/s200/Screen%2Bshot%2B2010-12-30%2Bat%2B15.10.21.png" alt="" id="BLOGGER_PHOTO_ID_5556525246940162450" border="0" /&gt;&lt;/a&gt;It also has a nifty Terrain engine with LOD and texture paging which is kinda cool...&lt;br /&gt;&lt;br /&gt;It's cross platform, so now I'm hoping to just plug in the GameWorld class I've been using so far and pretty much stop using the GameEngine class that's been wrapping it so far.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Also, OGRE supports lots of different object and texture formats so there's no tedious MDL loading routines etc. to write.&lt;br /&gt;&lt;br /&gt;Perhaps I can start putting the 'game' into this now. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8386776496812196127-8643434726321443513?l=arkiruthis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arkiruthis.blogspot.com/feeds/8643434726321443513/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arkiruthis.blogspot.com/2010/12/re-inventing-wheel.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/8643434726321443513'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/8643434726321443513'/><link rel='alternate' type='text/html' href='http://arkiruthis.blogspot.com/2010/12/re-inventing-wheel.html' title='Re-inventing the wheel.'/><author><name>Arkiruthis</name><uri>http://www.blogger.com/profile/07908927621630737811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://3.bp.blogspot.com/_e9SD96r57E0/TFP26a9Y3QI/AAAAAAAAAJE/ka6uNW5ovC0/S220/Squadron+Commander+Flashart(1).jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_e9SD96r57E0/TRy-RblbqZI/AAAAAAAAAKI/q7UEnDCB2OA/s72-c/Screen%2Bshot%2B2010-12-30%2Bat%2B15.10.21.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8386776496812196127.post-3393275081514368569</id><published>2010-12-07T08:28:00.001-08:00</published><updated>2010-12-07T08:59:56.565-08:00</updated><title type='text'>"Do Not Adjust Your Set"</title><content type='html'>Holiday. Yay!&lt;br /&gt;&lt;br /&gt;A lot of code thrashed at the moment. I realised that Settlements should have their own FSMs and message handling so they can respond to attacks, organise their settlers for different seasons, etc. So now armies can target and attack settlements and then recruit their settlers.&lt;br /&gt;&lt;br /&gt;However, all this mindless code hacking has produced some unexpected results.&lt;br /&gt;&lt;object width="480" height="385"&gt;&lt;param name="movie" value="http://www.youtube.com/v/BAb-4KTg5uw?fs=1&amp;amp;hl=en_GB"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/BAb-4KTg5uw?fs=1&amp;amp;hl=en_GB" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;Well... that's not right. Alas, a lot of this sort of thing happens when you spend a morning just hacking away without scribbling ideas first down on paper. Trying to figure out why soldiers are following settlers even after they've been tagged as retreating. No doubt hidden somewhere between the states and the soldier's methods being called by said states. I'll find it. &lt;br /&gt;&lt;br /&gt;On the plus side though, Captains now have a method "ConsiderOptions" in which they decide whether to find recruitable settlements, take on other Captains, take over enemy settlements (not currently implemented due to problem shown in video above), or just wander about. At the moment they only do this in the idle state. Ideally, a timer will allow polling of certain AI decisions so that they aren't run every cycle, but often enough to stop doing stupid things like chasing an army across the map that's getting bigger and bigger or heading to a village that's been emptied since the original decision to recruit it was made.&lt;br /&gt;&lt;br /&gt;&lt;object width="480" height="385"&gt;&lt;param name="movie" value="http://www.youtube.com/v/2ycbQEWfv7s?fs=1&amp;amp;hl=en_GB"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/2ycbQEWfv7s?fs=1&amp;amp;hl=en_GB" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;There's so much still to do...&lt;br /&gt;- Implement Settler States (based on occupation)&lt;br /&gt;- Add Inventory Items (boats, pikes, bows, swords, food)&lt;br /&gt;- Add Inventory Handling (Agents, Captains and Settlements can all have items)&lt;br /&gt;- Add Buildings (and makes them assignable to agents)&lt;br /&gt;- SHEEP.&lt;br /&gt;&lt;br /&gt;And that's even before putting the terrain back in, adding states for terrain edge collision detection, selection, sound, etc. etc. Oh well. It's still fun.&lt;br /&gt;&lt;br /&gt;I'm also quite behind on my mail, so apologies to anyone that hasn't had a response yet.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8386776496812196127-3393275081514368569?l=arkiruthis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arkiruthis.blogspot.com/feeds/3393275081514368569/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arkiruthis.blogspot.com/2010/12/do-not-adjust-your-set.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/3393275081514368569'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/3393275081514368569'/><link rel='alternate' type='text/html' href='http://arkiruthis.blogspot.com/2010/12/do-not-adjust-your-set.html' title='&quot;Do Not Adjust Your Set&quot;'/><author><name>Arkiruthis</name><uri>http://www.blogger.com/profile/07908927621630737811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://3.bp.blogspot.com/_e9SD96r57E0/TFP26a9Y3QI/AAAAAAAAAJE/ka6uNW5ovC0/S220/Squadron+Commander+Flashart(1).jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8386776496812196127.post-802427692020619334</id><published>2010-11-11T02:47:00.001-08:00</published><updated>2010-11-11T02:59:49.459-08:00</updated><title type='text'>Come back, I want to give you a thrashing...</title><content type='html'>Hmm, I've implemented fighting in a rather silly way. Hence, I could use some advice from those who've written these kinds of games before.&lt;br /&gt;&lt;br /&gt;Basically, when 1 Captain/Army attacks another Captain/Army, a function is called from the attacker's state which compares the sizes of the armies and then assigns each entity their target entity and then changes their State to Attack and all is well until one is defeated and then the entity asks their Captain who to go for next (if he/she is still alive, if they ain't, go home and make some tea...).&lt;br /&gt;&lt;br /&gt;This was working quite nicely, until one army (A) attacked another (B) whilst it was already in combat with another army (C). After Army (B) defeated Army (C), Army (B) wandered off into the sunset with Army (A) walking along behind them, oblivious to the fact they were being poked in the back with pointy sticks, oblivious to their comrades shouting "ooh, my spleen" before collapsing face down in the daisies.&lt;br /&gt;&lt;br /&gt;So... this simple Attack/Defend system doesn't work too well. (and, I seem to recall this happened in the original Powermonger as well... as it was a rare occurance in reality.)&lt;br /&gt;&lt;br /&gt;I had an idea to maybe create a new Singleton class called "BattleMatrix" which contains ordered pairs of IDs (Defender ID, Attacker ID) and through which every entity in the game knows who is coming after it and who is still on it's "hit list" after other distractions (like pathfinding etc.).&lt;br /&gt;&lt;br /&gt;Is this a good route to go down (before I end up writing masses of redundant code), or am I missing some obvious game logic somewhere?&lt;br /&gt;&lt;br /&gt;In other news, I've been plowing my way through the Scott Meyer series of books (Effective C++, More Effective C++, Effective STL) whilst learning French and Russian at the same time, so brain may explode like that &lt;a href="http://www.snopes.com/humor/iftrue/chess.asp"&gt;chess player&lt;/a&gt;. (don't worry, it turned out to be a hoax, but was a fantastic urban myth for a while)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8386776496812196127-802427692020619334?l=arkiruthis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arkiruthis.blogspot.com/feeds/802427692020619334/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arkiruthis.blogspot.com/2010/11/come-back-i-want-to-give-you-thrashing.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/802427692020619334'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/802427692020619334'/><link rel='alternate' type='text/html' href='http://arkiruthis.blogspot.com/2010/11/come-back-i-want-to-give-you-thrashing.html' title='Come back, I want to give you a thrashing...'/><author><name>Arkiruthis</name><uri>http://www.blogger.com/profile/07908927621630737811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://3.bp.blogspot.com/_e9SD96r57E0/TFP26a9Y3QI/AAAAAAAAAJE/ka6uNW5ovC0/S220/Squadron+Commander+Flashart(1).jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8386776496812196127.post-8751974471489071993</id><published>2010-09-07T04:06:00.000-07:00</published><updated>2010-09-07T04:47:17.154-07:00</updated><title type='text'>"Ergonomically tewwific"</title><content type='html'>Well, we're getting there... I haven't had much time to work on things lately as I'm trying to finish up my workload before going on hols for a bit.&lt;br /&gt;&lt;br /&gt;Nothing very exciting here (and framerate/quality decimated by Youtube). Captains recruit their villages and go for a wander. White captain takes a dislike to Red captain, fight ensues [without the sprites, you have to take my word for it...] ;-) White captain wins the battle. Then takes on Yellow while his army has low hitpoints and loses. Then the two remaining armies have their captains removed to show what happens when the armies disband and the soldiers return home. Very basic, but I'm pleased with how clean the state machine runs at the moment.&lt;br /&gt;&lt;br /&gt;&lt;object height="405" width="500"&gt;&lt;param name="movie" value="http://www.youtube.com/v/S4B5s78iWsQ?fs=1&amp;amp;hl=en_US&amp;amp;color1=0x234900&amp;amp;color2=0x4e9e00&amp;amp;border=1"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;embed src="http://www.youtube.com/v/S4B5s78iWsQ?fs=1&amp;amp;hl=en_US&amp;amp;color1=0x234900&amp;amp;color2=0x4e9e00&amp;amp;border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" height="405" width="500"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;I don't want to start doing the fancy graphical stuff for quite a while. I'd rather have the actual game mechanics working and the gameplay completed in this rather dull-looking 2D world than start adding fancy stuff just to justify nice screenshots. So you might want to switch off your RSS feed for a while if you want pretty screenies. :)&lt;br /&gt;&lt;br /&gt;I'm particularly looking forward to having arrows, cannonballs that actually follow a trajectory. Originally, they flew across hugging the landscape like low-flying cruise missiles.&lt;br /&gt;&lt;br /&gt;Very glad I picked up a copy of Effective STL by Scott Meyers. Didn't answer a question I had about STL so I'll throw it out here (and Google isn't helping either, maybe it's my search query).&lt;br /&gt;&lt;br /&gt;Q: If your class has a property (bool IsAlive() is a good example), what is the best way to retrieve an item from a container based on a boolean method that the class contains?&lt;br /&gt;&lt;br /&gt;At the moment, a very dull:&lt;br /&gt;container&amp;lt;Agent*&amp;gt;::iterator i=ctr.begin();&lt;br /&gt;while(i!=ctr.end()) {&lt;br /&gt;if(*i-&gt;IsAlive()) // do something...&lt;br /&gt;++i;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;does the trick, but I was hoping that I could do this via the &amp;lt;algorithm&amp;gt; functions like find_if() which (from my own testing with large amounts of loops) perform much better than standard loops.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8386776496812196127-8751974471489071993?l=arkiruthis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arkiruthis.blogspot.com/feeds/8751974471489071993/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arkiruthis.blogspot.com/2010/09/well-were-getting-there.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/8751974471489071993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/8751974471489071993'/><link rel='alternate' type='text/html' href='http://arkiruthis.blogspot.com/2010/09/well-were-getting-there.html' title='&quot;Ergonomically tewwific&quot;'/><author><name>Arkiruthis</name><uri>http://www.blogger.com/profile/07908927621630737811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://3.bp.blogspot.com/_e9SD96r57E0/TFP26a9Y3QI/AAAAAAAAAJE/ka6uNW5ovC0/S220/Squadron+Commander+Flashart(1).jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8386776496812196127.post-8529243322804092343</id><published>2010-08-11T05:05:00.001-07:00</published><updated>2010-08-11T06:35:45.817-07:00</updated><title type='text'>Globalisation, what think ye?</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_e9SD96r57E0/TGKTq6FBDMI/AAAAAAAAAJ0/6lvpZJ94Ah4/s1600/code.jpg"&gt;&lt;img style="float: left; margin: 0pt 10px 10px 0pt; cursor: pointer; width: 200px; height: 131px;" src="http://1.bp.blogspot.com/_e9SD96r57E0/TGKTq6FBDMI/AAAAAAAAAJ0/6lvpZJ94Ah4/s200/code.jpg" alt="" id="BLOGGER_PHOTO_ID_5504124059954252994" border="0" /&gt;&lt;/a&gt;Work continues in the background and 'fraid there isn't really much exciting stuff to show at the moment (or for a while as game logic, etc. gets added in).&lt;br /&gt;&lt;br /&gt;However, I have a question for those in the know.&lt;br /&gt;&lt;br /&gt;Q: How often do you use Global variables?&lt;br /&gt;&lt;br /&gt;I noticed recently that every entity in the game has a member GameWorld *m_pGameWorld which is the resource an entity uses to obtain various bits of information about the overall game world.&lt;br /&gt;&lt;br /&gt;This seems to be quite a redundant use of identical pointers, so I'm inclined to think that a global "g_pGameWorld" would be more useful, safer (as only one initialisation required) and be more efficient.&lt;br /&gt;&lt;br /&gt;I was taught that, for the most part, global variables are to always be avoided as they lead to bad coding practices, badly connected hard-to-understand code, etc. and that objects should only take what they need via arguments and via object-specific methods/members. But it seems silly... really, for something like this.&lt;br /&gt;&lt;br /&gt;OT: Got hold of &lt;a href="http://www.retrogamer.net/"&gt;RetroGAMER&lt;/a&gt; 47 on eBay. Cool articles on the development of Magic Carpet (was interested to note Glenn Corpes used the 'leave dead entities and re-use later rather than dynamic allocation' method discussed in the Scanners blog entry a few days ago)  and also a big section on Elite. I wish I'd subscribed to this mag before many back-issues dissapeared... :[&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8386776496812196127-8529243322804092343?l=arkiruthis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arkiruthis.blogspot.com/feeds/8529243322804092343/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arkiruthis.blogspot.com/2010/08/globalisation-what-think-ye.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/8529243322804092343'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/8529243322804092343'/><link rel='alternate' type='text/html' href='http://arkiruthis.blogspot.com/2010/08/globalisation-what-think-ye.html' title='Globalisation, what think ye?'/><author><name>Arkiruthis</name><uri>http://www.blogger.com/profile/07908927621630737811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://3.bp.blogspot.com/_e9SD96r57E0/TFP26a9Y3QI/AAAAAAAAAJE/ka6uNW5ovC0/S220/Squadron+Commander+Flashart(1).jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_e9SD96r57E0/TGKTq6FBDMI/AAAAAAAAAJ0/6lvpZJ94Ah4/s72-c/code.jpg' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8386776496812196127.post-2193874131408837949</id><published>2010-08-02T03:47:00.000-07:00</published><updated>2010-08-02T03:58:10.934-07:00</updated><title type='text'>Retro of the retro remake.</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_e9SD96r57E0/TFakSU-sxNI/AAAAAAAAAJs/k4MXhvjBEfM/s1600/back-to-the-future.jpg"&gt;&lt;img style="float: right; margin: 0pt 0pt 10px 10px; cursor: pointer; width: 200px; height: 112px;" src="http://2.bp.blogspot.com/_e9SD96r57E0/TFakSU-sxNI/AAAAAAAAAJs/k4MXhvjBEfM/s200/back-to-the-future.jpg" alt="" id="BLOGGER_PHOTO_ID_5500764629655930066" border="0" /&gt;&lt;/a&gt;Thanks to fellow blogger Steve Butterworth for reminding me of Google's (in)famous reputation for data collection and seemingly eternal retention policy. :-P&lt;br /&gt;&lt;br /&gt;It appears that the old blog entries still exist on Google Reader, so I plan to add them into this blog (there aren't too many of them) and adjust the dates on them so they fit in order (if Blogger is smart about this and actually moves the entry as apposed to just changing the post date).&lt;br /&gt;&lt;br /&gt;So anyone on an RSS feed beware, there'll be some wierdness whilst I put some posts back into the blog. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8386776496812196127-2193874131408837949?l=arkiruthis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arkiruthis.blogspot.com/feeds/2193874131408837949/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arkiruthis.blogspot.com/2010/08/retro-of-retro-remake.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/2193874131408837949'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/2193874131408837949'/><link rel='alternate' type='text/html' href='http://arkiruthis.blogspot.com/2010/08/retro-of-retro-remake.html' title='Retro of the retro remake.'/><author><name>Arkiruthis</name><uri>http://www.blogger.com/profile/07908927621630737811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://3.bp.blogspot.com/_e9SD96r57E0/TFP26a9Y3QI/AAAAAAAAAJE/ka6uNW5ovC0/S220/Squadron+Commander+Flashart(1).jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_e9SD96r57E0/TFakSU-sxNI/AAAAAAAAAJs/k4MXhvjBEfM/s72-c/back-to-the-future.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8386776496812196127.post-6275473779078950591</id><published>2010-07-29T06:52:00.000-07:00</published><updated>2010-08-06T04:41:58.460-07:00</updated><title type='text'>Scanners</title><content type='html'>&lt;span style="font-style: italic; font-weight: bold;"&gt;nyyYYYYYAAAAAAAARGH!&lt;/span&gt; *head explodes*&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.blogcdn.com/www.cinematical.com/media/2007/02/401px-scanners-%283%29.jpg"&gt;&lt;img style="float: right; margin: 0pt 0pt 10px 10px; cursor: pointer; width: 168px; height: 150px;" src="http://www.blogcdn.com/www.cinematical.com/media/2007/02/401px-scanners-%283%29.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I'm beginning to regret the shift to STL vector containers for managing groups of Agents. In fact, I should've just created a static array[MAX_AGENTS] than go down this route.&lt;br /&gt;&lt;br /&gt;At the moment, the base class constructor registers an ID with an Entity Manager that is unique to that (often inherited) class. This ID is used for sending and receiving messages.&lt;br /&gt;&lt;br /&gt;Today has been a major crash-fest as I see what happens when you try deleting random agents from the game.&lt;br /&gt;&lt;br /&gt;1. The MessageDispatcher continues to process messages from IDs that are no longer in existance in the game and attempt to send messages to them.&lt;br /&gt;&lt;br /&gt;2. Delete an element from a vector, all the other elements afterwards get shifted along one to close the gap. This means that constructors and copy constructors get called for all those elements. All of them end up with new IDs that are no longer aligned with those waiting in the Message Stack.&lt;br /&gt;&lt;br /&gt;3. Regarding 2) Even if I set the copy constructor to re-assign the ID from the (soon to be deleted) Agent, the actual memory location that EntityManager points to is still the old one that is going to be deleted.&lt;br /&gt;&lt;br /&gt;Time for (yet another) implementation rethink of the basics.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;[UPDATE - these problems are now fixed. :) ]&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8386776496812196127-6275473779078950591?l=arkiruthis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arkiruthis.blogspot.com/feeds/6275473779078950591/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arkiruthis.blogspot.com/2010/07/scanners.html#comment-form' title='18 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/6275473779078950591'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/6275473779078950591'/><link rel='alternate' type='text/html' href='http://arkiruthis.blogspot.com/2010/07/scanners.html' title='Scanners'/><author><name>Arkiruthis</name><uri>http://www.blogger.com/profile/07908927621630737811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://3.bp.blogspot.com/_e9SD96r57E0/TFP26a9Y3QI/AAAAAAAAAJE/ka6uNW5ovC0/S220/Squadron+Commander+Flashart(1).jpg'/></author><thr:total>18</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8386776496812196127.post-6737346247467403735</id><published>2010-07-25T03:39:00.000-07:00</published><updated>2010-07-25T10:53:10.444-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='http://2.bp.blogspot.com/_e9SD96r57E0/TEx2oXQyVII/AAAAAAAAAIE/kNVmwYFxisw/s1600/basic_ai.png'/><title type='text'>And now... the Prologue.</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_e9SD96r57E0/TEx42ImjYeI/AAAAAAAAAIU/TOakmHxYl-Y/s1600/powermonger_sprites.jpg"&gt;&lt;img style="float: right; margin: 0pt 0pt 10px 10px; cursor: pointer; width: 200px; height: 150px;" src="http://2.bp.blogspot.com/_e9SD96r57E0/TEx42ImjYeI/AAAAAAAAAIU/TOakmHxYl-Y/s200/powermonger_sprites.jpg" alt="" id="BLOGGER_PHOTO_ID_5497902116529988066" border="0" /&gt;&lt;/a&gt;A while back I started work on a remake of &lt;a href="http://www.mobygames.com/game/powermonger"&gt;Powermonger&lt;/a&gt; which was abandoned for various reasons (mostly due to an increased workload and general recession-related crapiness). However, there were other reasons, worth mentioning if they contain but a glint of gold for the would-be hobbiest programmer, for why the project failed.&lt;br /&gt;&lt;br /&gt;(I also don't know where the blog went, I don't recall deleting it! Maybe I did post-pub one night, who knows. Shame though, had some nice pictures...)&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_e9SD96r57E0/TEx56hbyYyI/AAAAAAAAAIc/iFKCkQfUK7g/s1600/screenshot.png"&gt;&lt;img style="float: left; margin: 0pt 10px 10px 0pt; cursor: pointer; width: 200px; height: 134px;" src="http://3.bp.blogspot.com/_e9SD96r57E0/TEx56hbyYyI/AAAAAAAAAIc/iFKCkQfUK7g/s200/screenshot.png" alt="" id="BLOGGER_PHOTO_ID_5497903291426824994" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;1. There was no 'Game'&lt;/span&gt;&lt;br /&gt;There was an 'Engine', but no 'Game'. Engines are easy (and fun) to write. However, when it came to making little people move around the world, interact with each other, interact with the world, communicate with each other etc., etc., I ended up with huge switch statements containing vast numbers of conditionals and ended up getting completely lost.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_e9SD96r57E0/TEx2oXQyVII/AAAAAAAAAIE/kNVmwYFxisw/s1600/basic_ai.png"&gt;&lt;img style="float: right; margin: 0pt 0pt 10px 10px; cursor: pointer; width: 200px; height: 134px;" src="http://2.bp.blogspot.com/_e9SD96r57E0/TEx2oXQyVII/AAAAAAAAAIE/kNVmwYFxisw/s200/basic_ai.png" alt="" id="BLOGGER_PHOTO_ID_5497899680923800706" border="0" /&gt;&lt;/a&gt;Even if it looks crap, BUILD THE GAME first. Maybe just different colored pixels for the game agents, a console overlayed which outputs properties for different selected items, etc. Cut out a dimension if you must and view things top-down without ever going 3D.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I recently acquired a copy of &lt;a href="http://www.jblearning.com/catalog/9781556220784/"&gt;Programming Game AI by Example&lt;/a&gt;, by Mat Buckland. In it, he lays down the groundwork for a Finate State Machine with Enter/Execute/Exit points and also a proper Messaging System so different classes can communicate with each other via a proper Entity Manager. It's a lot of ground work to put in, but worth it in the long run. I should have done this at the beginning.&lt;br /&gt;&lt;br /&gt;Now, everything from static objects to people are descended from a base class which is capable of sending/receiving messages. (things like trees are a level down, contain position, and capable of receiving messages, whereas people, captains etc. have also a finite state machine, velocity etc.).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2. Writing games is not easy&lt;/span&gt;&lt;br /&gt;Perhaps for some, it is. But for me, it isn't. Some days I look at a section of code as though I'm looking at a Haynes manual for a Reliant Robin. But part of the thrill is the challenge of pushing one's self to accomplishing difficult tasks and extending one's knowledge.&lt;br /&gt;&lt;br /&gt;Perhaps in retrospect, Powermonger was a bit ambitious a project for a first ever game. Perhaps it would've been better to start out just doing a simple platformer 0r puzzle game.&lt;br /&gt;&lt;br /&gt;Anyway, all the AI doesn't have to be in there for now. Can just be captains wandering to towns, recruiting, then when they are confident, taking on other captains before they can rouse a similar rabble!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3. C++&lt;/span&gt;&lt;br /&gt;"In C++ it's harder to shoot yourself in the foot, but when you do, you blow off your whole leg." — Bjarne Stroustrup.&lt;br /&gt;&lt;br /&gt;Despite learning C++ at university, I managed to get by with a sort of 'vanilla C' and only recently bothered to learn about STL containers.&lt;br /&gt;&lt;br /&gt;So I gladly plowed through my code, replacing arrays and pointers with vectors, maps, sets, lists etc. with their own iterators where appropriate. For small projects, everything was fine, until I started getting SIGSEV messages with very cryptic output.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you have a class:&lt;br /&gt;&lt;br /&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;class&lt;/span&gt; MyClass {&lt;br /&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt;:&lt;br /&gt;MyClass() { data = &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt;[100]; }&lt;br /&gt;~MyClass() { delete [] data; }&lt;br /&gt;&lt;span class="kwrd"&gt;private&lt;/span&gt;:&lt;br /&gt;&lt;span class="kwrd"&gt;int&lt;/span&gt; *data;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;and call the following:&lt;br /&gt;&lt;br /&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;br /&gt;vector&amp;lt;MyClass&amp;gt; vClassContainer;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;for&lt;/span&gt;(&lt;span class="kwrd"&gt;int&lt;/span&gt; i=0; i&amp;lt;100; i++) {&lt;br /&gt;MyClass c;&lt;br /&gt;vClassContainer.push_back(c);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;... then what happens is that the Copy Constructor actually gets called, C++ does it's best and performs a shallow copy which causes various problems. "data" is not allocated for the copy, and delete gets called on an un-allocated pointer.&lt;br /&gt;&lt;br /&gt;So remember your copy constructors and (though I suspect you don't need it) assignment constructors.&lt;br /&gt;&lt;br /&gt;i.e.&lt;br /&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;br /&gt;MyClass(&lt;span class="kwrd"&gt;const&lt;/span&gt; MyClass&amp;amp; a) { data = &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt;[100];&lt;br /&gt;&lt;span class="rem"&gt;/* ... whatever method you like for copying 'a' data ... */&lt;/span&gt; }&lt;br /&gt;MyClass&amp;amp; &lt;span class="kwrd"&gt;operator&lt;/span&gt;=(&lt;span class="kwrd"&gt;const&lt;/span&gt; MyClass&amp;amp; a) { data = &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt;[100];&lt;br /&gt;&lt;span class="rem"&gt;/* ... whatever method you like for copying 'a' data ... */&lt;/span&gt; }&lt;br /&gt;&lt;br /&gt;&lt;span class="rem"&gt;// However, if you call the following, you won't get this issue.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;MyClass c[100];&lt;br /&gt;vector&amp;lt;MyClass&amp;gt; vClassContainer(c);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;A silly example here, but an idea of where not fully understanding how something works can actually cause a lot of confusion in the long run. Often in the interests of 'saving time'. ;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;4. # I'm free, to do what I waaant, any old ti-iime...&lt;/span&gt;&lt;br /&gt;When a project becomes publicised, you are exposed to a large collection of opinions, ideas, suggestions, criticisms, compliments and pretty much the whole spectrum of public debate. It's wonderful to have people interested in your project, any many of them offer invaluable support (and my thanks here to &lt;a href="http://www.viridiangames.com/blog/"&gt;Viridian Games&lt;/a&gt; for invaluble help with a large number of things for the original remake). But there can also be a pressure to conform to different ideas about how your game should be. If you're not careful, you end up turning your project into something you never wanted it to be, and as such, your inspiration to keep working on it dries up as it resembles and less and less what you had hoped it would be. Sometimes you just have to plow ahead with your own idea of how things should be.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;5. Patience.&lt;/span&gt;&lt;br /&gt;Much of it required.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8386776496812196127-6737346247467403735?l=arkiruthis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arkiruthis.blogspot.com/feeds/6737346247467403735/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arkiruthis.blogspot.com/2010/07/and-now-prologue.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/6737346247467403735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/6737346247467403735'/><link rel='alternate' type='text/html' href='http://arkiruthis.blogspot.com/2010/07/and-now-prologue.html' title='And now... the Prologue.'/><author><name>Arkiruthis</name><uri>http://www.blogger.com/profile/07908927621630737811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://3.bp.blogspot.com/_e9SD96r57E0/TFP26a9Y3QI/AAAAAAAAAJE/ka6uNW5ovC0/S220/Squadron+Commander+Flashart(1).jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_e9SD96r57E0/TEx42ImjYeI/AAAAAAAAAIU/TOakmHxYl-Y/s72-c/powermonger_sprites.jpg' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8386776496812196127.post-5719801766298384207</id><published>2008-07-01T15:29:00.000-07:00</published><updated>2010-08-02T05:23:55.755-07:00</updated><title type='text'>Old ways not always the best</title><content type='html'>&lt;span class="entry-author-parent"&gt;&lt;span class="entry-author-name"&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="entry-body"&gt;&lt;div&gt;&lt;div class="item-body"&gt;&lt;div&gt;&lt;a target="_blank" href="http://1.bp.blogspot.com/_e9SD96r57E0/SGozm249SfI/AAAAAAAAAFQ/PCEGrjlU78Y/s1600-h/texturing.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left;" src="http://1.bp.blogspot.com/_e9SD96r57E0/SGozm249SfI/AAAAAAAAAFQ/PCEGrjlU78Y/s320/texturing.jpg" alt="" border="0" /&gt;&lt;/a&gt;Powermonger  had a novel way of texturing the landscape. It wasn't conventional  texture mapping at all. Basically, each triangle was a cut-out of a  repeating 2D pattern. Imagine cutting a triangle out of a piece of paper  and then putting it on a wallpaper pattern and seeing the pattern come  through. This meant that instead of flat shaded polygons, you could  actually have something meaningful like grass, beach etc. without having  to do the perspective and distortion calculations that are used in  conventional 3D texture mapping (and would have been impossible on 16bit  hardware, though I have seen a good Wolfenstein Atari ST demo).&lt;br /&gt;&lt;br /&gt;Being  a nerd when it comes to nostalgia, I implemented a function to draw the  map in the old-fashioned way. In a way it's kinda nice because, now  that the textures are facing you directly, you don't need mipmaps.&lt;br /&gt;&lt;br /&gt;However...  it's darn confusing when you rotate the map! The polygons rotate around  an origin, but the patterns on the triangles remain static (as in the  original Powermonger). You could kinda see this in the original, but  because everything was so pixelated (320x200), it didn't really matter  much. When you're running this at 4 times the resolution, it looks like a  magic-eye picture as you rotate the landscape. :D&lt;br /&gt;&lt;br /&gt;Hehe, I'll  probably keep it as an *.cfg file option, but it's quite a wierd effect  when you see it in action rotating (like a cinefilm projector showing a  film on a white rotating teapot).&lt;br /&gt;&lt;br /&gt;Here's a small clip from the original:&lt;br /&gt;&lt;div&gt;&lt;img src="https://blogger.googleusercontent.com/tracker/463080199411139036-2211924615775969119?l=arkiruthis.blogspot.com" alt="" width="1" height="1" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8386776496812196127-5719801766298384207?l=arkiruthis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arkiruthis.blogspot.com/feeds/5719801766298384207/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arkiruthis.blogspot.com/2008/07/old-ways-not-always-best.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/5719801766298384207'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/5719801766298384207'/><link rel='alternate' type='text/html' href='http://arkiruthis.blogspot.com/2008/07/old-ways-not-always-best.html' title='Old ways not always the best'/><author><name>Arkiruthis</name><uri>http://www.blogger.com/profile/07908927621630737811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://3.bp.blogspot.com/_e9SD96r57E0/TFP26a9Y3QI/AAAAAAAAAJE/ka6uNW5ovC0/S220/Squadron+Commander+Flashart(1).jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_e9SD96r57E0/SGozm249SfI/AAAAAAAAAFQ/PCEGrjlU78Y/s72-c/texturing.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8386776496812196127.post-3502000493107322150</id><published>2008-06-26T15:41:00.000-07:00</published><updated>2010-08-02T05:22:09.430-07:00</updated><title type='text'>White Christmas</title><content type='html'>&lt;span class="entry-author-parent"&gt;&lt;span class="entry-author-name"&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="entry-body"&gt;&lt;div&gt;&lt;div class="item-body"&gt;&lt;div&gt;&lt;a target="_blank" href="http://1.bp.blogspot.com/_e9SD96r57E0/SGOe5bSSakI/AAAAAAAAAFI/GldgWyxq8J0/s1600-h/powermonger_weather.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left;" src="http://1.bp.blogspot.com/_e9SD96r57E0/SGOe5bSSakI/AAAAAAAAAFI/GldgWyxq8J0/s320/powermonger_weather.jpg" alt="" border="0" /&gt;&lt;/a&gt;One  of the fun things about Powermonger was that the weather changed  throughout the game. Green grass gave way to autumn ochre and then onto  the snowy white of winter.&lt;br /&gt;&lt;br /&gt;Seems a simple enough affair of using  glTexSubImage() to replace bits of the current terrain texture with  pixels from the next season's texture (from our Paris collection...).&lt;br /&gt;&lt;br /&gt;Only 2 problems:&lt;br /&gt;1. This has to be done not just for the original texture but also the mipmaps as well.&lt;br /&gt;2.  You can see a pattern emerging as the same alterations are used across  each tile. I may use a large terrain texture and stretch it across  several tiles at a time to solve this.&lt;br /&gt;&lt;br /&gt;Anyway, even with a couple of minutes coding, I'm getting rather nostalgic about it. :d&lt;div&gt;&lt;img src="https://blogger.googleusercontent.com/tracker/463080199411139036-271687565986721903?l=arkiruthis.blogspot.com" alt="" width="1" height="1" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8386776496812196127-3502000493107322150?l=arkiruthis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arkiruthis.blogspot.com/feeds/3502000493107322150/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arkiruthis.blogspot.com/2008/06/white-christmas.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/3502000493107322150'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/3502000493107322150'/><link rel='alternate' type='text/html' href='http://arkiruthis.blogspot.com/2008/06/white-christmas.html' title='White Christmas'/><author><name>Arkiruthis</name><uri>http://www.blogger.com/profile/07908927621630737811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://3.bp.blogspot.com/_e9SD96r57E0/TFP26a9Y3QI/AAAAAAAAAJE/ka6uNW5ovC0/S220/Squadron+Commander+Flashart(1).jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_e9SD96r57E0/SGOe5bSSakI/AAAAAAAAAFI/GldgWyxq8J0/s72-c/powermonger_weather.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8386776496812196127.post-3471649696165258745</id><published>2008-06-24T21:45:00.000-07:00</published><updated>2010-08-02T05:21:16.781-07:00</updated><title type='text'></title><content type='html'>&lt;span class="entry-author-parent"&gt;&lt;span class="entry-author-name"&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="entry-body"&gt;&lt;div&gt;&lt;div class="item-body"&gt;&lt;div&gt;&lt;a target="_blank" href="http://1.bp.blogspot.com/_e9SD96r57E0/SGFSoxciSvI/AAAAAAAAAFA/73CIGNaI9uk/s1600-h/powermonger.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right;" src="http://1.bp.blogspot.com/_e9SD96r57E0/SGFSoxciSvI/AAAAAAAAAFA/73CIGNaI9uk/s320/powermonger.jpg" alt="" border="0" /&gt;&lt;/a&gt;Sprites  are now aligned correctly depending on their direction and the rotation  of the 3D map... which is nice. You can currently send the captain  around on the map and the soldiers will follow him and try to stay in  formation. There's no ocean detection yet, so they walk straight over  it. :) That'll require a little more thought as they need path-finding  algorithms. In powermonger, if they couldn't get to their destination,  they seemed to pick another destination near them and then try again.&lt;br /&gt;&lt;br /&gt;You  know, the more I work on this game, the more admiration I have, not  just for the original programmers, but all the early programmers who had  to cram so much information into what was back then quite a restricted  runtime environment. I dread to think what my version would've run like  on Atari ST... =P&lt;div&gt;&lt;img src="https://blogger.googleusercontent.com/tracker/463080199411139036-2750311258786435659?l=arkiruthis.blogspot.com" alt="" width="1" height="1" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8386776496812196127-3471649696165258745?l=arkiruthis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arkiruthis.blogspot.com/feeds/3471649696165258745/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arkiruthis.blogspot.com/2008/06/sprites-are-now-aligned-correctly.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/3471649696165258745'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/3471649696165258745'/><link rel='alternate' type='text/html' href='http://arkiruthis.blogspot.com/2008/06/sprites-are-now-aligned-correctly.html' title=''/><author><name>Arkiruthis</name><uri>http://www.blogger.com/profile/07908927621630737811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://3.bp.blogspot.com/_e9SD96r57E0/TFP26a9Y3QI/AAAAAAAAAJE/ka6uNW5ovC0/S220/Squadron+Commander+Flashart(1).jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_e9SD96r57E0/SGFSoxciSvI/AAAAAAAAAFA/73CIGNaI9uk/s72-c/powermonger.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8386776496812196127.post-8613043565575161412</id><published>2008-06-16T14:40:00.000-07:00</published><updated>2010-08-02T04:58:53.878-07:00</updated><title type='text'>Interface</title><content type='html'>&lt;div class="entry-body"&gt;&lt;div&gt;&lt;div class="item-body"&gt;&lt;div&gt;&lt;a target="_blank" href="http://img293.imageshack.us/img293/8826/117514595301vp7.png"&gt;&lt;img style="width: 320px;" src="http://img293.imageshack.us/img293/8826/117514595301vp7.png" alt="" border="0" /&gt;&lt;br /&gt;&lt;/a&gt;&lt;a target="_blank" href="http://img141.imageshack.us/img141/8189/110682376800iw7.gif"&gt;&lt;img style="width: 320px;" src="http://img141.imageshack.us/img141/8189/110682376800iw7.gif" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I've  recently discovered that there were several Console versions of  Powermonger which did away with the table buttons completely.&lt;p&gt;I'm  wanting to keep the game as close to the ST/Amiga/DOS version as  possible, but there's a lot to be said for a more intuitive interface. I  think having the buttons along the bottom works quite well. I'll leave  it for now, but I'll probably add the option of having buttons along the  bottom at some point as I think it's a good idea, if a little  abstracted from the interface. &lt;/p&gt;&lt;p&gt;( both screenshots from the Powermonger screenshots page @ MobyGames - www.mobygames.com )&lt;/p&gt;&lt;div&gt;&lt;img src="https://blogger.googleusercontent.com/tracker/463080199411139036-1276513870186399675?l=arkiruthis.blogspot.com" alt="" width="1" height="1" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8386776496812196127-8613043565575161412?l=arkiruthis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arkiruthis.blogspot.com/feeds/8613043565575161412/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arkiruthis.blogspot.com/2008/06/interface.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/8613043565575161412'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/8613043565575161412'/><link rel='alternate' type='text/html' href='http://arkiruthis.blogspot.com/2008/06/interface.html' title='Interface'/><author><name>Arkiruthis</name><uri>http://www.blogger.com/profile/07908927621630737811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://3.bp.blogspot.com/_e9SD96r57E0/TFP26a9Y3QI/AAAAAAAAAJE/ka6uNW5ovC0/S220/Squadron+Commander+Flashart(1).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8386776496812196127.post-6515972915554936289</id><published>2008-06-12T13:08:00.000-07:00</published><updated>2010-08-02T04:57:46.069-07:00</updated><title type='text'>Updated graphics</title><content type='html'>&lt;a target="_blank" href="http://www.flyingislands.co.uk/upload/navbar_graphics.jpg"&gt;&lt;img src="http://www.flyingislands.co.uk/upload/navbar_graphics_thumbnail.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a target="_blank" href="http://www.flyingislands.co.uk/upload/navbar_graphics.jpg"&gt;Click image for a larger version.&lt;/a&gt;&lt;br /&gt;(compass, scale etc. implemented as 3D in-game)&lt;br /&gt;&lt;br /&gt;(any ideas what the symbol on the left shield was supposed to be?)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8386776496812196127-6515972915554936289?l=arkiruthis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arkiruthis.blogspot.com/feeds/6515972915554936289/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arkiruthis.blogspot.com/2008/06/updated-graphics.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/6515972915554936289'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/6515972915554936289'/><link rel='alternate' type='text/html' href='http://arkiruthis.blogspot.com/2008/06/updated-graphics.html' title='Updated graphics'/><author><name>Arkiruthis</name><uri>http://www.blogger.com/profile/07908927621630737811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://3.bp.blogspot.com/_e9SD96r57E0/TFP26a9Y3QI/AAAAAAAAAJE/ka6uNW5ovC0/S220/Squadron+Commander+Flashart(1).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8386776496812196127.post-2239334969919427391</id><published>2008-06-10T23:46:00.000-07:00</published><updated>2010-08-02T04:56:04.613-07:00</updated><title type='text'>Test cases for test cases...</title><content type='html'>&lt;span class="entry-author-parent"&gt;&lt;span class="entry-author-name"&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="entry-body"&gt;&lt;div&gt;&lt;div class="item-body"&gt;&lt;div&gt;&lt;a target="_blank" href="http://1.bp.blogspot.com/_e9SD96r57E0/SE79rG540xI/AAAAAAAAAD4/iVvbTFgWLho/s1600-h/screenshot_latest.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right;" src="http://1.bp.blogspot.com/_e9SD96r57E0/SE79rG540xI/AAAAAAAAAD4/iVvbTFgWLho/s320/screenshot_latest.jpg" alt="" border="0" /&gt;&lt;/a&gt;One  of the frustrating things about tile-based games is working out which  tiles should have which texture depending on which properties certain  map points have. There are 2 textures per tile in Powermonger and 2  possible ways the triangles can be drawn for each quad. What you end up  with is a horrendous if(h1==BLAH &amp;amp;&amp;amp; h2==BLAH &amp;amp;&amp;amp;  h3==BLAH...), etc. etc. affair which means at some point you'll probably  find yourself looking at a wrongly matched tile somewhere down the  line. Anyway, I've had enough of playing around with map tiles for now.&lt;br /&gt;&lt;br /&gt;Annoyingly,  Powermonger used a  320x200 screen resolution on PC, Amiga &amp;amp; ST.  The observant among you will recognise this as 1.6 aspect ratio as  apposed to 1.3 which is what most modern resolutions conform to (e.g.,  800x600, 1024x768, 1600x1200). When you try and scale 320x200 to, say,  800x600, you get a noticeable vertical stretching. So basically fixing  that means that there's a big black gap between the map and the  navigation controls (which work now). Maybe I'll design a new graphic  that fits the space.&lt;br /&gt;&lt;br /&gt;Neat little trick for rendering a scene on top of another scene:-&lt;br /&gt;&lt;br /&gt;Because  the 3D perspective map and the table were both 3D, I was getting  z-buffer clipping when the map was rotated (i.e., the ocean tiles would  go through the buttons which were higher than 0 on the Y axis).&lt;br /&gt;&lt;br /&gt;Rather  than do 2 different rendering passes (draw the table in one pass,  render, then the perspective map, render, etc.) you can do this:-&lt;br /&gt;&lt;br /&gt;glDepthRange (0.1, 1.0);&lt;br /&gt;&lt;br /&gt;... model your background scene here ...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;glDepthRange (0.0, 0.9); // Bring the depth buffer range forward a bit.&lt;br /&gt;&lt;br /&gt;...  model your foreground scene here ...&lt;br /&gt;&lt;br /&gt;This way, you can draw one scene on top of another but keep depth testing working for both scenes individually. Nice.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8386776496812196127-2239334969919427391?l=arkiruthis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arkiruthis.blogspot.com/feeds/2239334969919427391/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arkiruthis.blogspot.com/2008/06/test-cases-for-test-cases.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/2239334969919427391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/2239334969919427391'/><link rel='alternate' type='text/html' href='http://arkiruthis.blogspot.com/2008/06/test-cases-for-test-cases.html' title='Test cases for test cases...'/><author><name>Arkiruthis</name><uri>http://www.blogger.com/profile/07908927621630737811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://3.bp.blogspot.com/_e9SD96r57E0/TFP26a9Y3QI/AAAAAAAAAJE/ka6uNW5ovC0/S220/Squadron+Commander+Flashart(1).jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_e9SD96r57E0/SE79rG540xI/AAAAAAAAAD4/iVvbTFgWLho/s72-c/screenshot_latest.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8386776496812196127.post-2752725627644768131</id><published>2008-06-05T18:19:00.000-07:00</published><updated>2010-08-02T04:53:22.878-07:00</updated><title type='text'>Powermonger terrain algorithm</title><content type='html'>Having looked into the MAPDATA.DAT I'm pleased to find that Powermonger  is definately using the same Fractal Brownian Motion algorithm that I've  already implemented in the remake.&lt;br /&gt;&lt;br /&gt;Here's the algorithm. Some notes first:&lt;br /&gt;*  IX(a, b) is a cheap pre-processor #define that takes 2 values  (coordinates) and turns them into a single value used for indexing a 1D  array. It also does some power-of-two checking to make sure that you  don't get an index outside the range of the array.&lt;br /&gt;* IX2(a) is similar, though it only makes sure that 'a' is kept within the range of the array.&lt;br /&gt;&lt;br /&gt;&lt;a target="_blank" href="http://www.flyingislands.co.uk/upload/terrain_algorithm.html"&gt;Click here to open the algorithm in a new window. (sorry, the blog page isn't large enough to embed it here on it's own.)&lt;/a&gt;&lt;div&gt;&lt;img src="https://blogger.googleusercontent.com/tracker/463080199411139036-5347720173529078267?l=arkiruthis.blogspot.com" alt="" width="1" height="1" /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8386776496812196127-2752725627644768131?l=arkiruthis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arkiruthis.blogspot.com/feeds/2752725627644768131/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arkiruthis.blogspot.com/2008/06/powermonger-terrain-algorithm.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/2752725627644768131'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/2752725627644768131'/><link rel='alternate' type='text/html' href='http://arkiruthis.blogspot.com/2008/06/powermonger-terrain-algorithm.html' title='Powermonger terrain algorithm'/><author><name>Arkiruthis</name><uri>http://www.blogger.com/profile/07908927621630737811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://3.bp.blogspot.com/_e9SD96r57E0/TFP26a9Y3QI/AAAAAAAAAJE/ka6uNW5ovC0/S220/Squadron+Commander+Flashart(1).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8386776496812196127.post-1447529818248552639</id><published>2008-06-05T11:37:00.000-07:00</published><updated>2010-08-02T04:52:20.849-07:00</updated><title type='text'>Viridian Games</title><content type='html'>A big thankyou to Anthony @ &lt;a target="_blank" href="http://www.viridiangames.com/"&gt;Viridian Games&lt;/a&gt;  for posting an article on Powermonger's original map data format. This  has saved me a lot of time with a hex editor changing values to see what  changes in the maps when Powermonger is loaded.&lt;br /&gt;&lt;br /&gt;Anthony has been working on similar Bullfrog-esque games and is currently at work on his own game "&lt;a target="_blank" href="http://www.viridiangames.com/blog/category/planitia/"&gt;Planitia&lt;/a&gt;"  coded in Direct3D. It borrows many of the best things about Populous  and Powermonger. His blog is also very extensive covering topics on  programming to all sort of things, well worth adding to your reading  list. ( http://www.viridiangames.com/blog/ )&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8386776496812196127-1447529818248552639?l=arkiruthis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arkiruthis.blogspot.com/feeds/1447529818248552639/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arkiruthis.blogspot.com/2008/06/viridian-games.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/1447529818248552639'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/1447529818248552639'/><link rel='alternate' type='text/html' href='http://arkiruthis.blogspot.com/2008/06/viridian-games.html' title='Viridian Games'/><author><name>Arkiruthis</name><uri>http://www.blogger.com/profile/07908927621630737811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://3.bp.blogspot.com/_e9SD96r57E0/TFP26a9Y3QI/AAAAAAAAAJE/ka6uNW5ovC0/S220/Squadron+Commander+Flashart(1).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8386776496812196127.post-8152492850751207364</id><published>2008-06-02T04:38:00.000-07:00</published><updated>2010-08-02T04:51:11.531-07:00</updated><title type='text'>Object import added</title><content type='html'>One of the things I love about programming is those moments where you  find something isn't working and you do every possible thing imaginable  (outputting entire data arrays to logfiles, etc.) only to find you'd  been thinking about things in the wrong way to begin with. I'd been  importing objects with texture mapping and wondering why the texture UV  mapping was screwy on some faces, but perfectly fine on other ones.  Turns out I'd forgotten that every texture coordinate on a face is &lt;span style="font-style: italic;"&gt;unique &lt;/span&gt;and  not always shared by adjacent faces as you would find with vertices  which always have the same x/y/z  values regardless of which face is  referring to them. DURRRRRrrrr. Anyway, now that it's fixed I can  populate the world with villages, etc.&lt;br /&gt;&lt;br /&gt;&lt;a target="_blank" href="http://3.bp.blogspot.com/_e9SD96r57E0/SEMNLlpHfrI/AAAAAAAAADw/xo9fxn8zBLE/s1600-h/castle.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right;" src="http://3.bp.blogspot.com/_e9SD96r57E0/SEMNLlpHfrI/AAAAAAAAADw/xo9fxn8zBLE/s320/castle.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;div&gt;&lt;img src="https://blogger.googleusercontent.com/tracker/463080199411139036-40247888697931317?l=arkiruthis.blogspot.com" alt="" width="1" height="1" /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8386776496812196127-8152492850751207364?l=arkiruthis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arkiruthis.blogspot.com/feeds/8152492850751207364/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arkiruthis.blogspot.com/2008/06/object-import-added.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/8152492850751207364'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/8152492850751207364'/><link rel='alternate' type='text/html' href='http://arkiruthis.blogspot.com/2008/06/object-import-added.html' title='Object import added'/><author><name>Arkiruthis</name><uri>http://www.blogger.com/profile/07908927621630737811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://3.bp.blogspot.com/_e9SD96r57E0/TFP26a9Y3QI/AAAAAAAAAJE/ka6uNW5ovC0/S220/Squadron+Commander+Flashart(1).jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_e9SD96r57E0/SEMNLlpHfrI/AAAAAAAAADw/xo9fxn8zBLE/s72-c/castle.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8386776496812196127.post-5144011811510900411</id><published>2008-05-26T18:37:00.000-07:00</published><updated>2010-08-02T04:49:24.703-07:00</updated><title type='text'>Tiling code</title><content type='html'>&lt;span class="entry-author-parent"&gt;&lt;span class="entry-author-name"&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="entry-body"&gt;&lt;div&gt;&lt;div class="item-body"&gt;&lt;div&gt;&lt;a target="_blank" href="http://3.bp.blogspot.com/_e9SD96r57E0/SDrxDg6ATdI/AAAAAAAAADo/igqJVS_g2vc/s1600-h/tiles.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left;" src="http://3.bp.blogspot.com/_e9SD96r57E0/SDrxDg6ATdI/AAAAAAAAADo/igqJVS_g2vc/s320/tiles.jpg" alt="" border="0" /&gt;&lt;/a&gt;I'm  wanting to keep this remake as close graphically as possible, whilst  still enjoying the little tweaks that modern 3D APIs give you. So I've  analysed the tiling in the original Powermonger and tried to copy or  emulate that. Each tile on the landscape is either TRBL or TLBR ("Top  Right Bottom Left" and "Top Left Bottom Right" respectively). This  controls which way the 2 triangles that make up a quad are drawn. Each  triangle has it's own texture. Basic method is to look at the 4  heightfield points that make up a tile. If all 4 of them are zero, then  it's an ocean tile. If 3 of them are zero, then one triangle is ocean,  the other beach. If 2 of them are zero, then the tile is all beach. If  only 1 of them is zero, then one triangle is beach, the other grass. In  each instance you work out which corner is unique and then assign the  tile TRBL or TLBR status. For some tiles (i.e., all ocean, all beach  etc.) it doesn't really matter if it is TRBL or TLBR as both triangles  will have the same texture. There are some special cases for the land  tiles though, as the hills seem to be prettier if you get the right  alignment, so you can check the heights again and select some criterea  from that.&lt;br /&gt;&lt;br /&gt;Now, I fancy sticking some houses, trees, roads in... etc.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8386776496812196127-5144011811510900411?l=arkiruthis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arkiruthis.blogspot.com/feeds/5144011811510900411/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arkiruthis.blogspot.com/2008/05/tiling-code.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/5144011811510900411'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/5144011811510900411'/><link rel='alternate' type='text/html' href='http://arkiruthis.blogspot.com/2008/05/tiling-code.html' title='Tiling code'/><author><name>Arkiruthis</name><uri>http://www.blogger.com/profile/07908927621630737811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://3.bp.blogspot.com/_e9SD96r57E0/TFP26a9Y3QI/AAAAAAAAAJE/ka6uNW5ovC0/S220/Squadron+Commander+Flashart(1).jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_e9SD96r57E0/SDrxDg6ATdI/AAAAAAAAADo/igqJVS_g2vc/s72-c/tiles.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8386776496812196127.post-8758005189673867893</id><published>2008-05-19T06:02:00.001-07:00</published><updated>2010-08-02T04:45:12.451-07:00</updated><title type='text'>Book List + Development Tools</title><content type='html'>Well, let's have a look at the book list that I'll be browsing over:&lt;br /&gt;&lt;br /&gt;[EDIT - I've added some books since this original post in 2008]&lt;br /&gt;&lt;br /&gt;"Programming Game AI by Example"&lt;br /&gt;&lt;span style="font-size:75%;"&gt;Mat Buckland, &lt;span style="font-weight: bold;font-size:85%;" &gt;ISBN-10:&lt;/span&gt; 1-55622-078-2&lt;/span&gt;&lt;br /&gt;"Visual C++ 2008"&lt;br /&gt;&lt;span style="font-size:75%;"&gt;Ivor Horton, &lt;span style="font-weight: bold;"&gt;ISBN-13:&lt;/span&gt; 978-0-470-22590-5&lt;/span&gt;&lt;br /&gt;"Game Coding complete"&lt;br /&gt;&lt;span style="font-size:75%;"&gt;Mike McShaffry, &lt;b&gt;ISBN-13:&lt;/b&gt; 978-1932111910&lt;/span&gt;&lt;br /&gt;"Practical C++ Programming"&lt;br /&gt;&lt;span style="font-size:75%;"&gt;Steve Oualline, &lt;b&gt;ISBN-13:&lt;/b&gt; 978-0596004194&lt;/span&gt;&lt;br /&gt;"Mathematics for 3D Game Programming and Computer Graphics"&lt;br /&gt;&lt;span style="font-size:75%;"&gt;Eric Lengyel, &lt;b&gt;ISBN-13:&lt;/b&gt; 978-1584502777&lt;/span&gt;&lt;br /&gt;"3D Math Primer for Graphics and Game Development"&lt;br /&gt;&lt;span style="font-size:75%;"&gt;Fletcher Dunn and Ian Parberry, &lt;b&gt;ISBN-13:&lt;/b&gt; 978-1556229114&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Also the OpenGL "Red Book" and "Blue Book" which are available online at www.opengl.org&lt;br /&gt;&lt;br /&gt;I tend to write lots of little programs that test out different ideas so I'll try and post these from time to time.&lt;br /&gt;&lt;br /&gt;Here's what I'll be using:-&lt;br /&gt;&lt;br /&gt;Compiler: Mingw32 (GNU C++) *&lt;br /&gt;IDE: CodeBlocks (I prefer it to Bloodshed Dev-C++)**&lt;br /&gt;Adobe Photoshop CS1&lt;br /&gt;Cakewalk Sonar 7&lt;br /&gt;Blender3D***&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;*  I'd use Visual C++ Express 2008, but it has an annoying problem with  MSVCP90D.DLL not being found and this can happen randomly due to  corruption of project files and I don't have time to mess around with  that.&lt;br /&gt;&lt;br /&gt;** Mostly the implementation of the Project View and Code Completion seems to be a bit more robust.&lt;br /&gt;&lt;br /&gt;*** I use  Newtek Lightwave3D at work, but I don't have a home licence for it.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8386776496812196127-8758005189673867893?l=arkiruthis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arkiruthis.blogspot.com/feeds/8758005189673867893/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arkiruthis.blogspot.com/2008/05/book-list-development-tools.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/8758005189673867893'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/8758005189673867893'/><link rel='alternate' type='text/html' href='http://arkiruthis.blogspot.com/2008/05/book-list-development-tools.html' title='Book List + Development Tools'/><author><name>Arkiruthis</name><uri>http://www.blogger.com/profile/07908927621630737811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://3.bp.blogspot.com/_e9SD96r57E0/TFP26a9Y3QI/AAAAAAAAAJE/ka6uNW5ovC0/S220/Squadron+Commander+Flashart(1).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8386776496812196127.post-5721572214637990348</id><published>2008-05-19T06:02:00.000-07:00</published><updated>2010-08-02T04:36:19.600-07:00</updated><title type='text'>Intro</title><content type='html'>It's hard to believe that there was a time when games used to be made by  perhaps a handful of people. A programmer (or two), someone to do the  graphics, someone to do the sound effects, someone to do music, someone  to do the intro and finally someone to make the tea and occasionally  wheel in a silver tray with a cake selection.&lt;br /&gt;&lt;br /&gt;&lt;a target="_blank" href="http://2.bp.blogspot.com/_e9SD96r57E0/SCq82ja7o3I/AAAAAAAAAAM/oiFekiOOUJ4/s1600-h/1088133764-00.jpg"&gt;&lt;img style="float: right; margin: 0pt 0pt 10px 10px; width: 176px; height: 214px;" alt="" src="http://2.bp.blogspot.com/_e9SD96r57E0/SCq82ja7o3I/AAAAAAAAAAM/oiFekiOOUJ4/s320/1088133764-00.jpg" border="0" /&gt;&lt;/a&gt;Why am I remaking &lt;a target="_blank" href="http://www.mobygames.com/game/amiga/powermonger"&gt;Powermonger&lt;/a&gt;? &lt;span style="font-size:85%;"&gt;(photo from MobyGames, contributed by John Scott, scan of original box art by Electronic Arts)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Well,  working in Academia, I've become more and more distant from the things I  used to (and still do!) love. Namely ART, MUSIC and CODING (i.e.,  excercising the grey cells). If you don't use it... you lose it. Writing  this game seems to be a way of accomplishing these things without  feeling that it has to become a day job, doing these things for money or  under direction.&lt;br /&gt;&lt;br /&gt;Also, I just loved the game. It was a simple  little game of conquest with a nice 3D world, little people that go  about their business (farming, shepherding, soldiering, fishing etc.),  and most importantly that quirky Brit humour that summed up lots of  those early games.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;What's the plan?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I'm planning to create  a remake that is portable (Win32/OSX/Linux, OpenGL, OpenAL - maybe  Fmod) and free for anyone to download and play. I'd like to make the  source code available as well, but I've been burned in the past (i.e.,  saw my own stuff appear on FlipCode with another name, slight graphics  change and no credit whatsoever). However, I'm a nice chap and will  probably drop the source at some point.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;And after that?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Using  the basic engine, AI, etc., I'd like to implement the game ideas into a  nice big expansive 3D engine, pretty much Powermonger in a "Black and  White 2" flavour, just without all the tedious micro-management that  annoyed me about B&amp;amp;W2.&lt;br /&gt;&lt;br /&gt;Many of us have become addicts to other development blogs. I myself can't help looking at &lt;a target="_blank" href="http://www.gamedev.net/community/forums/mod/journal/journal.asp?jn=472138"&gt;Martin Bell's "Carrier Command" remake&lt;/a&gt;,  but likewise, please understand that these things take a lot of time. A  LOT of time, full of mistakes, wrong code, frustrating bugs, outside  life (yes, I have one thankyou... ;-P ) etc., so be prepared for those  long periods with no updates that are so common to the basement game dev  scene.&lt;div&gt;&lt;img src="https://blogger.googleusercontent.com/tracker/463080199411139036-8479835471193073574?l=arkiruthis.blogspot.com" alt="" width="1" height="1" /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8386776496812196127-5721572214637990348?l=arkiruthis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arkiruthis.blogspot.com/feeds/5721572214637990348/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arkiruthis.blogspot.com/2008/05/its-hard-to-believe-that-there-was-time.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/5721572214637990348'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8386776496812196127/posts/default/5721572214637990348'/><link rel='alternate' type='text/html' href='http://arkiruthis.blogspot.com/2008/05/its-hard-to-believe-that-there-was-time.html' title='Intro'/><author><name>Arkiruthis</name><uri>http://www.blogger.com/profile/07908927621630737811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://3.bp.blogspot.com/_e9SD96r57E0/TFP26a9Y3QI/AAAAAAAAAJE/ka6uNW5ovC0/S220/Squadron+Commander+Flashart(1).jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_e9SD96r57E0/SCq82ja7o3I/AAAAAAAAAAM/oiFekiOOUJ4/s72-c/1088133764-00.jpg' height='72' width='72'/><thr:total>0</thr:total></entry></feed>
