Projects

Browsing the ‘Projects’ category


1st iPhone app – Part 2 – bulletsOctober 20th, 2009

Still not really what you might call a ‘game’ but it’s starting to take shape … I think!

I’ve spent the last few weeks busying myself for the move to Brighton in December so not really had a great deal of time to dedicate to iPhone development. What I have done though is to tidy up my source code quite a bit.

Objective-C is quite a bit different to what I’m used to, so I’ve split the code in two. Basically, all interaction with the iPhone is handled by Objective-C which passes off the update/rendering work to the C++/OpenGL game code: The current state of inputs such as accelerometer and touch is sent to the C++ gameUpdate method which updates the game state. The gameDraw routine just handles OpenGL rendering as you would expect.

Hopefully I can get some more work done as soon as possible … For the third installment, I’m planning to get some kind of enemy to shoot at -- which will involve basic collision detection. Part four will probably be taking stock and sketching out a game concept etc.

1st iPhone app – Part 1 – introductionSeptember 21st, 2009

Here is a quick video of my 1st iPhone app. In terms of functionality, there’s nothing much at the moment -- but the fundamentals are at least in place:

You may recognise my ’signature’ blue vector grid on a dark blue background … which is basically my starting point for nearly all my OpenGl based projects. The app was written using Apple’s X-Code IDE and uses OpenGl ES to render a 3D grid. I’m adjusting the ‘look-at’ position of the camera using 2 of the 3 accelerometers. The 2D elements comprise a dragable yellow square which in turn updates the x and y values rendered using the Texture2D class.

So it’s nothing much at the moment but hopefully it will develop into a fun 3D iPhone game … I’ll be keeping a blog of developments here on my website.

Poker YourselfSeptember 7th, 2009

current version 1.0
link facebook
sourcecode not available
release date September, 2009
platform Facebook
language Java JSP/JPA
description Bored at work? Why not waste your time with this implementation of a Texas Hold-Em style poker solitaire game?

What is it?

Poker Yourself is a simple Texas Hold-Em style poker solitaire game. I originally released the game in 2008 when it was called ‘crap poker’. However, now I have a new host I decided to fix it up using the latest Facebook API and give it a more acceptable name.

The card engine was actually one of my first exercises in learning Object Oriented Java programming. The gameplay was based on some source code I found on the internet while investigating card game systems.

What do I do?

The ‘Pre-flop’ lets you place £4 of bets across your 4 hands. After the ‘River’ you earn the total bet for the winning hand but lose the others.

blockShifterJanuary 3rd, 2007

current version 0.1.6
binary download(149kb)
sourcecode not available
start date January, 2007
platform Windows
language C++ (OpenGL)
description An OpenGL based application written in C++. The main idea is you have to shift the blocks around a grid to match the pattern outlined on the floor.

What is it?

My first attempt at making a game in OpenGL and C++. This took me about a month to realise, learn and program – I spent most of the Christmas break doing this while visiting my mum. The game isn’t supposed to be amazing and it only has eight levels. It was in fact an exercise in putting together a game with multiple levels etc. Funnily enough the hardest thing I found wasn’t so much getting my head around OpenGL or C++, but trying to work out a good control mechanism.

Anyway, feel free to download and have a play.

Where can I get it?

Click the link next to ‘binary’ in the project information box. I haven’t made the sourcecode available yet as it’s much too buggy in its current state. However, if I ever go back to fix the issues previously mentioned then I may well take the time to clean it up and make it available.

What do I do?

The basic gameplay involves moving blocks around the grid to fill up the pattern outlined in blue.

What are the controls?

  • Q – rotate selected piece left
  • W – rotate selected piece right
  • A and S – cycle pieces
  • Cursor Keys – move selected piece

IslandApril 12th, 2006

current version 0.0.7
binary download (561kb)
sourcecode not available
start date April, 2006
platform Windows
language C++ (OpenGL)
description An OpenGL based application written in C++. An Ogre calculates a path to locate a target within randomly generated islands.

What is it?

This demo combines various techniques including: loading/animating a 3D model (MD2 mesh), A* pathfinding algorithm, finite state machine, dynamic landscape generation.

Overview:

A* PathFinding:

After a few weeks of head scratching, I finally managed to get my head around the A* PathFinding algorithm – now I can successfully get my game entities to calculate a path to a target and avoid any ‘unwalkable’ terrain/object.

I used the following tutorial to help understand this really helpful technique: A* Pathfinding for Beginners

MD2 model animation:

You may recognise the Ogre from that old chestnut that is Quake II. Well, you’re right – it is the same guy! Basically I’m not very good at modelling – or really I’m more interested in other aspects of game programming at the moment ;-) so I used this.

Also, the MD2 model format is really easy to deal with – and is covered extensively in the following book: OpenGL Game Programming

Finite State Machine (FSM):

For the first time I’ve implemented a finite state machine (FSM). This makes it much easier to manage the different actions my game entities can be doing. In this demo the Ogre can be either Searching, Travelling, Resting or Wandering.

For more information on state machines and other AI techniques, I highly recommend reading through this site: ai-junkie

Dynamic Landscape:

Finally, the dynamic landscape generation is based on a fractal generated heightmap feeding a triangle-strip mesh. This is textured with a simple bitmap filtered with different colours depending on height. The water is again a simple bitmap with a degree of transparency. The landscape isn’t really dynamic (although it is based on the destructabe landscape I used in my tank demo) – but it is randomly generated each time the map is reset. However, I am thinking of trying to get to grips with ‘Level of Detail’ techniques to speed up the landscape rendering.

Where can I get it?

Click the link next to ‘binary’ in the project information box. No sourcecode yet until it’s much tidier. You can however follow the links I mentioned earlier to find some great examples of the various techniques.

What do I do?

Just sit and watch the Ogre follow the path to the target … Joy! You can also interact to some extent:

What are the controls?

  • SPACEBAR – regenerate map
  • M – overhead map on/off
  • I – information box on/off
  • C – mini-cam on/off
  • T – landscape texture on/off
  • 1 – Search/Travel state
  • 2 – Work state
  • 3 – Wander state – use cursors to move

What next?

  • Find a better way to calculate the rotation toward the next waypoint!
  • Make the landscape render faster – implement LOD?
  • Create more actions depending on state. Want to get him doiong more interesting things than just finding a target.
  • Introduce more objects into the scene – trees, boulders etc. Use a secondary obstacle avoidance routine to work with the pathfinding to avoid these.
  • Get some sleep ..?

TanksMarch 10th, 2006

current version 0.4.2
binary download(143kb)
sourcecode not available
start date March, 2006
platform Windows
language C++ (OpenGL)
description Tanks is an attempt at using various techniques such as basic AI algorithms and projectile physics, destructable terrain etc.

What is it?

Currently nothing much!

Where can I get it?

Click the link next to ‘binary’ in the project information box.

What do I do?

Watch as the landscape becomes demolished as the fighting machines wreck their havoc. Gape in awe as the tanks locate their nearest neighbour, turn and shoot :-/

What are the controls?

  • TAB – cycle tanks