Sign in to follow this  

Uh, um, another "do REAL games use..." one

This topic is 4669 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, Assume a simple problem: pathfinding in a 3D level. Now, the first really _working_ solution I can think of would be: a) The level editor creates "pathfinding vertices" along the level. Then the path can be found within these vertices, and the only "hard" part for the bot is to figure its way from a single vertex to another (which is easy if the vertices are spread nicely). Now the question is, do REAL games use this kind "abstraction" methods. They seem rather time consuming, because it really assumes explicit work by the level designer. Then, a second, largely related question: b) Do racing games have preprogrammed track lines which the AI bots try to follow, while avoiding obstacles such as other cars? Sorry for still being in my "insecure" state of AI coding, and thanks for all the help. -- Mikko

Share this post


Link to post
Share on other sites
a)yes (The path data can be generated automatically btw. You can floodfill a map with navigation data, use random walks alá Renderware or use navigation meshes. Many games stick with hand crafted data though. The Unreal Tournament series for example)

b)yes. All of them, to my knowledge, utilize (in different ways) some form of preprocessed driving line data.

Share this post


Link to post
Share on other sites
as far as I know, every racing game uses more or less the ideal driving line, and gives some "range" around it. At least I never played a racing game that didn´t make that impression to me and most of them don´t even react when you bump into them... many racing-AIs just stay on their track, so avoiding obstacles could even be considered an "innovation" ;)
For 3D-shooters and the like it´s nearly the same, though I could think of another solution:
You could chop the level into concave primitives (quads for example) and save possible connecions between them, so the bot could choose for himself where to go next. But for this to work you have to give some goals for the bot, so that it knows, what room he wants to reach.
Just for self-defense: never done some real AI programming, but wrote a little java tool that found it´s way from point A to point B on a 2D map with obstacles. with this system and I think this could also be applied to 3D maps.

Share this post


Link to post
Share on other sites
Somewhere I read that for example in Collin McRae they used pre-defined paths and pre-learned neural network which was taking care of steering/braking/accelerating.
And also when trying to avoid cars this AI swiched to normal "rules" for avoiding obstacles

Share this post


Link to post
Share on other sites
a) It's called "waypoint navigation". Majority of games (esp.FPS) use this technique - it's fast and simple, straightforward to implement. Some engines (and AI SDKs) can generate waypoint maps automaticaly, while some other require a designer input (Unreal, HL). Another good point of this system : one can store much more info in a waypoint, not just coordinates (eg tactical information, hints about environment - light, sound exposure etc.) which can help making a "clever" pathfinder. Bad sides : No immediate knowledge about the surrounding (static) environment, like walls, tight corridors etc. It is, basically, just an ordinary graph.
Another method widely utilised is Navigation Mesh(es). Think of them as a carpet your NPCs walk on. Usualy created from physics-mesh, or hand-crafted. Very good for precise navigation and don't suffer from environmental "un-awareness". Providing carefull coding, your NPC is guarrantied never to get stuck against the wall or any other static obstacle.

Btw, never underestimate the importance of designer's input in setting-up a navigation representation. Automatic generation is fine, but the more information you need from it, the more important is the carefull and clever layout which can only come from a man, not an algorithm!

b) Racing games (or any other car-driving game) use different methods to navigate the track. Bear in mind that there are, usually, two distinctive "car-AI"s - traffic AI and racing AI.
The simplest track-navigation method consists of laying down the splines along the road and have the car follow it. More complicated traffic-AI can use a method similar to NavMeshes - having a road (which can contain more than one lane with traffic going in both directions) built as a geometry and using vertices as a steering-helpers (as implemented in Midtown Madness - you can find the article about it on Gamasutra).
Along with track-representation, Race-AI usually uses a spline to represent the most optimal path.

Share this post


Link to post
Share on other sites

This topic is 4669 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this