Wednesday, 27 February 2008

Lecture

Oh well the lecture was kinda useful. Was about the writing the Dissertation and he pretty much re-did the lecture that we missed because he told us it wasn't on but it actualy was a few weeks ago. So getting there.
Have to use a (standard?) template from a website and in the introduction we have to write about what we are going to cover in each section "In Section 1, the theory behind the dissertation will be discused with the following topics being covered: pathfinding..." etc

Switch To XNA

Saturday 23rd February - Continued programming again. Looked into loading pictures in C# to display the unit and be able to animate them. Realised that it would be quite complicated to achieve what I wanted to do and would have to play about with lots of graphics coding which is not the point of the project. Thus I will be using the XNA framework. I did say inside my proposal that it was a possibility that I would use the XNA framework as I didn't really know how to use it at the time and did not know if the learning process would be a larger overhead than the overhead of programming the graphics in plain old C#. As I have been learning XNA anyway and its graphics are much eaiser to manage and use, it was a logical choice to make the switch at this stage. So have been watching some more of the XNA programming videos from www.3Dbuzz.com (11 1/2 hours on the 23rd, 56 hours to go of currently released stuff) Currently watching video 93 as i type. Also looked up the Creators Club (http://creators.xna.com/)

Tuesday 26th February - Progress meeting with Euan. Talked about using XNA, he seemed happy with the change. Added some interesting things... Having multiple arrays (or array of structs makes more sence) for the pathfinding/fuzzy logic. 1 array for the terrain and the difficulty of transversing it, a second for line of sight of the enemy (for use depending on how brave the units are feeling i.e. if 100% health, full squad, full ammo: being in the line of sight of the enemy is not a big reason to avoid a tile), a third for the amount of frendlies killed/hurt in that tile (more likely to avoid tiles that have frendly dead bodies), perhaps a forth for where cover is around the map (more injured the units the more likely they will head for cover) etc.
He said something else I was going to include but I completly forgot after leaving the room :( hopefuly it will come back to me.

Wednesday 27th February - Just updating the blog before going to the lecture on... No idea, I think he probably just give the "Progress Reporting" lecture again... or talk about time management... joy! We will soon see.

looking at watching more videos after the lecture until 12 (when i have a meeting with some fokes about doing Dare To Be Digital in the summer) then will spend all Thursday watching them too, hopefuly get a fair chunk of them watched by the weekend and can get started on the programming... oh no wait! I have to do a progress report... why?!? we have progress meetings every week *sigh* also have a maths exam on Monday the 3rd *sigh* lol oh well needs to get done. So probably no progress this week, hopefuly have some actual code done for the next time I meet Euan, unless Bob springs upon us some other pointless activity to "manage our time/project" or whatever.

Wednesday, 20 February 2008

Project Completion Lecture

So, on my way to the lecture... bump into 1/2 the class on the way back from the lecture room. Apparently the lectuer is ill. An email to everyone would have been nice, then most people wouldn't have wasted there time coming into uni... oh well, would have been a pointless lecture on how to manage our time again, as thats all he ever talks about, yet is late and never manages to get through all his slides, probably not the best person to talk about orginization and time management.

Least it gave me the time to start this blogg-y thing-y which is kinda useful :) wooo

Progress Report

Ok, so this should have been started at the beginning of term, before I had started anything so it was all documented... oh well, better late than never?

First of, what the hell am I doing? Well... my dissertation title goes something like:

"Can a Realistic Squad Based AI be Simulated using Advanced AI Techniques in Real Time?"

Sexy eh?
Now what does that mean? If you've ever played the game Cannon Fodder, then you'll understand my ultimate aim, to make a sexy realistic version of that. Although, to be honest, I’ve not really played it much, just love the idea.
My idea is to have a very polished looking game at the end, one that I will be happy to show people and one that will get me at least a B (as getting a 2:1 looks most likely now... unless I get an A for maths...) So with that in mind, I want.

  • A squad of units that the player can control and order about a battlefield
  • Each Unit is its own entity, with its own stats, health etc. and can operate completely on its own (or an Agent in AI speak)
  • Each unit will have full A* pathfinding allowing transversing of the battlefield.
    • Line of sight might be used first to speed up the pathfinding in a low obstacle environment.
  • The squad as a whole will have a basic flocking algorithm:
    • Cohesion for keeping the squad together and moving as one
    • Avoidance to stop the units bumping into each other, or occupying the same position
  • With Fuzzy Cognitive Maps controlling all the AI

First thing I did was head to the library and pick up a load of books. "Fuzzy Thinking" was the first of these that I started reading and was a fairly useful book. It taught me the basics of Fuzzy Logic but appeared to repeat the first several pages over and over for the first 100 pages, so instead of reading all that I switched onto another book, "Understanding Neural Networks and Fuzzy Logic: Basic Concepts and Applications". I have never seen so much maths in a programming book so it was quickly put to one side and onto the next book, which was by far the most useful book I've read on AI, "AI for Game Developers"

Fuzzy Cognitive Maps is where the "Realistic" part comes in. FCMs are a branch of Fuzzy Logic, which itself is a branch of Finite State Machines. FCMs take in lots of distinct inputs and by using various weightings on these inputs together with the current state of the FCM, "fuzzifys" the numbers and generates a fuzzy output. This fuzzy output is "Defuzzified" into a distinct output for use within the Finite State Machine part of the FCM system.
All this good stuff was detailed within that awesome book :D

"AI for Game Developers" also had a great chapter on A* pathfinding as well as one on flocking, so is pretty complete for what I want to do.

On Saturday the 16th February I started coding the project, probably about 2 months behind the schedule I had to make up for the Dissertation Proposal, but creating the Gantt chart was a pointless exercise at the time as there was not enough information and an accurate one for me would have looked very bad... Perhaps that’s due to my interesting working style and maybe that’s what should change, but it seams to be working so far :P
So far, after only that 1/2 day of programming, I have a basic framework set up (in C# woo feel the <3) with a Unit, Squad and Terrain class, with the terrain class loading in my amazing programmer art and being able to scroll about the screen. The next thing to do is get a Unit on the screen and get A* pathfinding working based around this terrain.

Tuesday 19th February
Progress Meeting with bob (Súhyl):
Fairly useless as always, things he wants me to do in the next two weeks:
Implement A*
Progress Report
GUI

First Blog

So, I used to blog when I used MySpace but since that’s old and is annoying as anything to use, Bebo became my best-ist friend, although not really suited to blogging, thus the blogging stopped. I decided to start the blogging back up but with a more sinister motive, to document my progress in my dissertation as well as my working life. This will, hopefully, make it easier for me to remember what I did and when I did it so when it comes to writing my dissertation I will have a detailed account of what I have been up to. Also this blog will hopefully encourage me to actually do more work as I will feel guilty about not adding an entry to here! heehee
So here goes...