FPS Game Help

Blitz3D Forums/Blitz3D Programming/FPS Game Help

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Additionally:

If every soldier has multiple ways (or routes), you can use them for pathfinding as well. Simply parse all waypoints and find the one that is closest to the target location, then use that route. When there are multiple routes to the target then you may compare the number of waypoints to determine the best way.

I would use a star-structured group of routes. So every route leads to the group center point and if the soldier needs to go to a certain waypoint on a certain route, he simply has to go to the center first. I once tried a system with crossing routes that would allow to jump to other routes when they cross oneantother, but what sould I say, in the end it didn't work :).

A next step would be to use Linepicking to determine if an enemy can see you. If they are in attack mode, they will shoot etc. when they can see you. As soon as they cannot see you anymore (because you run away etc.) they continue running after you. When they see you again, they continue shooting. This looks already pretty intelligent, although it's very simple to code.
In the same time when they are in escape mode, they will run away when they can see you (=you can see them), and then they will pause as soon as you cannot see them anymore (or a little later), thinking they are save now.

I did some tests with A-Star pathfinding algorithms in 3D and it turned out it's way to slow to be used in a game. Some people suggest to use a retarded 3D a-Star method that is in fact 2D (and therefor faster) with multiple levels. but honestly: first there's a big lot of work to make the soldiers act naturally an their computed ways, and the level oriented 2D pathfinding is also an omnipresent limitation during level design, that will complicate things massively.

Some people talk a lot about the theory of pathfinding and AI, but when you try to watch their work you'll see they did nothing but theories. So make sure to check peoples work before you believe what they say.