I’m implementing a 3D physics-based game in which users can create custom characters with all differenct sizes. Physics properties may also be different for every character as well (acceleration may be different depending on how they built their character, for instance. Additionally, acceleration in the local forward direction might be different than backwards).
Properties of an agent:
- Dynamic size
- Dynamic speed/turn rate/acceleration
- Can move in all directions (not limited to XZ movement plane)
Users will control units to attack ‘bases’ that have similar properties to that described above. In theory, units can move throughout and around the bases by flying around. However, I need the units defending the base to move around this dynamic environment without running into the base (and ideally without running into eachother).
Properties of a base:
- Made up of many objects connected together which colliders.
- Objects that make up a base are fully destructible (and should open up pathfinding when destroyed).
- There may be many ‘holes’ of different sizes throughout bases that units could fly though.
- There may be open spaces. Estimating about 75% of a base would be open space, although this isn’t guaranteed.
I’ve taken a few stabs at implementing pathfinding in the past but failed. Dynamic agent sizes, dynamic agent speed/acceleration, dynamic environment and the fact of it being 3D are all issues I had run into, causing me to sideline the pathfinding features. After looking through the graph types, it isn’t clear to me what I should use for AI controlled movement of units through the bases.
Questions:
- Do I need 1 graph per agent size? (This could be an issue due to sheer amount of agents.)
- What type of graph do you recommend using for this situation?
- Any other advice and/or gotchas that you can think of?
Any help would be greatly appreciated!