Have been working on getting the AI integrated with the
Bullet Physics Engine. Finally I have managed to get it working as I want it to so I have a swarm of nasties moving around the stage without disappearing of the edges. Next step is to add buildings and make it look more like a proper stage rather than an open field :). So the swarming is all controlled through the AI, and physics engine is doing collision detection for the various obstacles. The step to add buildings will be very straight forward as they are created in exactly the same way as the stage boundaries. Essentially, the AI uses bullet to query for collisions and adds any collisions for a character to its collision queue. On the next tick, the character takes into account the queued collisions. This should allow the various parts to be separately threaded to make best use of available CPU resource - well that's the plan anyway, we'll see how it goes.
The bullet physics engine is reasonably easy to use with most of the concepts illustrated through demonstration projects. The rest of the documentation is reasonably brief but it does point you to the appropriate demo project. Once the concepts are understood, integration is pretty straightforward. I should add that I have no background in physics engines or previous experience so I have learnt this from the ground up.
Will add some shots, maybe video in the next few days.
No comments:
Post a Comment