<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Chris McKellar&#039;s Programming Blog</title>
	<atom:link href="http://mckellar.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://mckellar.wordpress.com</link>
	<description></description>
	<lastBuildDate>Sun, 04 Dec 2011 16:38:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='mckellar.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Chris McKellar&#039;s Programming Blog</title>
		<link>http://mckellar.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://mckellar.wordpress.com/osd.xml" title="Chris McKellar&#039;s Programming Blog" />
	<atom:link rel='hub' href='http://mckellar.wordpress.com/?pushpress=hub'/>
		<item>
		<title>C# Piano Application WPF conversion</title>
		<link>http://mckellar.wordpress.com/2011/05/31/c-piano-application-wpf-conversion/</link>
		<comments>http://mckellar.wordpress.com/2011/05/31/c-piano-application-wpf-conversion/#comments</comments>
		<pubDate>Tue, 31 May 2011 11:17:22 +0000</pubDate>
		<dc:creator>Chris Mckellar</dc:creator>
				<category><![CDATA[Other Projects]]></category>

		<guid isPermaLink="false">http://mckellar.wordpress.com/?p=579</guid>
		<description><![CDATA[After reading a few chapters of WPF 4 Unleashed book I decided to convert my piano application to Windows Presentation Foundation. After reading about WPF for 2 weeks it was quite a daunting task, I was in at the deep end but it was the only way to really learn. WPF adds more style to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mckellar.wordpress.com&amp;blog=5029775&amp;post=579&amp;subd=mckellar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>After reading a few chapters of <a href="http://www.amazon.co.uk/WPF-4-Unleashed-Adam-Nathan/dp/0672331195">WPF 4 Unleashed</a> book I decided to convert my piano application to Windows Presentation Foundation. After reading about WPF for 2 weeks it was quite a daunting task, I was in at the deep end but it was the only way to really learn. WPF adds more style to your application with nice graphical effects running on the hardware GPU rather than traditional software CPU with win forms allowing faster, more optimised performance. Before the conversion I had a DPI scaling issue with the C# and Python versions of the piano app. running the piano app at different DPI settings would cause buttons and other components to move around due to auto scaling. I did managed to fix this with the win forms by detecting a change in DPI and then resetting positions and sizes however this resulted in messy code. WPF solves this issue and will scale perfectly in any DPI and supports many devices.</p>
<p>My main goal in converting it to WPF was to learn about WPF and XAML; I also wanted to get all the features I originally planned for such as all 88 keys of a piano.</p>
<p>I am pleased with the outcome and have achieved more than I thought I would. I am glad I got the 88 keys in and can zoom in and out. WPF has a very steep learning curve and did cause a few problems it wasn’t as easy a process as I first thought, I ended up starting a new project and transferring the logic over. Along the way I fixed up some bugs and added more new functionality, I also put the database online rather than local offline.</p>
<p>Features:</p>
<ul>
<li>88 key piano</li>
<li>Every key can be mapped to a keyboard shortcut</li>
<li>Dynamic zooming of the keyboard and auto scrolling</li>
<li>Colour customisation</li>
<li>Displays the actual musical note you play and animates and fades away</li>
<li>Previewing a song now plays a note at the right time</li>
<li>Online database to load other peoples performances, offline database to store locally</li>
<li>Audio no longer uses DirectSound but now uses Bass.net for more instant, reliable sound</li>
<li>Settings such as key mappings and colour can be saved and are automatically loaded in on application start</li>
</ul>
<p><span style="text-align:center; display: block;"><a href="http://mckellar.wordpress.com/2011/05/31/c-piano-application-wpf-conversion/"><img src="http://img.youtube.com/vi/fgUJkOMuAAk/2.jpg" alt="" /></a></span></p>
<p class="r"><a class="l" href="http://en.wikipedia.org/wiki/Windows_Presentation_Foundation"><em><em>Windows Presentation Foundation</em></em></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mckellar.wordpress.com/579/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mckellar.wordpress.com/579/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mckellar.wordpress.com/579/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mckellar.wordpress.com/579/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mckellar.wordpress.com/579/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mckellar.wordpress.com/579/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mckellar.wordpress.com/579/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mckellar.wordpress.com/579/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mckellar.wordpress.com/579/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mckellar.wordpress.com/579/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mckellar.wordpress.com/579/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mckellar.wordpress.com/579/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mckellar.wordpress.com/579/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mckellar.wordpress.com/579/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mckellar.wordpress.com&amp;blog=5029775&amp;post=579&amp;subd=mckellar&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mckellar.wordpress.com/2011/05/31/c-piano-application-wpf-conversion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2e561e42511a4ff8cac0aad531712df8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">CMUK</media:title>
		</media:content>
	</item>
		<item>
		<title>C# and Python Piano Application</title>
		<link>http://mckellar.wordpress.com/2011/05/09/c-and-python-piano-application/</link>
		<comments>http://mckellar.wordpress.com/2011/05/09/c-and-python-piano-application/#comments</comments>
		<pubDate>Mon, 09 May 2011 13:03:17 +0000</pubDate>
		<dc:creator>Chris Mckellar</dc:creator>
				<category><![CDATA[Platforms and Tools]]></category>

		<guid isPermaLink="false">http://mckellar.wordpress.com/?p=566</guid>
		<description><![CDATA[In the module Languages, Platforms and Tools I learnt a new language of my choice (Python) in 12 weeks and compared the differences to C#. I chose to write a piano application which teaches the user to play basic songs at note level. Python was enjoyable to learn and both programs are identical in functionality [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mckellar.wordpress.com&amp;blog=5029775&amp;post=566&amp;subd=mckellar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In the module Languages, Platforms and Tools I learnt a new language of my choice (Python) in 12 weeks and compared the differences to C#. I chose to write a piano application which teaches the user to play basic songs at note level. Python was enjoyable to learn and both programs are identical in functionality and appearance.</p>
<p>The piano application loads and saves to an SQL database with the pre set songs and also the user recorded songs. Below is a video of it in action:</p>
<span style="text-align:center; display: block;"><a href="http://mckellar.wordpress.com/2011/05/09/c-and-python-piano-application/"><img src="http://img.youtube.com/vi/1CWicKyK9As/2.jpg" alt="" /></a></span>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mckellar.wordpress.com/566/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mckellar.wordpress.com/566/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mckellar.wordpress.com/566/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mckellar.wordpress.com/566/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mckellar.wordpress.com/566/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mckellar.wordpress.com/566/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mckellar.wordpress.com/566/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mckellar.wordpress.com/566/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mckellar.wordpress.com/566/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mckellar.wordpress.com/566/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mckellar.wordpress.com/566/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mckellar.wordpress.com/566/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mckellar.wordpress.com/566/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mckellar.wordpress.com/566/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mckellar.wordpress.com&amp;blog=5029775&amp;post=566&amp;subd=mckellar&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mckellar.wordpress.com/2011/05/09/c-and-python-piano-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2e561e42511a4ff8cac0aad531712df8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">CMUK</media:title>
		</media:content>
	</item>
		<item>
		<title>Video Game Middleware Complete</title>
		<link>http://mckellar.wordpress.com/2011/05/09/video-game-middleware-complete/</link>
		<comments>http://mckellar.wordpress.com/2011/05/09/video-game-middleware-complete/#comments</comments>
		<pubDate>Mon, 09 May 2011 12:32:55 +0000</pubDate>
		<dc:creator>Chris Mckellar</dc:creator>
				<category><![CDATA[Video Game Middleware]]></category>

		<guid isPermaLink="false">http://mckellar.wordpress.com/?p=553</guid>
		<description><![CDATA[After 12 weeks of working with Gamebryo 2.5 I finished creating a small game to show off some of the middleware used. The game last 10 minutes and allows the player to explore and complete quests in any order. I managed to use 8 different middlewares created by other colleges and also implemented 3 external [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mckellar.wordpress.com&amp;blog=5029775&amp;post=553&amp;subd=mckellar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>After 12 weeks of working with Gamebryo 2.5 I finished creating a small game to show off some of the middleware used. The game last 10 minutes and allows the player to explore and complete quests in any order.<br />
I managed to use 8 different middlewares created by other colleges and also implemented 3 external middlewares.</p>
<p><span style="text-decoration:underline;"><strong>Internal</strong></span><br />
Text effects, Quest System, Hint system, Snapshot, Time of Day, Camera system, String database, Inventory system</p>
<p><span style="text-decoration:underline;"><strong>External</strong></span><br />
Text to speech (SAPI)<br />
DirectDraw video player<br />
FMOD</p>
<p>Here is a video of the game in action it shows a complete walkthrough and shows the functionality of all the middlewares.</p>
<span style="text-align:center; display: block;"><a href="http://mckellar.wordpress.com/2011/05/09/video-game-middleware-complete/"><img src="http://img.youtube.com/vi/7OaHWQRWjdk/2.jpg" alt="" /></a></span>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mckellar.wordpress.com/553/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mckellar.wordpress.com/553/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mckellar.wordpress.com/553/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mckellar.wordpress.com/553/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mckellar.wordpress.com/553/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mckellar.wordpress.com/553/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mckellar.wordpress.com/553/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mckellar.wordpress.com/553/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mckellar.wordpress.com/553/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mckellar.wordpress.com/553/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mckellar.wordpress.com/553/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mckellar.wordpress.com/553/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mckellar.wordpress.com/553/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mckellar.wordpress.com/553/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mckellar.wordpress.com&amp;blog=5029775&amp;post=553&amp;subd=mckellar&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mckellar.wordpress.com/2011/05/09/video-game-middleware-complete/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2e561e42511a4ff8cac0aad531712df8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">CMUK</media:title>
		</media:content>
	</item>
		<item>
		<title>Video Game Middleware</title>
		<link>http://mckellar.wordpress.com/2011/04/22/video-game-middleware/</link>
		<comments>http://mckellar.wordpress.com/2011/04/22/video-game-middleware/#comments</comments>
		<pubDate>Fri, 22 Apr 2011 15:15:46 +0000</pubDate>
		<dc:creator>Chris Mckellar</dc:creator>
				<category><![CDATA[Video Game Middleware]]></category>

		<guid isPermaLink="false">http://mckellar.wordpress.com/?p=546</guid>
		<description><![CDATA[Middleware prevents reinventing the wheel, a company can purchase off the shelf middleware and integrate this into their engine/game and see the results a lot faster and cheaper than if they were to write their own system. Middleware is used throughout the industry with examples such as speed tree for generating 3d trees across your [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mckellar.wordpress.com&amp;blog=5029775&amp;post=546&amp;subd=mckellar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Middleware prevents reinventing the wheel, a company can purchase off the shelf middleware and integrate this into their engine/game and see the results a lot faster and cheaper than if they were to write their own system. Middleware is used throughout the industry with examples such as speed tree for generating 3d trees across your game, FMOD for providing sound to the game. There are also a lot of free pieces of middleware you can use some are even open source providing you access to the code.</p>
<p>The task we were given was to create a piece of middleware which could be used in any game engine. The piece of middleware I wrote was the Navi Hint System, this gives the player a hint in the form of a string if they are struggling, it also has the option to display an image to further help the player. The system allows up to 3 hints per quest and comes with a easy to use visual hint editor which outputs to an XML to be read in by the system.</p>
<p><span style="text-align:center; display: block;"><a href="http://mckellar.wordpress.com/2011/04/22/video-game-middleware/"><img src="http://img.youtube.com/vi/U5-R__mBB70/2.jpg" alt="" /></a></span><br />
The rest of the module is about integrating other peoples middleware and forming a game out of it. The engine we are using to create the game is the Gamebryo engine.</p>
<p>Below is a screenshot of the progress made in my game<br />
<img class="alignnone" title="Dream Quest" src="http://i81.photobucket.com/albums/j223/CMUK/DreamQuestSplash222.jpg" alt="" width="614" height="449" /></p>
<p><a href="http://i81.photobucket.com/albums/j223/CMUK/Ufo1.jpg"><img class="alignnone" title="Dream Quest Screenshot" src="http://i81.photobucket.com/albums/j223/CMUK/Ufo1.jpg" alt="" width="617" height="478" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mckellar.wordpress.com/546/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mckellar.wordpress.com/546/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mckellar.wordpress.com/546/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mckellar.wordpress.com/546/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mckellar.wordpress.com/546/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mckellar.wordpress.com/546/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mckellar.wordpress.com/546/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mckellar.wordpress.com/546/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mckellar.wordpress.com/546/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mckellar.wordpress.com/546/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mckellar.wordpress.com/546/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mckellar.wordpress.com/546/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mckellar.wordpress.com/546/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mckellar.wordpress.com/546/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mckellar.wordpress.com&amp;blog=5029775&amp;post=546&amp;subd=mckellar&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mckellar.wordpress.com/2011/04/22/video-game-middleware/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2e561e42511a4ff8cac0aad531712df8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">CMUK</media:title>
		</media:content>

		<media:content url="http://i81.photobucket.com/albums/j223/CMUK/DreamQuestSplash222.jpg" medium="image">
			<media:title type="html">Dream Quest</media:title>
		</media:content>

		<media:content url="http://i81.photobucket.com/albums/j223/CMUK/Ufo1.jpg" medium="image">
			<media:title type="html">Dream Quest Screenshot</media:title>
		</media:content>
	</item>
		<item>
		<title>OpenGL Particle Engine Finished</title>
		<link>http://mckellar.wordpress.com/2010/12/19/opengl-particle-engine-finished/</link>
		<comments>http://mckellar.wordpress.com/2010/12/19/opengl-particle-engine-finished/#comments</comments>
		<pubDate>Sun, 19 Dec 2010 13:07:29 +0000</pubDate>
		<dc:creator>Chris Mckellar</dc:creator>
				<category><![CDATA[OpenGL]]></category>

		<guid isPermaLink="false">http://mckellar.wordpress.com/?p=494</guid>
		<description><![CDATA[Here it is my finished particle engine in OpenGL, The project has been a success I have hit my 60FPS and 60,000 particle goal, infact I can get double 120,000 particles with around 87 FPS with optimisations, The first 5 weeks of OpenGL were tough, I had problems with it not displaying things on screen [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mckellar.wordpress.com&amp;blog=5029775&amp;post=494&amp;subd=mckellar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://i81.photobucket.com/albums/j223/CMUK/shapes3.jpg"><img class="alignnone" title="http://i81.photobucket.com/albums/j223/CMUK/shapes3.jpg" src="http://i81.photobucket.com/albums/j223/CMUK/shapes3.jpg" alt="" width="679" height="535" /></a></p>
<p><a href="http://i81.photobucket.com/albums/j223/CMUK/SnowState.jpg"><img class="alignnone" title="http://i81.photobucket.com/albums/j223/CMUK/SnowState.jpg" src="http://i81.photobucket.com/albums/j223/CMUK/SnowState.jpg" alt="" width="675" height="532" /></a></p>
<p>Here it is my finished particle engine in OpenGL, The project has been a success I have hit my 60FPS and 60,000 particle goal, infact I can get double 120,000 particles with around 87 FPS with optimisations, The first 5 weeks of OpenGL were tough, I had problems with it not displaying things on screen due to calls being ordered wrong, I would be swapping two calls which were above and below each other around and it would suddenly work, I found the OpenGL support to be very limited, I had to really think about how to set things up I couldn’t find any sort of standard framework to build off which made me think I was doing it wrong a lot of the time, I did see some similarities in the draw calls that are found in DirectX, setting up the view and proj matrices, the popping and pushing of the stack was familiar to me when I developed on the Sony PSP. Setting up a window was surprisingly very easy compared to directX, literally only one or two lines of code, the lost and found device was also simple, the most time consuming thing was setting up OpenGL, I used freeGlut which provides a lot of helper functions and GLEW.h, setting these up and getting them linking was quite painful experience as it never just worked, I had spend a lot of time searching for extensions an fixing linker problems, It wasn’t a simple case of dropping them in the system folders, I needed to link to them within the project so it would work on any machine.</p>
<p>After week 5 I had points drawing on screen, I decided to look at shaders, I had a lot of trouble getting openGLs shaders working in fact I’m sure it was something to do with my graphics card not supporting something, I switched to NVIDIAs CG shader language and this worked fine, I went on to develop my particles, on researching particles they are very much implemented the same way, they each have a life, they die and respawn again, they have a position and a velocity, the container is often an array to hold all the particles and gets updated and drawn by looping through each individual particle.</p>
<p>I got drawing points working so one vertex coloured for each particle, I then went on to look at quads which are 4 points in each corner which makes a rectangle which you then put a texture on it to make it seem more realistic, for each particle there’s now 4 verts and a texture to render, this wasn’t very efficient and quite an old technique my frame rate dropped a lot, I looked at optimising this with something called a point sprite, this is going back to the single vert or point but applying a texture to this point, so your cutting out 3 of 4 points but still having the texture, once I got this working and the frame rate went back up again, however I now had a big problem, point sprites don’t scale.</p>
<p><a href="http://i81.photobucket.com/albums/j223/CMUK/ScalingIssue-1.jpg"><img class="alignnone" title="http://i81.photobucket.com/albums/j223/CMUK/ScalingIssue-1.jpg" src="http://i81.photobucket.com/albums/j223/CMUK/ScalingIssue-1.jpg" alt="" width="443" height="349" /></a></p>
<p>To fix this I looked around the forums and found there to be a point sprite ARB extension, I found there to be an attenuation value which I could find the distance between the camera and the sprite and scale the sprite based on this value, This solved the issue and now the particles scaled the same size as if they were quads. Other optimisations were code refactoring, by unravelling loops and looking at using quad lists I got some of the GL calls down which were the main bottleneck, Overall I’m pleased with the way it turned out, Its more graphical than I thought it would be but behind the scenes I’m pleased my code layout and the efficiency I got from the CPU, my only regret is not having the time to work with the shaders as I could of put the position and velocity vectors onto the GPU and calculated them there, increasing FPS and particle count. After getting past the setting up of OpenGL I actually like programming in OpenGL more than I thought I would, I will be using it again the fututre but aslo will be using directX I think it all depends on the project and what you want to achieve. It was refreshing to use something other than directX however I have more experience with directX and would probably have achieved better results using it as I would have had the time to work with the shaders, I still dont regret chosing OpenGL and please with the end result.</p>
<p><object width="614" height="486"><param name="movie" value="http://www.youtube.com/v/TDIgXSDb0tU?fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/TDIgXSDb0tU?fs=1" type="application/x-shockwave-flash" width="614" height="486" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><object width="614" height="486"><param name="movie" value="http://www.youtube.com/v/Lq4jD_jOvoI?fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/Lq4jD_jOvoI?fs=1" type="application/x-shockwave-flash" width="614" height="486" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mckellar.wordpress.com/494/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mckellar.wordpress.com/494/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mckellar.wordpress.com/494/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mckellar.wordpress.com/494/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mckellar.wordpress.com/494/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mckellar.wordpress.com/494/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mckellar.wordpress.com/494/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mckellar.wordpress.com/494/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mckellar.wordpress.com/494/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mckellar.wordpress.com/494/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mckellar.wordpress.com/494/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mckellar.wordpress.com/494/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mckellar.wordpress.com/494/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mckellar.wordpress.com/494/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mckellar.wordpress.com&amp;blog=5029775&amp;post=494&amp;subd=mckellar&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mckellar.wordpress.com/2010/12/19/opengl-particle-engine-finished/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2e561e42511a4ff8cac0aad531712df8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">CMUK</media:title>
		</media:content>

		<media:content url="http://i81.photobucket.com/albums/j223/CMUK/shapes3.jpg" medium="image">
			<media:title type="html">http://i81.photobucket.com/albums/j223/CMUK/shapes3.jpg</media:title>
		</media:content>

		<media:content url="http://i81.photobucket.com/albums/j223/CMUK/SnowState.jpg" medium="image">
			<media:title type="html">http://i81.photobucket.com/albums/j223/CMUK/SnowState.jpg</media:title>
		</media:content>

		<media:content url="http://i81.photobucket.com/albums/j223/CMUK/ScalingIssue-1.jpg" medium="image">
			<media:title type="html">http://i81.photobucket.com/albums/j223/CMUK/ScalingIssue-1.jpg</media:title>
		</media:content>
	</item>
		<item>
		<title>Networking Java multi user battleships</title>
		<link>http://mckellar.wordpress.com/2010/12/12/networking-java-multi-user-battleships/</link>
		<comments>http://mckellar.wordpress.com/2010/12/12/networking-java-multi-user-battleships/#comments</comments>
		<pubDate>Sun, 12 Dec 2010 18:35:11 +0000</pubDate>
		<dc:creator>Chris Mckellar</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://mckellar.wordpress.com/?p=511</guid>
		<description><![CDATA[In this project I developed a multi user network application in java, my application was the game of Battleships, It supports multiple users and have yet to test it to its limit, In theory it should support as much as server can handle, I’ve only tested with 5 users all playing same game which works [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mckellar.wordpress.com&amp;blog=5029775&amp;post=511&amp;subd=mckellar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In this project I developed a multi user network application in java, my application was the game of Battleships, It supports multiple users and have yet to test it to its limit, In theory it should support as much as server can handle, I’ve only tested with 5 users all playing same game which works perfectly.<br />
It features:</p>
<p>TCP &#8211; for the game data, sending and receiving data so it’s reliable and guaranteed delivery for uninterrupted game play.</p>
<p>UDP &#8211; for the chat room.</p>
<p>Chat room &#8211; for players waiting to go into a game, Users can send a challenge to another user and get put into a game with them, multiple users can challenge each other to get in the same game.</p>
<p>Admin/Server panel &#8211; Can see all game related messages which are hidden from normal clients, and also chat messages, with the ability to kick players out of the game. Admin also has forced commands such as entering everyone into the same game of battleships; this was used for debugging purposes.</p>
<p>Swear filter &#8211; to prevent user&#8217;s from disrupting other user’s experiences.</p>
<p>Threading – used for listening for connection both UDP/TCP, receiving messages.</p>
<p>Application layer protocol – used for the game logic and interfacing with the server messages, a state machine was used to control the flow of game play and structure the logic easier.</p>
<p><a href="http://i81.photobucket.com/albums/j223/CMUK/Battleshipsgame.png"><img class="alignnone" title="http://i81.photobucket.com/albums/j223/CMUK/Battleshipsgame.png" src="http://i81.photobucket.com/albums/j223/CMUK/Battleshipsgame.png" alt="" width="811" height="345" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mckellar.wordpress.com/511/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mckellar.wordpress.com/511/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mckellar.wordpress.com/511/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mckellar.wordpress.com/511/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mckellar.wordpress.com/511/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mckellar.wordpress.com/511/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mckellar.wordpress.com/511/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mckellar.wordpress.com/511/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mckellar.wordpress.com/511/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mckellar.wordpress.com/511/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mckellar.wordpress.com/511/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mckellar.wordpress.com/511/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mckellar.wordpress.com/511/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mckellar.wordpress.com/511/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mckellar.wordpress.com&amp;blog=5029775&amp;post=511&amp;subd=mckellar&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mckellar.wordpress.com/2010/12/12/networking-java-multi-user-battleships/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2e561e42511a4ff8cac0aad531712df8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">CMUK</media:title>
		</media:content>

		<media:content url="http://i81.photobucket.com/albums/j223/CMUK/Battleshipsgame.png" medium="image">
			<media:title type="html">http://i81.photobucket.com/albums/j223/CMUK/Battleshipsgame.png</media:title>
		</media:content>
	</item>
		<item>
		<title>Flash Preloader only loading after 70-80% problem</title>
		<link>http://mckellar.wordpress.com/2010/12/07/flash-preloader-only-loading-after-70-80-problem/</link>
		<comments>http://mckellar.wordpress.com/2010/12/07/flash-preloader-only-loading-after-70-80-problem/#comments</comments>
		<pubDate>Tue, 07 Dec 2010 18:00:33 +0000</pubDate>
		<dc:creator>Chris Mckellar</dc:creator>
				<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://mckellar.wordpress.com/?p=536</guid>
		<description><![CDATA[After adding lots of music to a flash project the file size grew, I looked at pre loaders which show progress of loading the flash game, I found a lot of good tutorials and the basic theory and implementation of loaders and created a nice simple flash loading bar, however it would only show after [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mckellar.wordpress.com&amp;blog=5029775&amp;post=536&amp;subd=mckellar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>After adding lots of music to a flash project the file size grew, I looked at pre loaders which show progress of loading the flash game, I found a lot of good tutorials and the basic theory and implementation of loaders and created a nice simple flash loading bar, however it would only show after 70-80% loading? After spending a while trying to figure out why and thinking it was my coding, I searched the internet and found various forums with the problem, and the problem is to do with linking and exporting on the first frame.</p>
<p>Objects such as movie clips may be dynamically created therefore the application needs to make sure these are ready for frame 1 as it doesn’t know when you are going to use them. This is why the game does not show the progress bar until 80% because assets need to be loaded before frame 1.</p>
<p>Solutions to this problem are:</p>
<p>1.      Create another blank SWF file only containing the assets needed for export, and then load this in to the load bar pre loader. Refer to moved assets using the _root. Or _level01 depending on how you are loading them in.</p>
<p>2.      Quick solution go through library and go into the assests linkage properties and untick &#8220;export in frame 1&#8243;, Note this solution will not work for Sounds using the attatchSound to embed them into the SWF.</p>
<p>3.      If the asset is a sound/music which its most common problem of the preloader and you are using attatchSound to embed the sound into the SWF, then add new layers for each sound and place the event for that layers first frame to be the sound you want, add a stop all sound() so it won’t play straight away. This will allow them to load on frame 1 but not before frame 1 allowing the preloader to work correctly.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mckellar.wordpress.com/536/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mckellar.wordpress.com/536/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mckellar.wordpress.com/536/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mckellar.wordpress.com/536/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mckellar.wordpress.com/536/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mckellar.wordpress.com/536/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mckellar.wordpress.com/536/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mckellar.wordpress.com/536/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mckellar.wordpress.com/536/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mckellar.wordpress.com/536/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mckellar.wordpress.com/536/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mckellar.wordpress.com/536/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mckellar.wordpress.com/536/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mckellar.wordpress.com/536/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mckellar.wordpress.com&amp;blog=5029775&amp;post=536&amp;subd=mckellar&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mckellar.wordpress.com/2010/12/07/flash-preloader-only-loading-after-70-80-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2e561e42511a4ff8cac0aad531712df8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">CMUK</media:title>
		</media:content>
	</item>
		<item>
		<title>OpenGL Particle Engine</title>
		<link>http://mckellar.wordpress.com/2010/11/19/opengl-particle-engine/</link>
		<comments>http://mckellar.wordpress.com/2010/11/19/opengl-particle-engine/#comments</comments>
		<pubDate>Fri, 19 Nov 2010 10:17:09 +0000</pubDate>
		<dc:creator>Chris Mckellar</dc:creator>
				<category><![CDATA[OpenGL]]></category>

		<guid isPermaLink="false">http://mckellar.wordpress.com/?p=491</guid>
		<description><![CDATA[In this project I am attempting to create a particle engine from scratch using OpenGL, having never programmed in openGL I am looking forward to the challenge and increasing my knowledge of other languages and APIs, I have heard a lot of interesting things about OpenGL and looked at the OpenGL vs. DirectX ongoing debate, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mckellar.wordpress.com&amp;blog=5029775&amp;post=491&amp;subd=mckellar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In this project I am attempting to create a particle engine from scratch using OpenGL, having never programmed in openGL I am looking forward to the challenge and increasing my knowledge of other languages and APIs, I have heard a lot of interesting things about OpenGL and looked at the OpenGL vs. DirectX ongoing debate, first impression it seems OpenGL is just as capable as directX if not more.  OpenGL seems to get features out quicker and has been slightly ahead in certain areas with openGL having some of the features DirectX11 has years ago. I like that anybody can develop extensions to openGL rather than how DirectX Microsoft dictates their extensions, I&#8217;m trying to avoid going to too much into which I think is better and remaining on the fence untill I&#8217;ve experienced OpenGL a bit more.</p>
<p>Having worked with DirectX for 2 years now I am a little biased and do enjoy using DirectX to create games, I could of chosen to use directX for this project but I want to see what OpenGL has to offer and would like the experience, One thing that worries me is the amount of learning resources, DirectX and Microsoft are very good at documentation and providing learning platforms such as the XNA for allowing anyone with programming experience the opportunity to develop small arcade 2d/3d games on Xbox 360 live platform. A quick look for OpenGL support and I can’t really find much support yet, I have found one or two very good tutorial websites, I think I will be relying on forums mainly however I could be totally wrong and the support could just be as good.</p>
<p><strong><span style="text-decoration:underline;">The project</span></strong></p>
<p>I have 12 weeks to come up with a particle system which could be used in real time games, which means an interactive frame rate is a must, this means either 30 frames per second or 60 FPS, I will be aiming for 60 FPS and 60,000 particles rendered on screen at the same time, This is quite a modest estimation as I’ve seen some particle engines doing millions of particles, The reason I am aiming for 60k with 60fps is because most of my time will probably be spent with learning openGL, I don’t need to really push it I just need something stable and workable, then maybe later on I can optimise and squeeze more particles out of it.</p>
<p>Example particle engine</p>
<p><a href="http://www.ozone3d.net/gpu_caps_viewer/images/demo_particles.jpg"><img class="alignnone" title="http://www.ozone3d.net/gpu_caps_viewer/images/demo_particles.jpg" src="http://www.ozone3d.net/gpu_caps_viewer/images/demo_particles.jpg" alt="" width="400" height="400" /></a></p>
<p><img class="alignnone" title="http://www.solidsmack.com/wp-content/uploads/2008/09/opengl-vs-directx3d.jpg" src="http://www.solidsmack.com/wp-content/uploads/2008/09/opengl-vs-directx3d.jpg" alt="" width="200" height="200" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mckellar.wordpress.com/491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mckellar.wordpress.com/491/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mckellar.wordpress.com/491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mckellar.wordpress.com/491/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mckellar.wordpress.com/491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mckellar.wordpress.com/491/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mckellar.wordpress.com/491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mckellar.wordpress.com/491/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mckellar.wordpress.com/491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mckellar.wordpress.com/491/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mckellar.wordpress.com/491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mckellar.wordpress.com/491/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mckellar.wordpress.com/491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mckellar.wordpress.com/491/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mckellar.wordpress.com&amp;blog=5029775&amp;post=491&amp;subd=mckellar&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mckellar.wordpress.com/2010/11/19/opengl-particle-engine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2e561e42511a4ff8cac0aad531712df8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">CMUK</media:title>
		</media:content>

		<media:content url="http://www.ozone3d.net/gpu_caps_viewer/images/demo_particles.jpg" medium="image">
			<media:title type="html">http://www.ozone3d.net/gpu_caps_viewer/images/demo_particles.jpg</media:title>
		</media:content>

		<media:content url="http://www.solidsmack.com/wp-content/uploads/2008/09/opengl-vs-directx3d.jpg" medium="image">
			<media:title type="html">http://www.solidsmack.com/wp-content/uploads/2008/09/opengl-vs-directx3d.jpg</media:title>
		</media:content>
	</item>
		<item>
		<title>AI Generic Perception System</title>
		<link>http://mckellar.wordpress.com/2010/11/12/ai-generic-perception-system/</link>
		<comments>http://mckellar.wordpress.com/2010/11/12/ai-generic-perception-system/#comments</comments>
		<pubDate>Fri, 12 Nov 2010 20:06:40 +0000</pubDate>
		<dc:creator>Chris Mckellar</dc:creator>
				<category><![CDATA[AI]]></category>

		<guid isPermaLink="false">http://mckellar.wordpress.com/?p=522</guid>
		<description><![CDATA[In this project I made an AI perception demo based on Frank Puig Placeres in the AI Games Programming Wisdom 4 book, AI perception means perceiving the world around you and making sense of it to use for decisions. The article explains two types of sensing static and dynamic sensing, in static sensing the AI [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mckellar.wordpress.com&amp;blog=5029775&amp;post=522&amp;subd=mckellar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In this project I made an AI perception demo based on Frank Puig Placeres in the AI Games Programming Wisdom 4 book, AI perception means perceiving the world around you and making sense of it to use for decisions. The article explains two types of sensing static and dynamic sensing, in static sensing the AI will detect walls and stationary objects, in dynamic sensing it will sense anything which moves this can also be footsteps or audio sensing such as noises.</p>
<p>The AI agent will have sensors which it needs based on its type, such as a guard would have a tactical sensor which scans for ambush points and good spots to hide or use for combat, An environment sensor to detect walls and obstacle, a beacon sensor to detect dynamic objects or sensors.</p>
<p>All the information that gets detected by the agent gets processed and acted upon it is important to note the agent is trying to simulate human behaviour and sensors, Games which make full use of AI perception tend to be of the stealth genre, these perceptions have to be very fast, reliable and quite complex, splinter cell for example the AI has to seem intelligent and life like by responding to events the player causes such as, throwing a bottle near the AI it should detect a noise and work out roughly where it got thrown from,  The AI won’t need to fully sense like humans it will reject sensing something humans cant, for example it won’t detect noises far away unless instructed to, it also only cares about agents and players close to them, even the sense time is not realistic in speed and reaction but is good enough to fool the player and free up more CPU cycles for other areas such as physics calculations.</p>
<p>In my demo I use an environment sensor for walls and barrels, various beacon sensors for detecting footsteps, gunshot sounds, dead bodies and enemies</p>
<p><a href="http://i81.photobucket.com/albums/j223/CMUK/Demo.jpg"><img class="alignnone" title="http://i81.photobucket.com/albums/j223/CMUK/Demo.jpg" src="http://i81.photobucket.com/albums/j223/CMUK/Demo.jpg" alt="" width="695" height="490" /></a><br />
<span style="text-align:center; display: block;"><a href="http://mckellar.wordpress.com/2010/11/12/ai-generic-perception-system/"><img src="http://img.youtube.com/vi/52U3mW9NpHg/2.jpg" alt="" /></a></span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mckellar.wordpress.com/522/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mckellar.wordpress.com/522/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mckellar.wordpress.com/522/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mckellar.wordpress.com/522/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mckellar.wordpress.com/522/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mckellar.wordpress.com/522/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mckellar.wordpress.com/522/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mckellar.wordpress.com/522/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mckellar.wordpress.com/522/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mckellar.wordpress.com/522/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mckellar.wordpress.com/522/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mckellar.wordpress.com/522/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mckellar.wordpress.com/522/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mckellar.wordpress.com/522/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mckellar.wordpress.com&amp;blog=5029775&amp;post=522&amp;subd=mckellar&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mckellar.wordpress.com/2010/11/12/ai-generic-perception-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2e561e42511a4ff8cac0aad531712df8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">CMUK</media:title>
		</media:content>

		<media:content url="http://i81.photobucket.com/albums/j223/CMUK/Demo.jpg" medium="image">
			<media:title type="html">http://i81.photobucket.com/albums/j223/CMUK/Demo.jpg</media:title>
		</media:content>

		<media:content url="http://img.youtube.com/vi/52U3mW9NpHg/2.jpg" medium="image" />
	</item>
		<item>
		<title>Flash Game Fruit Frenzy</title>
		<link>http://mckellar.wordpress.com/2010/07/30/flash-game-fruit-frenzy/</link>
		<comments>http://mckellar.wordpress.com/2010/07/30/flash-game-fruit-frenzy/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 11:34:34 +0000</pubDate>
		<dc:creator>Chris Mckellar</dc:creator>
				<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://mckellar.wordpress.com/?p=446</guid>
		<description><![CDATA[Click here to Play Fruit Frenzy is a flash game built on my previous flash game buster, It does just look a lot like a Reskin but there is actually a lot more to it. The main feature I wanted buster to have all along was a dynamically resizing grid, The reason I couldn’t manage [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mckellar.wordpress.com&amp;blog=5029775&amp;post=446&amp;subd=mckellar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://cm.1free.ws/"><img class="alignnone" title="FruitFrenzy" src="http://i81.photobucket.com/albums/j223/CMUK/froot.jpg" alt="" width="419" height="312" /></a><br />
<a href="http://cm.1free.ws/"><img class="alignnone" title="Fruit Frenzy Click to Play" src="http://i81.photobucket.com/albums/j223/CMUK/froot1.jpg" alt="" width="419" height="312" /></a><br />
<a href="http://cm.1free.ws/" target="_blank">Click here to Play</a></p>
<p>Fruit Frenzy is a flash game built on my previous flash game buster, It does just look a lot like a Reskin but there is actually a lot more to it. The main feature I wanted buster to have all along was a dynamically resizing grid, The reason I couldn’t manage this the first time round was due to time constraints, work and just general lack of experience with flash and action script. This time around I’ve managed it, I am very pleased with the way Fruit Frenzy has turned out Its still very much experimental and a learning exercise for me to get more familiar with flash and action script. It suffered quite bad feature creep which was fun and challenging, but a real headache because it created so many new bugs some as severe as crashing the game, most of them were quite rare and hard to track down, a lesson learned the very hard way luckily I had the time to fix them.</p>
<p>So what are the main features of Fruit Frenzy:</p>
<ul>
<li> <strong>Dynamically scaling grid</strong> – The grid will add extra rows and columns on remove rows and columns in real time, this changes the gameplay a lot allowing more fruit and eventually making it harder as more different types of fruit gets introduced depending on your skill level.</li>
</ul>
<ul>
<li> <strong>Skill Level</strong> – The game features 8 levels of skill, at each level a new type of fruit is added to random pool of the game, This makes the game harder or easier for the player.</li>
</ul>
<ul>
<li> <strong>5 random events</strong> – Theses take place randomly throughout the game, The random events are as follows:
<ul>
<li> Bird – The bird flies over and marks some fruit bad meaning you can’t swap it for a certain amount of time.</li>
<li> Monkey – The monkey will throw 3 bananas and randomly tag 3 sets of cells making them un swappable for a certain amount of time making it very frustrating for the player.</li>
<li> Blackout – The fruit gets darker making it harder to see the fruit.</li>
<li> Underwater – The game board gets submerged making it hard to see the fruit beneath similar to blackout.</li>
<li> Swaps – get 3 or more swaps signs and the board randomly swaps the fruit about, can be very useful if used on a big grid, can also get in the way.</li>
</ul>
</li>
<li><strong>Day/Night cycle</strong> – A nice transitioning background fading from day to night and back, very sutle but nice touch to give the game some atmosphere.</li>
</ul>
<ul>
<li> <strong>Frenzy Meter </strong>– Gain frenzy by quickly matching fruit and gaining combos, Fill the meter to the top to activate frenzy, Frenzy allows the player to speed up swapping and animations almost like a reverse adrenaline effect, The player will be able to match and score faster while frenzy is activated, The player will be constantly battling the meter as it loses frenzy every few seconds.</li>
</ul>
<ul>
<li> <strong>One click swap</strong> – swapping fruit now only requires one click for the fruit you wish to swap and then a mouse hover over the other fruit to activate the swap, This takes away some of the repetitive clicking and makes it more fluid gameplay</li>
</ul>
<ul>
<li> <strong>Dynamically adjusting difficulty</strong> – This has been the real challenge, developing a way to scale the difficulty to the player, The way I achieved this or have come very close to is by dumping out statistics about the game, exposing variables to a debug panel to see values changing in real time has helped me gauge how well the player is doing or responding, I used various calculations to come up with a way to measure success which is all based around timings and so far has been pretty excellent. The grid will scale up/down the skill level also increased/decreases</li>
</ul>
<ul>
<li><strong>Stat logging server side</strong> – This has been a real frustration from the start, After learning flash doesn’t like http/ftp or any type of connection without the support of AIR, I did manage to find another way which is loadvars, This required me setting up a web server and brushing up on some php. Essentially the flash communicates with the php which in turn takes vars sent and outputs it to a text file stored on the server. This was all working great until I tested the flash game in html suddenly it wouldn’t log anything, on further investigation it looks like it’s coming up as a security threat and the browser is blocking the communication. A real shame as this was going to dump out scores and various stats at the end of the game, this data would have been invaluable and could have been averaged out and be sent back to the game as the default variables making the players balance the game on others experiences.</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mckellar.wordpress.com/446/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mckellar.wordpress.com/446/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mckellar.wordpress.com/446/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mckellar.wordpress.com/446/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mckellar.wordpress.com/446/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mckellar.wordpress.com/446/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mckellar.wordpress.com/446/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mckellar.wordpress.com/446/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mckellar.wordpress.com/446/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mckellar.wordpress.com/446/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mckellar.wordpress.com/446/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mckellar.wordpress.com/446/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mckellar.wordpress.com/446/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mckellar.wordpress.com/446/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mckellar.wordpress.com&amp;blog=5029775&amp;post=446&amp;subd=mckellar&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mckellar.wordpress.com/2010/07/30/flash-game-fruit-frenzy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2e561e42511a4ff8cac0aad531712df8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">CMUK</media:title>
		</media:content>

		<media:content url="http://i81.photobucket.com/albums/j223/CMUK/froot.jpg" medium="image">
			<media:title type="html">FruitFrenzy</media:title>
		</media:content>

		<media:content url="http://i81.photobucket.com/albums/j223/CMUK/froot1.jpg" medium="image">
			<media:title type="html">Fruit Frenzy Click to Play</media:title>
		</media:content>
	</item>
	</channel>
</rss>
