Final Year – Team Project

April 29, 2008

Armed ‘n’ Cuddly was a game project that I was involved in for 8-9 months of the final year. The game idea is a mix between the collection elements of Pokemon and the platform action of games like Mario 64 and Rayman.

The UML class diagram above shows the initial architecture myself and the other programmers put together. Designing the UML diagrams early on allowed us to build a very powerful and robust system. This system uses advanced techniques like dynamic binding, class registration, events, generics and threading demonstrated in the code samples below.

Code Listing 1. Shows the Class Registration system, helping to keep the project loosely coupled.

   1: // Load all content
   2: protected override void LoadContent()
   3: {
   4:     splash.LoadContent();
   6:     loadScreen.LoadContent();
   8:     // Starts a new thread to perform a task
   9:     ThreadStart ThreadStarter = delegate
  10:     {
  11:         if (editorMode)
  12:         {
  13:             // Place the code to be run by this thread here
  14:             Engine.GUI.GUIManager.AddToBuildScripts("Panel", Engine.GUI.GUIPanel.CreatePanelWithScript);
  15:             Engine.GUI.GUIManager.AddToBuildScripts("Button", Engine.GUI.GUIButton.CreateButtonWithScript);
  16:             Engine.GUI.GUIManager.AddToBuildScripts("Textbox", Engine.GUI.GUITextbox.CreateTextboxWithScript);
  17:             Engine.GUI.GUIManager.AddToBuildScripts("Listbox", Engine.GUI.GUIListbox.CreateListboxWithScript);
  18:             Engine.GUI.GUIManager.AddToBuildScripts("Object_Dialog", ToolDialogs.Object_Dialog.CreateDialogWithScript);
  19:             Engine.GUI.GUIManager.AddToBuildScripts("Texture_Effect_Dialog", ToolDialogs.Texture_Effect_Dialog.CreateDialogWithScript);
  20:             Engine.GUI.GUIManager.AddToBuildScripts("BumpMap_Effect_Dialog", ToolDialogs.BumpMap_Effect_Dialog.CreateDialogWithScript);
  21:             Engine.GUI.GUIManager.AddToBuildScripts("Particle_Dialog", ToolDialogs.Particle_Dialog.CreateDialogWithScript);
  22:             Engine.GUI.GUIManager.BuildFromScripts("NonContentPipeline_Assets/Scripts/toolGUI.xml", ref loadedObjects);
  23:             renderBoxes = true;
  24:         }
  26:         Engine._3D.SceneManager.AddToBuildScripts("Project_Strafe.SceneObjects.StatObject", StatObject.BuildFromScript);
  27:         Engine._3D.SceneManager.AddToBuildScripts("Project_Strafe.SceneObjects.Player", SceneObjects.Player.BuildFromScript);
  28:         Engine._3D.SceneManager.AddToBuildScripts("Project_Strafe.SceneObjects.Enemy", SceneObjects.Enemy.BuildFromScript);
  29:         Engine._3D.SceneManager.AddToBuildScripts("Engine._3D.Particles.SmokePlumeParticleSystem", SmokePlumeParticleSystem.BuildFromScript);
  31:         Engine._3D.SceneManager.BuildFromScripts(fileName, ref loadedObjects);
  32:     };
  34:     contentLoader = new Thread(ThreadStarter);
  35: }


Code Listing 2. Shows the dynamic binding used by SetMaterialValues to allow this rendering method to accept any Effect type regardless of the implementing class.

   1: /// <summary>
   2: /// Draws the model
   3: /// </summary>
   4: /// <param name="transforms">The object space transforms of the model to be rendered</param>
   5: virtual protected void RenderModel(Matrix[] transforms)
   6: {
   7:     foreach (ModelMesh mesh in model_object.Meshes)
   8:     {
   9:         // Note: matWorldTransform multiplies the object space co-ordinates defined in the
  10:         // model file with the world-view-projection co-ords.
  11:         // Might need changing depending on how we create the models
  12:         // and there associated effects.                
  13:         matWorldTransform = transforms[mesh.ParentBone.Index] * worldViewProj;
  14:         foreach (ModelMeshPart part in mesh.MeshParts)
  15:         {
  16:             // As this is a virtual method it will call the parent
  17:             // SetMaterialValues method if it exists else it will call
  18:             // SetMaterialValues defined here!
  19:             SetMaterialValues();
  20:             part.Effect = material.GetEffect();
  21:         }
  22:         mesh.Draw(SaveStateMode.SaveState);
  23:     }
  24: }


All this came together to give us a scalable game environment that the design team and programmers could build around.


Source Code


Final Year – Dissertation

April 29, 2008

I based my dissertation on the fluid dynamic work of Mark Harris, he suggests algorithms that can be implemented on current ps2.0/3.0 hardware to create fairly realistic 2D and 3D fluid implementations. I had varied success when trying to implement his systems into HLSL and DirectX. From the following video you can see that although the dye fluid on the left does move with respect to the red tinted velocity texture on the right, The velocity texture should be blended as it is produced through a different pass than the dye fluid on the left. The pass that does not seem to work correctly requires the velocity texture to be updated and passed back to itself iteratively; in the following video this is attempted 20 times per frame using separate render targets.

As you can see the velocity (red tinted one) texture does not appear blended from the Jacobi iteration.

Source Code and Release Executable

Final Year – C++ Shader Implementation

April 29, 2008

The second part of the shader assignment was to integrate our render monkey work in to a game/demo like environment. I chose to use C++ and the DXUT framework. This system gave me a stable starting point which would take care of most of the fiddely issues usually associated in creating a DirectX project.

We have a tiger representing only ambient lighting, bump mapped teapot, Phong lit teapot, Ashikmin-Shirley teapot, Ward Anisotropic teapot, my favourite Cook-Torrence teapot and a broken Ocean Shader. The Ocean shader worked quite nicely in render monkey, which leads me to think it has to do with the co-ordinate spaces that I am passing in.

Source Code and Release Executable

Placement Year – Games built using the Canalside Studio's XNA Engine

April 29, 2008

Runner-Up for Microsofts Dream-Build-Play 2007 competition netting the studio some cash, an uber pc and most importantly a publishing contract for Xbox360 Live Arcade. Yo-Ho Kablammo is still under construction at the studio but here are some screen-shots to wet your appetite.



Here we have Hexothermic developed predominately by Aaron ‘Azzaman’ Stanley with additions by other team members. It’s a casual puzzle game the objective being to clear the screen of the ‘atoms’ in the least amount of clicks. Other game types were built on top of this original concept, such as a blocker mode and time trials.


I contributed to the majority of projects listed here

Placement Year – G3 (G-Cubed)

April 28, 2008

During my placement year at Canalside Studios I worked on numerous projects. Here is G3 formerly known as Gravitas. I worked on the 3D Menu System, octree spatial partitioning and the player controls in the main game. Due to NDA’s and the like I can’t provide the source code but we’ll get the next best thing…Vids!!! — and a picture. Just to confuse the heck out of you they are in the reverse order 😛 I like my visitors to get a work out. Playable demos are available on request with source code contact me through the blog or at (hinchy at hinchygames dot com).

Crazy Octree Spatial Partitioning – The Pic.

Menu System Implemented for G-Cubed – The Vid.

G-Cubed Single Player – Vid.

Second Year First C++ Project

April 28, 2008

My first C++ based project involved animation, terrain following, camera/gun bob during movement, Multiple animated A.I. enemies that would run directly at the player.

Source Code and Executables

Second Year Maze Assignment

April 28, 2008

For my C++ maze assignment I decided to be adventurous and create a cubic maze. This really helped solidify the notion of Matrix mathematics for me, I would encourage anyone else doing a maze environment to have a crack at it as the hardest part is the player controls funnily enough.


 Source Code and Release Executable

Second Year Networked Game

April 28, 2008

Here is the first Net capable application I developed. Built using WinSock over TCP/IP there is a server implementation application and a client. The client connects to the server and the server issues a response demanding a name and a monetary value.

Source Code

First Year Pub Pool Assignment

April 28, 2008

My second DarkBasic program. The pool game works quite well, using correct sphere-sphere collision detection and many simultaneous collisions. The on screen debug output also shows what kind of ball was potted and pauses the game until you wish to continue, just in case you don’t believe the amazing pot you just pulled out of the bag 🙂

Source Code and Executable

First Year Ernie The Fastest Milkman in the West

April 28, 2008

The first game I designed and coded was written in the DarkBasic language. It had a level editor shown below and was effectively a half complete pac-man on steroids.

Level Editor


Main Game


Executable, assets and DBPro Source Code