<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>grv.</title>
	<atom:link href="http://thegrieve.co.uk/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://thegrieve.co.uk/blog</link>
	<description>thoughts on games, technology and programming</description>
	<lastBuildDate>Tue, 23 Aug 2011 21:04:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>&#8220;When I Was Human&#8221; &#8211; Ludum Dare #21 Postmortem</title>
		<link>http://thegrieve.co.uk/blog/2011/08/when-i-was-human-ludum-dare-21-postmortem/</link>
		<comments>http://thegrieve.co.uk/blog/2011/08/when-i-was-human-ludum-dare-21-postmortem/#comments</comments>
		<pubDate>Tue, 23 Aug 2011 20:53:41 +0000</pubDate>
		<dc:creator>Grieve</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Gaming]]></category>
		<category><![CDATA[Ludum Date]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://thegrieve.co.uk/blog/?p=237</guid>
		<description><![CDATA[Check (and rate) the game here: http://www.ludumdare.com/compo/ludum-dare-21/?action=preview&#38;uid=1947 &#160; Making a game in 48 hours is never easy, but thankfully it was less hard this time. Mainly because I decided to use tools I was more familiar with, instead of using the weekend to learn a new tool or framework. I started the weekend with the [...]]]></description>
			<content:encoded><![CDATA[<p>Check (and rate) the game here:</p>
<p><a href="http://www.ludumdare.com/compo/ludum-dare-21/?action=preview&amp;uid=1947">http://www.ludumdare.com/compo/ludum-dare-21/?action=preview&amp;uid=1947</a></p>
<hr />
<p>&nbsp;</p>
<p>Making a game in 48 hours is never easy, but thankfully it was less hard this time. Mainly because I decided to use tools I was more familiar with, instead of using the weekend to learn a new tool or framework.</p>
<p>I started the weekend with the idea of making a super-hero canabalt. Something that lends a bit of variety to the one-button run genre. A constant threat from the rear, a path that makes it difficult to stay out in front and some kind of upgrade system.</p>
<p>I structured my development a lot more than usual, with index cards and a vague agile methodology (and the entire living floor). I tried to sleep well during the weekend, getting 6 hours on Friday night, and 9(!) on Saturday. I also ate well, cooking rather than the usual takeaways, and only drinking one energy drink the whole weekend. (I did manage to polish off 5 pots of coffee though, which was around 25+ cups.)</p>
<p>&nbsp;</p>
<p><img src="http://www.ludumdare.com/compo/wp-content/compo2/62148/1947-shot1.png" alt="" /></p>
<p>&nbsp;</p>
<p><strong>What Went Right™</strong></p>
<p><span style="text-decoration: underline"><em>Organisation</em></span> &#8211; I didn&#8217;t feel stressed much at all during the weekend. I managed time for music and even some graphics polishing at the end (not much mind, I&#8217;m not an artist and it&#8217;s hard to make faeces shine). All in all, I always felt like I knew what I was doing, what I had done, and what I would have to do.</p>
<p>&nbsp;</p>
<p><span style="text-decoration: underline"><em>Tools</em></span> &#8211; I normally take a sackcloth-and-ashes approach to development: &#8220;If it can&#8217;t be done on the command line, then&#8230; you&#8217;re lying, because everything can be done on the command line. Fiend!&#8221; &#8211; But this weekend, I used FlashDevelop and worked on windows most of the time. FlashDevelop really is unparalleled when it comes to Actionscript coding.</p>
<p>&nbsp;</p>
<p><span style="text-decoration: underline"><em>K.I.S.S. (Keep It Simple, Stupid)</em></span> &#8211; I nailed down the initial mechanics early. Platformer with tilemaps, jumping, double jumping. I did it all with multi-coloured squares too, sprites were an afterthought. I didn&#8217;t try to invent a new genre, and I didn&#8217;t try to rewrite the entirety of FlashPunk&#8217;s BitmapData handling (see: LD #19). I took a simple idea, and made it.</p>
<p>&nbsp;</p>
<p><span style="text-decoration: underline"><em>Asset Pipeline</em></span> &#8211; I learned the workings of D.A.M.E. very early on in the weekend. Got familiar with its output format, its awkward, awkward tools, and it&#8217;s habit of refusing to write to CSV on occasion because it believes MXMLC is still holding on to the files (although this is more likely Adobe&#8217;s fault). I got much better at using Graphics Gale for initial pixel pushing and animating, and then using Photoshop to touch up and bake in some vague lighting.</p>
<p>&nbsp;</p>
<p><span style="text-decoration: underline"><em>Emitters!</em></span> &#8211; Who doesn&#8217;t love little objects that fire random things in random directions? More Emitters, I say. More. I wish I could have Emitters every day of the week. My next game might be made entirely out of Emitters.</p>
<p>&nbsp;</p>
<p><span style="text-decoration: underline"><em>Guinness</em></span> &#8211; Thanks to my first point, Organisation, I afforded myself an hour on Sunday for a few relaxing pints of Black. Boom.</p>
<p>&nbsp;</p>
<p><span id="more-237"></span></p>
<hr />
<p>&nbsp;</p>
<p><strong>What Went Wrong™</strong></p>
<p><span style="text-decoration: underline"><em>Tilemaps</em></span> &#8211; I spent a lot of time trying different ideas on how to procedural generate the maps. I had never made a platformer before, nor any game that made use of tilemaps. My first 30+ hours, I simply used a very very large tilemap, ~10000 tiles wide. This allowed me the ability to continue working and come back to this issue.<br />
Eventually I decided upon much smaller (200 wide) tilemap segments. These were manually arranged in sets within the Level class, with each set corresponding to the players current powerup progression, and then randomly appended to the scene when the player was &lt; 1600 pixels from nothingness.<br />
This worked fine for a while, until I realised that these tilemaps were persisting, and even being called in collision routines LONG AFTER THE PLAYER HAD MOVED PAST&#8230;. Some rewriting here, and some destroy()&#8217;s there and we gained a little bit of performance back.</p>
<p>(It&#8217;s worth noting however that I didn&#8217;t infinite-ize ALL of the tilemaps in the game, and getting more than 2000m will cause the world to end in a dramatic, double-buffer kind of way, go-on, I dare you.)</p>
<p>&nbsp;</p>
<p><span style="text-decoration: underline"><em>Helicopters</em></span> &#8211; See those bombs that keep dropping? Aye, they&#8217;re coming from a helicopter. Do you know why you can&#8217;t see the helicopter? Because I suck at drawing helicopters.</p>
<p>&nbsp;</p>
<p><span style="text-decoration: underline"><em>Wall Jump</em></span> &#8211; Not as easy as I first thought, I had it working early on, but it didn&#8217;t feel right and it looked weird. Definitely a brick for the post-compo window.</p>
<p>&nbsp;</p>
<p><span style="text-decoration: underline"><em>Communicating with the player</em></span> &#8211; Even in a relatively simple game (perhaps more so if its a well establish genre, actually), its hard to communicate certain ideas, goals and hazards to the player.<br />
My intention for this game was for the player to only lose if they got caught (or, more accurately, blown up). This meant you didn&#8217;t lose any health if you fell down a hole.The holes served simply as a setback, in order to close the distance between you and the doom of fiery sky-bombs.<br />
Seemingly, people missed this, and thought it either odd that health wasn&#8217;t removed by falling down, or that it was cruel that health wasn&#8217;t restored when returned to the last checkpoint. In the post-compo version, I will address this with 2 changes.</p>
<p>&nbsp;</p>
<p>First, I will record player position AND bomb position at each checkpoint, and restore on death, as opposed to just the player position being restored as it is now (and then the bombs being teleported to a nearby threatening location).</p>
<p>Second, when a player dies, I will animate the scrolling of the screen back to the checkpoint position, display both player character and distance from danger. I will then visually display a reduction in this distance, to reinforce the punishment.</p>
<p>&nbsp;</p>
<p><img src="http://www.ludumdare.com/compo/wp-content/compo2/62148/1947-shot0.png" alt="" /></p>
<p>&nbsp;</p>
<p><strong>What&#8217;s Next?</strong></p>
<p>Aside from the aforementioned changes, I have a few other ideas I&#8217;m going to be implementing in the near future, including, but not limited to:</p>
<p><em>Story mode</em>, with a number of discrete, designed levels, catered to the current unlocked DNA.<br />
<em>New DNA&#8217;s</em>, including Spider-Monkey, Electric Eel and Mole.<br />
<em>Highscores</em>, self explanatory!<br />
<em>Better graphics</em>, self revelatory!<br />
<em>High Definition Jazz Kittens</em>, only at participating stores.</p>
<p>&nbsp;</p>
<p><strong>Crazy Idea?</strong></p>
<p><span style="text-decoration: underline">Passive Multiplayer</span></p>
<p>After a playthrough, a replay of the players run, along with the generated map of their run would be saved with their highscore. Next time someone plays, instead of getting a freshly generated map, they would retrieve one from a server, along with the &#8220;ghosts&#8221; of everyone else who played that map. Allowing for an indirect, asynchronous level of multiplayer competition.</p>
<p>&nbsp;</p>
<p><strong>Conclusion</strong></p>
<p>What a bloody great way to spend a weekend. I always enjoy it too much. This time I feel more accomplished and I&#8217;m looking forward to working on this game for quite a while to come. Hope you all had a great time too!</p>
<p>&nbsp;</p>
<p><strong>Timelapse</strong></p>
<p><object width="500" height="306"><param name="movie" value="http://www.youtube.com/v/OWHoTRqv4e0?version=3"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/OWHoTRqv4e0?version=3" type="application/x-shockwave-flash" width="500" height="306" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://thegrieve.co.uk/blog/2011/08/when-i-was-human-ludum-dare-21-postmortem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sunshine on the mountainside</title>
		<link>http://thegrieve.co.uk/blog/2011/07/sunshine-on-the-mountainside/</link>
		<comments>http://thegrieve.co.uk/blog/2011/07/sunshine-on-the-mountainside/#comments</comments>
		<pubDate>Fri, 22 Jul 2011 12:49:10 +0000</pubDate>
		<dc:creator>Grieve</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://thegrieve.co.uk/blog/?p=224</guid>
		<description><![CDATA[Anyone heading up to Glasgowbury this fine weekend? Looks set to be a great one. Any Android folks heading up the mountain can grab the little app I put together with acts, stages and times. Haven&#8217;t had time to get it cleared for the Market so you&#8217;ll have to download it yourself here. http://ryangrieve.com/glasgowbury If [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://ryangrieve.com/android_gbury.png" width="500px" height="171px"/><br />
<br/></p>
<p>Anyone heading up to <a href="http://www.glasgowbury.com">Glasgowbury</a> this fine weekend? Looks set to be a great one.</p>
<p>Any Android folks heading up the mountain can grab the little app I put together with acts, stages and times. Haven&#8217;t had time to get it cleared for the Market so you&#8217;ll have to download it yourself here.</p>
<p><strong><a href="http://ryangrieve.com/glasgowbury">http://ryangrieve.com/glasgowbury</a></strong></p>
<p>If you&#8217;ve never installed an app manually before, you will have to check the <strong>&#8220;Unknown Sources&#8221;</strong> box in <strong>&#8220;Settings >> Applications&#8221;</strong>.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://thegrieve.co.uk/blog/2011/07/sunshine-on-the-mountainside/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recursive constructors and Quad-trees</title>
		<link>http://thegrieve.co.uk/blog/2011/07/recursive-constructors-and-quad-trees/</link>
		<comments>http://thegrieve.co.uk/blog/2011/07/recursive-constructors-and-quad-trees/#comments</comments>
		<pubDate>Wed, 06 Jul 2011 12:56:28 +0000</pubDate>
		<dc:creator>Grieve</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://thegrieve.co.uk/blog/?p=218</guid>
		<description><![CDATA[After much faffing about last night with my tilemaps, I realized that what I actually was looking for was much more akin to a quad-tree than a tilemap. So that&#8217;s what I&#8217;ve implemented. My new class &#8220;CorruptedSector&#8221; should allow me to be much more sensible about this generation malarkey. Firstly, it is the only class [...]]]></description>
			<content:encoded><![CDATA[<p>After much faffing about last night with my tilemaps, I realized that what I actually was looking for was much more akin to a quad-tree than a tilemap. So that&#8217;s what I&#8217;ve implemented.</p>
<p>My new class &#8220;CorruptedSector&#8221; should allow me to be much more sensible about this generation malarkey. Firstly, it is the only class used for corruption, as opposed to my previous implementations of &#8220;CorruptedTile&#8221; and &#8220;CorruptedTilemap&#8221;, and secondly, each instance retains references to only its neighbours, its parent, and its children, those it will directly affect. </p>
<p>With regards to efficiency,  we will only go as deep into the tree as necessary to update and draw changes. This is logically quite simple, when calling the update function for a CorruptedSector, if none of the sector&#8217;s children have been flagged as changed, then we run this sector&#8217;s update and we&#8217;re done. Else we call each of the children&#8217;s update functions in turn, which will then check their own children and so on.</p>
<p>This means the actual generation logic is now inherent in each sector. I had avoided this before, as it had been more efficient for the tilemap to handle this logic, but the tree nature of the structure now puts an end to that. When a sector is &#8220;spreading&#8221; it will call the generation functions of its neighbours, which will be able to determine whether it should to apply the affect to itself, or to individual children.</p>
<p><img alt="Quad-tree generation method" src="http://thegrieve.co.uk/images/quadtree-spread.png" title="Quad-tree generation method" width="500" height="171" /></p>
<p>If a Sector interacts with one of its neighbours, we flag that neighbour for update. This flagging process will then bubble up the tree, marking each parent, in order, as flagged. The same happens if a sector is affected in any other way, such as being hit by the player&#8217;s weapons. This selective processing will obviously help performance in a great way, but I can also implement accuracy variations on the generation algorithm as well, as mentioned in a previous post. Hopefully my world size will not be limited by anything other than design choices after this.</p>
<p>I&#8217;m excited to get interfacing these changes with the current game logic, it will make a lot of future developments easier too, such as weapon collision detection and A.I. pathfinding.</p>
]]></content:encoded>
			<wfw:commentRss>http://thegrieve.co.uk/blog/2011/07/recursive-constructors-and-quad-trees/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>It&#8217;s tilemaps all the way down&#8230;</title>
		<link>http://thegrieve.co.uk/blog/2011/07/its-tilemaps-all-the-way-down/</link>
		<comments>http://thegrieve.co.uk/blog/2011/07/its-tilemaps-all-the-way-down/#comments</comments>
		<pubDate>Tue, 05 Jul 2011 13:21:04 +0000</pubDate>
		<dc:creator>Grieve</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://thegrieve.co.uk/blog/?p=207</guid>
		<description><![CDATA[At the weekend I started a new project, an entry for July&#8217;s Experimental Gameplay theme &#8220;Disintegrate&#8221;. I was quite pleased with the progress I made over the short time so far (show below), but I&#8217;ve run into a major problem and I&#8217;ve been mulling possible solutions over in my head. Going to sound the problem, [...]]]></description>
			<content:encoded><![CDATA[<p><strong>At the weekend I started a new project, an entry for July&#8217;s Experimental Gameplay theme <a href="http://experimentalgameplay.com/blog/2011/07/disintegrate-in-july/">&#8220;Disintegrate&#8221;</a></strong>. I was quite pleased with the progress I made over the short time so far (show below), but I&#8217;ve run into a major problem and I&#8217;ve been mulling possible solutions over in my head. Going to sound the problem, and one of the solutions, out here and see what happens, if by the time I&#8217;m done it sounds ridiculous then this post will probably never see the light of day. ;)<br />
<br/><br />
<iframe width="500" height="405" src="http://www.youtube.com/embed/TaclN4LXiGw" frameborder="0" allowfullscreen></iframe><br />
<br/><br />
Currently my class for the spreading corruption keeps 2 arrays, effectively 2 tilemaps. One of these is for its visual representation and the other is a much simpler array of integer values that is used for raycasting, collision detection etc. Currently each tile in the corruption has a &#8220;corrupted&#8221; value, and when it is high enough it will start increasing the &#8220;corrupted&#8221; value of its adjacent tiles.<strong> This isn&#8217;t a straight forward increment, there are some seeded random values, and other considerations to be taken into account, that can speed up or slow down the corruption process.</strong></p>
<p>This works quite well at current settings, and a world size of 1024&#215;768 pixels, (each corruption tile is 8&#215;8). The framerate starts to drop when the world size is increased beyond this.<strong> I want my game world to be considerably (+10x) larger than this.</strong></p>
<p>My viewport is currently 800&#215;600, so obviously not every tile is on the screen at once, so the next conclusion is that I don&#8217;t need to be generating the spread of corruption in realtime for non-visible areas. This seems trivial, but for one thing. I want the spread of corruption in the game to be a constant threat for the player. If the player leaves an area, where their buildings/resources/assets are, and travels a great distance away, I want the spread to be in their mind the whole time. When they return I want the shape, size and spread of the area to be in accordance with their expectations. </p>
<p>So, using the above statement I can say I regenerate the area <b>as the player approaches it</b>. However, what if I want the player to received alerts when their base of operations is being overrun? This will mean I need to keep the generation going in at least a semi realtime fashion.</p>
<p>The solution that currently has prime position in my mind is as follows&#8230;</p>
<p><strong>First I drop the game&#8217;s viewport to 640&#215;480</strong> (a much more acceptable geometry for a flash game anyway). This will decrease the number of tiles on the screen at any given instant. Next, I break the world map down into viewport sized areas. Each of these areas themselves a tilemap of 8&#215;8 corruption squares, essentially the same as my current single 1024&#215;768 corruption class.</p>
<p>Now I take this new area class and I make some changes to its generation procedures. Lets, for the sake of argument, say we have 4 levels of generation.</p>
<p>1) <strong>Real-time</strong>. As the player views it, same as all generation is currently.</p>
<p>2) <strong>Semi-real-time</strong>. This will have the full generation procedure operating at a reduced rate, but using increased values. This will take less grunt to run, but will look jerky and horrible.</p>
<p>3) <strong>Deferred</strong>. These areas do not generate at all, they simply store the time elapsed since last time generation ran and run an efficient, less accurate, &#8220;catch-up&#8221; generation, regularly. (or when the player approaches them).</p>
<p>4) <strong>None</strong>. These areas have not yet been approached or witnessed by the player, they will be randomly created and pushed to one of the above modes when the player approaches them.</p>
<p><strong>So, each 640&#215;480 tilemap, will be pushed into one of these generation modes based upon the players position and current velocity.</strong> There will only ever be a max of 4 of these areas on-screen. So these 4 will be in mode 1, real-time. A player heading towards a corner will be approaching, at max, 3 other areas, these areas will be in mode 2, semi-real-time. All other tiles that the player has witnessed at least once will be in mode 3, deferred, with the remainder in mode 4.</p>
<p>It may be useful to actually insert another mode after semi-real-time, <strong>semi-demi-real-time</strong> if you will. This would be the areas just outside the real time areas, but not being approached by the player. That way we could handle sudden changes in direction smoothly.</p>
<p>Erm&#8230; yeah so that the idea, as fuzzy as it is. </p>
<p><strong>Does it make sense?</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://thegrieve.co.uk/blog/2011/07/its-tilemaps-all-the-way-down/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>(Week 1 &#8211; Day 1) &#8220;Rush Expansions&#8221; : Refactoring&#8230;</title>
		<link>http://thegrieve.co.uk/blog/2011/04/rush-expansions-week-1-day-1-refactoring/</link>
		<comments>http://thegrieve.co.uk/blog/2011/04/rush-expansions-week-1-day-1-refactoring/#comments</comments>
		<pubDate>Fri, 22 Apr 2011 19:07:27 +0000</pubDate>
		<dc:creator>Grieve</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Gaming]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[rushexpansions]]></category>

		<guid isPermaLink="false">http://thegrieve.co.uk/blog/?p=201</guid>
		<description><![CDATA[Excited to be taking part in #1monthgame or OMG! if you prefer :) Taking a break from my current FlashPunk based project to get back to some real programming. I&#8217;ll be using C++ with SFML, with sfxr likely providing my audio. I&#8217;ll be developing on Ubuntu Linux 11.04 and targeting Linux, Windows and OSX. The [...]]]></description>
			<content:encoded><![CDATA[<p>Excited to be taking part in #1monthgame or OMG! if you prefer :)</p>
<p>Taking a break from my current FlashPunk based project to get back to some real programming. I&#8217;ll be using C++ with <a href="http://www.sfml-dev.org">SFML</a>, with sfxr likely providing my audio. I&#8217;ll be developing on Ubuntu Linux 11.04 and targeting Linux, Windows and OSX.</p>
<p>The idea I&#8217;m running with will be a cousin of the Tower Defense genre, loosely connected to my first LD48 entry &#8220;<a href="http://www.ludumdare.com/compo/ludum-dare-17/?action=preview&#038;uid=1947">Planetfall</a>&#8220;. The player will be a single ship on the frontier of colonized space charged with defending the territories on a budget. (Space bureaucracy makes life hard for everyone).</p>
<p>I&#8217;ll be perfectly honest the idea isn&#8217;t very fleshed out atm. I have about 30 pages of scribbled notes and terrible diagrams that point the game in 8 different directions. These will get refined hopefully at some point tonight/tomorrow and I can update this post with some <b><i>actual</i></b> details.</p>
<p>Currently I&#8217;m refactoring a lot of the code used in Planetfall and expanding upon the shambles of a game framework that I&#8217;m calling &#8220;Stile&#8221;. This might take a while&#8230;</p>
<p>What I am sure of, however, is that this game will suffer from a massive case of Programmer&#8217;s Art, at least initially.</p>
<p>Grieve</p>
]]></content:encoded>
			<wfw:commentRss>http://thegrieve.co.uk/blog/2011/04/rush-expansions-week-1-day-1-refactoring/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

