Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

What I've seen in most Game Engines and game engine design is that the Physics Engine is the be all end all system.

Basically, AI for example may want to travel to some position, but it simply sends that request (velocity, direction) to the Physics Engine. If the AI really gets to that position is up to the will of the Physics Engine.

Is there some Design or Physics Engine which will let you plan out how Physics will react? Before it will actually occur?

Take for example that you can do Motion Planning by the AI to nearly eliminate foot sliding.

alt text alt text
images from aigamedev.com - Motion Planning for Fun and Profit!

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Hmm, that's not my experience - the physics system may well implement things at the lowest level but it's equally likely that player motion is done without much recourse to the physics system at all. Either way, the job of the AI system is usually to generate a path such that the act of locomotion is simplified, eg. along a sequence of straight unblocked paths. This means the physics of the player's motion becomes mostly irrelevant for the purposes of making the path. However, if the low level physics or collision handling detects a new obstacle during execution of that plan, it can report that back to the AI system and re-plan the route. (Preferably after trying intermediate recovery strategies, eg. steering around the obstacle.)

To actually plan for the exact detail of what the physics will do would require immense CPU time as you'd really need to simulate every nearby object in the system for many timesteps to predict what would happen. It may actually be practical to do this to extrapolate your current position to anticipate any problems, but it's not going to be practical to do this for every node of the planning tree.

If on the other hand by 'physics' you are really just meaning the acceleration and velocity of the player, then that is trivially calculable in the original pathfinding plan - but then that doesn't take into account the other actors in the world, who are ultimately the only ones likely to impede an existing plan.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.