Sunday, March 28, 2010

Influence Maps II - Practical Applications

Now it is time to look at how we can use influence mapping in a practical application showing how we can use a simple influence mapping based scheme to create an AI that reacts surprisingly realistic and intelligent as long as it works within certain perimeters and you aren't trying to control it too precisely. This test as I have implemented it will only be using the basic Influence map but we will discuss interesting possibilities of using the other maps too. I am also sure that you by yourself will imagine a ton of ways to use the maps and even create new maps after these two articles. But for now we look at creative ways to use what we have learned so far.

What we are going to be looking on is what we used early on as an experimental Ai for Ground Control 2 it actually become the basis for that AI though heavily modified, partially because it did defeat our project lead 1 on 1 but mostly because the single player team needed a lot more control to create interesting single player missions. But within it's limitations it performed admirably and as I mentioned did become the basis of the AI.

Monday, March 22, 2010

Influence Maps I

In artificial intelligence one of the biggest problems is how to convert a complex world into a set of data that the AI can actually understand and work on. The real world or even a game world is infinitely complex and different techniques to compress that infinite data set into a usable format is a classic problem in ai research. Thankfully for games we don't have the trouble of having to interpret the image from a camera to create a 3dimensional world to move around in.

We have the advantage of having access to extremely detailed data of everything in the game. But the amount of data we have access to makes any sort of planning by the means of calculations impossible. The world is simply to complex, so in order to be able to work with it we have to employ a series of different algorithms the one we are going to look at today is called influence mapping and it's a way to resolve the actual strength relation ship on a map and helps to base tactical decisions on this. It has nothing to do with purchase planning or high level strategical decisions It's simply a analysis tool to create an accurate and usable view of the world.

Influence maps are based around the concept that objects in the game influences the strength relationships between the players and this influence spreads from their current position outwards throughout the map. If you add in all the influence of all the objects then you would get a view of the relative strength relationships for that part of the map. You should also be able to detect the actual front lines between the different sides with it too. As we will show later on we are able to calculate a lot of different data from the influence maps but for now I think it is time to go back to explaining how this all works. But as a tease in the end of this we will discuss how to create a simple army level opponent behaviour by only using influence maps. There will be limits to it of course but it is still pretty cool.

Monday, March 15, 2010

Trivial navigation mesh generation II

This one better not turn out as long as the last one or I will have to split this out over even more articles. The reason I allowed the last article to become so long is because I wanted to leave you with enough meat to implement it so that if you wished you could have it done by this post and then start refining it.

The meaning of Updating

The reason I always refers to updating is because you can’t just set a triangle to being blocked or unblocked. Well you can do that but what if the same triangle gets blocked by more than one obstacle for example and then that obstacle is destroyed. If you just set the triangle to unblocked you will be able to drive through one of the objects. And if you don't then you can't make objects that you can destroy dynamically at all.

Monday, March 8, 2010

Trivial navigation mesh generation I

This is going to be a intermediate level lecture so before you read this lessons there are a couple of things I'm going to assume that you have prior knowledge of.
  • A*
  • The different search space representations for it and how to use it on them.
  • 2D Line vs 2D Line intersection
  • 2D Triangle vs 2D Triangle Intersection
  • 2D Triangle inside Triangle tests
  • 2D Point inside Triangle test
That's it so it's not a too hefty list basically it means you understand A* and that it is a graph based algorithm and that the natures of the graph might change, and basic linear algebra knowledge or well access to a basic 2D intersection library. I'm sorry I can't touch on everything but I have to try to keep the articles short and focused on the target. I will spread the difficulty level around quite a bit but at the moment I am mostly looking at the things we teach at the beginning of the second year at TheGameAssembly but there will appear articles targeted to beginners too and some like the last series that can be enjoyed booth by beginners and intermediate students.

Monday, March 1, 2010

Lighting models for games III

Last time we had just made the move to per pixel lighting which made a huge visual difference without changing our formulas even the tiniest bit. You might wonder why I didn't start using it and it's a valid question as the per pixel vs. per normal really doesn't matter for the lighting model. The reason I did so was to shoe the huge difference of applying high quality content can do to the look of an object. No matter how much work we do with our lighting models and formulas it doesn't matter unless we have a skilled artist by our side.