Wednesday, 26 March 2008

Pre-Compiled Node Graph Pathfinding

After much "jiggery-pokery" I've managed to get a code based pre-compiled node graph working for my AI's pathfinding. Much better than my previously scripted solution. It's hugely faster to implement, mostly automated (so less errors/typos/general-cockups available on my part) and the paths are pre-compiled so the AI don't have to work out their routes on the fly.

It took a bit of integrating into my AI system, but we got their in the end. Thanks go to Gabriel Notman of Bolton Uni for making the original resource on design doc available.

This test video uses the stock TGE CTF map and assets (hence the slightly bizarre fantasy buildings), with my first gen AI model and animations. Blue lines are the Node Graph, green lines are the set path.

Friday, 21 March 2008

Pathfinding Maze

More pathfinding testing with a script written Dijkstra. All node adjacencies are inputed manually which is a bit time consuming and open to typos - and typos cause crashes.

Thursday, 13 March 2008

Red Team vs Blue Team basics

My first battle test, built to test AI team based code and their targeting and accuracy system. No real pathfinding, just basic avoidance of the lone building.

Wednesday, 12 March 2008

Video of first attempt at pathfinding in action

Obviously ignore the basic models, textures, animations, etc - it's the AI not walking into walls which is the important thing here.

Tuesday, 11 March 2008

Do AI Dream of Electric Llamas?

Subtitle: The Joys of not walking into walls.

I've had a basic -but working- pathfinding routine going which my AI have been slavishly wandering around, happily not walking into things. It's a Dijkstra based script with manually predefined node connections (that C grade in Maths I scraped at school has finally come in handy) where the AI builds a path from it's position to it's goal. It all works fair enough but looks terribly wooden as the AI pull many 90 degree turns in the open, so I've added functionality.

AI Pathfinding Routine:
1: Check that we have a goal - if not chill. Goals are set to named AI at spawn and altered via triggers.
2: Get a vector distance to the goal - if it's under 2 metres we're there. Clear the goal. Thread 1.
3: Check LOS to goal - if it's clear run to it directly (No need to waste precious processor power on it.) Thread2, if not we're gonna have to run Dijkstra to find a path around the obstacles.
4: Build the node list and get moving along it.
5: At every node make an LOS check to the goal
If it's clear make the current node the last in the path and just run to the goal. Thread 2.
If LOS is still blocked by something, move to the next node in the list. Repeat until path complete and Thread 2.

This all makes things look much better, cutting down on the slavish adherence to the path when the goal is clear, and gives a more naturalistic route. I still want to enlarge the AI goal radius (currently 10cm/4 inches which is just daft - when I made my SP campaigns for Call of Duty I never went under 32 inches if I needed them right in a certain places - like a window - and quite often felt 64 was fine) and I need to come up with a team-member-avoidance/onstuck function to stop the AI bumping into each other (a larger goal radius should also help to reduce contacts).

And sorting out some demo-reel footage might be good.

Sunday, 9 March 2008

The Eagle has Landed - only without Burton and Eastwood

This is the development blog for Yorkshire Rifles, Indie Games Creator.

Ever become so self-deluded that you figure you could make a computer game better than the big gaming companies with their huge development teams and millions of dollars? Yep, I get that all time.

I'm an (ex)modder for the Call of Duty series, willing to drink from the cup of nervous breakdowns and late nights which is developing your own computer games.

An overview of my Call of Duty Series single player campaigns/ levels on FileFront (21,000+ downloads and counting)

My old websites:
EastYorksRifles Linkage
Beyond Rostov Campaign Linkage