Archive for: ‘October 2011’

Team Alpha 4.1

October 25, 2011 Posted by Keith Grant

Another week is nearly over and I feel that we are still progressing well as a team.  Having talked to the others they all seem to be proceeding well with their areas of research and I feel that I’m doing pretty well as well.  I’ve now finished a first version of a 3d graphics/maths tool-kit that gives us access to matrices, matrix stacks, frames and view frustums.  It also has a 4d vector class in it that was provided by Kieran.  It also includes a maths class that has definitions for commonly used constants like Pi,  and 2Pi  and also has methods for converting between degrees and radians.

In addition to finishing the graphics tools, I have also started outlining the algorithms for our path-finding,  I’m sure it will be no surprise to anyone with even the smallest interest in AI that we will be going with an A* algorithm, however we will be running the algorithm over a navigation mesh rather a way-point map.  This is slightly more complicated to implement, but gives a more realistic movement to AI controlled characters.

A navigation mesh breaks the play area down into a number of convex polygons, some implementations only allow triangles, some allow n-sided polygons, personally I feel that triangles will be easier to utilize A* with but n-sided polygons may be easier to create automatically (we hope to have auto-generation of the nav-mesh, although that may well be a second term project).  The search algorithm then finds the quickest route between the start point and destination point, each polygon is given a cost value that is often based on average distance between the centre and the edges, or average distance between the centre of each edge.  The actual path however will be worked out using an algorithm that will calculate line of site and so smooth the path of the unit.

I’m currently working on a couple of diagrams to clarify the exact process in my head, and will post them up here when I get a chance in the meantime however there is a simple explanation here.

Team Alpha 3.1

October 18, 2011 Posted by Keith Grant

We are coming to the end of the third week now and things are going well, we have all completed our preliminary research and now have a better idea of what we can and can’t include in the engine.

We also have a new team member this week and while it is always hard to integrate into an established group, I’m sure that he’ll get on fine and make a good contribution to the project.

Again I have spent most of the week deep in books on AI trying to gain a better understanding of path-finding and hierarchies.  Luckily I am also taking part in the on-line AI course being run from Stanford University and in the very first week they gave one of the clearest explanations of A* I have come across.

But although AI will be a big part of the game we also need to to be able to create a 3D world within which the game can take place.  As we are now using SDL for windowing and have been advised to stay clear of GLTools ( a library supplied with the OpenGL superBible that greatly simplifies the use of the new core profile), we also have to work on a number of classes to provide us with simple access to things like matrix stacks, view frustums and projection matrices.

We decided that if we are going to implement our own matrix stack, we would be as well creating our own matrix class, and if we are going to be creating our own matrix class we’de be as well to create a vector class and so we may as well create our own maths library.

This will  give us a couple of advantages, mainly that if we write it, then we know how it works and what it can and can’t do. This will also make it easier to add further functionality to it as well.   It does also however cause a couple of problems, the main one of which is making sure it actually works the way we think it does.  For me personally this caused some confusion when it came to issues like are the matrices column or row major, (This was especially important as we wanted it to be directly compatible with the GLSL equivalents and GLSL matrices are row major), and just because I think the ones I’ve created are row major does that mean they actually are.

Hopefully though we will have all this sorted out by the end of the week and we will have a full ( or at least full enough to be going on with) version of all the classes we need.

Team Alpha 2.1

October 10, 2011 Posted by Keith Grant

We are well into the second week of development, and things are going well.

I have been tasked with researching some specific AI topics involving flocking and group movement, and also with looking at some outline ideas for the underlying framework of the engine.  The first priority however is the AI research.

To this end I have looked out some old projects of my own where I first looked at implementing a simplified version of the ideas discussed by Craig Reynolds at SIGGRAPH in 1987, (copy of the paper here).

While this does simulate simple group cohesion, we will want to alter the algorithms I developed so that groups will also include goal seeking behaviours, and will move with more purpose.  We will also have to include some algorithms that allow the player to manually command selected groups of individuals into one unified group and move as one.