Tag Archives: Projects

Creating an Adaptive A.I. for Games Using the Adaptive Resonance Theory

Source code – Unity, C#

The final part of our 4th Year of Computer Games Technology was the 2015 Abertay Showcase.

I was honoured for my project to be chosen for the Yoyo Games Prize for Applied Theory.

Over the weekend I was present to talk over my project, and it was a great experience.

During the initial stages of this project I was considering what engine (if any) to use. As I felt that a 2D demonstration would be sufficient, the idea of writing the whole project in C++ with the aid of a graphics library was tempting. My decision to use Unity was based both on my previous experience with it, and a lack of experience with Unreal. During the creation of the first prototype I was quickly forced into using a full 3D scene, to take advantage of Unity’s inbuilt path finding and allow true ray-casting for line-of-sight checks.

During development Unity 5 was released along with the previously Pro only feature of real-time shadows. Initially this was only added for the aesthetics of representing the A.I.s sight, and perhaps moving more towards the look of Metal Gear Solids Soliton Radar.


During the showcase it became clear that visually representing sight through lights and the shadows they create was giving people a clear understanding of the games primary mechanics. Though previous 2D concepts had seemed clear to me, it would have been far more to difficult to explain. The additions of the 1st person view and mini-map were also positively received.


Programming a functioning ART Network provided a significant challenge throughout the semester, even though I was unable to implement a functioning ART2 network – I was able to modify the existing ART1 implementation for this project.


A compromise that had to be made later on was the design of the ART networks input vector. Initially I had hoped to implement a system which could accept a variable length input and re-order it to better suit any matching data. The ART1 implementation would not allow for this, to do so would have required the removal of parts of the system that define it as an ART Network. Therefore I was forced to design a fixed input structure to suit this projects implementation.


The previously built DBSCAN algorithm was added to allow the A.I. to search the environment. The test scene contains a list of positions which the A.I. must search, once every location has been visited the list would be refreshed. Each position contained a set radius – which would be used to generate a DBSCAN of the remaining area. This search would highlight any clusters as new navigation points to be visited before the A.I. can move on to the next area.


As the final build requires a 360 controller, this video demonstrates the main mechanics of the project.

Run Doggies Run!


This was our submission for the 2015 Global Game Jam at Abertay University!

This game was made by Julie Kennedy and myself in under 48 hours. The theme this year was “What Do We Do Now”, which resulted in a fair few co-op games like ours. The object of the game is keep running as fast as possible by jumping over flowers, and removing larger obstacles by getting the right dog in front.


After a long wait it was finally time – the 3rd Year Group Project.

Our team was assigned to Guerilla Tea’s Titan1um brief – a side scrolling game featuring 3D characters and dynamic object cutting.

The brief was targeting iOS devices specifically – with Unity being the chosen engine.

Aquabear Productions:

David Gunn, Stefan Harrison,  David Hughes, Max Inkster, Kyle Maxwell, myself, Natasha MacDonald, Conor McHugh, Christy McLaughlin, John Robb, Neil Robertson.

Titan1um source – Unity, C#.

I would have to say our group got along really well, really coming together during the second semester to finalize our prototype.

After our code team broke down and implemented a basic form of mesh slicing, I was tasked with translating the screens swipe gestures into the scene. The mesh slicing code required the cut to completely intersect with the object, and the diagram below shows how I approached the problem.


As it turned out I ended up rigging our games main character T1m.

The character and mesh were created by Kyle Maxwell, then passed to be for rigging and skinning. Afterwards I passed the rig to Neil Robertson for animation.


This allowed me to make up for my failed skinning attempt on Volibear. T1m was a robot, but the mesh did not allow use of rigid binding for the skinning. Therefore smooth binding and re-weighting was required – particularly around the joints.


Given T1m’s bulky chest armor, we were concerned about his range of motion. Despite this Neil produced a rather amazing set of animations.


Hubble Bubble – Rockspin


Hubble Bubble was the second GDS project during the 2nd year of CGT. It however differed as this was not a student made brief – but had been supplied by Rory Kelly at Rockspin.

The brief was for a 3D collection / exploration game, built in Unity 3D and targeting mobile platforms.

The team assembled to tackle this brief was a combination of three of the last semesters teams:

Andrew Allan, George Beard, Michael Cameron, Jamie Cross, Carrie France, Caitlin Goodale, myself, Gordon McKendrick and  Erin Mercer.

For this prototype George Beard was our direct contact with the client as well producing and being our 3D artist.

This was definitely a different experience than a regular GDS project – but to be clear both George and Rory were fully supportive of university work taking priority. A major advantage for the programmer was that three of us actually shared the same flat – making group programming sessions very convenient.

Mirrors & Shadows – OpenGL

After the win32 api game, the rest of the Graphics Programming module focused on OpenGL, with a focus on procedural shape generation.

This submission actually covered two modules – Graphics Programming for the scene and Operating Environments for the threading of the texture loading and sphere generation.

Source code – OpenGL, C++.

With all of the modules tutorials completed, with an not inconsiderable amount of time spent getting a sphere and skybox right – a space scene seemed inevitable.

Anticipating that at least a few others would be making similar submissions, I started looking into some of the suggested topics not covered by the module.

I chose to further investigate and use the stencil buffer within my scene – and after a few failed attempts found that the stencil buffer had not been initialized…

Stencil buffer

Working finally, but with a few issues…

Not reflecting the skybox does a pretty good job of highlighting the transparent plane, and secondly how to fit this into a space scene.

Finding a suitable and decent model to import into the scene via Milkshape was proving rather difficult – mostly as the models I liked usually had too many vertices and often multiple texture files.

Eventually I came across a decent model of a Shadow Vessel from Babylon 5, complete with its scale like texture – and this got me thinking…

How to make a jump point texture!


Finding a usable jump point texture proved impossible – often low resolution or with a ship in shot. Fortunately I was able to create a pretty decent image in Photoshop.

I choose to position the jump point in the center of the scene reflecting along the z axis. This diagram details the layout of the scene, the skyboxes actually overlap entirely.


Scaling aside (its meant to look good, not be accurate) I was rather pleased with the final submission. One of the features I was most proud of is that the skin of the Shadow Vessel is animated, well actually there’s two models each animating in a different direction. This is hard to see but this does enhance the rather scary looking model.

Breidablik – Playstation 2

Source code – C++.

The source does not include the provided PS2 Framework – except primitive.h .cpp as they have been heavily modified.

The final submission for Console Development, the main challenge over the first was the requirement for an implied 3D effect.

Now this could be achieved in a number of ways, I chose to tackle isometric and create a Bauldur’s Gate style game.

As I would later admit in the concluding remarks for this coursework – it was completely out of scope…

Sadly the Playstation 2 DevKits have now been replaced with PS Vita’s – so it can no longer be shown. It featured a single screen of isometric map (I had planned for four…), with the player controlling a knight/paladin – having to defeat three skeletons.


Each had a full set of animations: idle, walking, attacking, action and death.


After completing the 1st semester module on Pathfinding for Games – I chose to implement  A* pathfinding for this submission.

To aid in debugging I created a visual representation of the pathfinding grid:

green for open, red for blocked, white for the player and black for the skeletons.

This image shows what cells have been checked by the A* algorithm when a move command has been issued to the end of the pier. Purple indicates the cell has been considered, and blue cells represent the shortest path calculated.

The main benefit of the A* algorithm is due to the built in distance calculation – directing the wave expansion more efficiently towards the target.



Maya Animation and Scene


The first semester of Media Production for Games was an introduction to Maya. The submission consisted of two parts:

– an animation using the supplied Jimmy rig

– a scene created within Maya

I chose to combine the two submissions together,  in a attempt to give my animation a little context.

Though my first time using Maya, I had did have previous experience with other 3D modelling packages such as FormZ. The scene created was a small ‘T’ section of octagonal corridor, featuring an airlock.


This was however my first attempt at animation, giving me a good appreciation for the skill involved in making a fluid walk animation.

Both the mesh and rig using for this coursework were supplied by Lynne Parker.