Category Archives: 2nd Year CGT

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.



Dark Souls: Windowed Edition – winapi

An early submission for Graphics Programming – we were tasked with creating a 2D sprite game before moving on towards OpenGL.

I had been playing alot of Dark Souls at the time, so decided to go about creating a simple representation of a boss fight.


Though simple I attempted to recreate Dark Souls stamina system as accurately as possible, with stamina being consumed for attacking and blocking incoming damage – and regenerating only while not blocking.


Overall mechanically this was a very simple game – I believe I spent more time in Photoshop cutting out screen shots of a knight and creating the sprite sheets…

Disc Wars! – Playstation 2

Disc Wars! was a Tron themed 2D sprite game created for the first submission for Console Development.

At the time we in the process of learning and developing a framework for the Playstation 2 using the Linux development kits.

Most of the work for this submission was based around playing around with the frameworks sprite class. At this point we had not covered loading in textures , so I explored playing with the drawing information being passed to create gradients and patterns.


The player controls the grey triangle – with forwards/backwards and rotational movement only. The black line within the rings indicates the current direction of incoming discs – which must be dodged by the player. During  the game the center rings will pulse and rotate before settling on a new direction – changing the direction of all the discs in doing so.