• Advertisement
Sign in to follow this  

ai-vehicle movement-pattern

This topic is 3824 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 Im doing a topdown action rpg. Sort of like diablo but with mad max setting and everyone driving around in cars. As enemies spawn in the vicinity of the players (these are the dummy-raiders) they are assigned a "tactic" to become more different like: -circle the player -drive within shooting range of the player but stop once there -try to ram the player -try to stay away from the player (the cowards) And all along trying to avoid running into obstacles. I have a system set up with controls that work with all objects and physics so i need to check for a unit whern to apply which control depending on -target pos -current tactic -closeby obstacles Controls are simply used like this theUnit->control(1); //accelerate theUnit->control(3); // turn left Is there any good way to deal with all this? What is the common approch as this must be a pretty common feature in games? Thanks for your help Erik [Edited by - suliman on November 4, 2007 1:07:20 AM]

Share this post


Link to post
Share on other sites
Advertisement
Noone? I'm sure something like this has been done before. Im not asking for complete code, more of a intelligent approach to the problem.

E

Share this post


Link to post
Share on other sites
The only things that I can think up for now are generating a nodegraph for each level, for higher-level pathfinding (how to get from the village to the top of the hill, etc.), while using algorithms for obstacle evasion similar to flocking behaviour rules. Enemies using ranged attacks could keep the distance to their target in mind, while ramming enemies would simply drive towards their target, checking for obstacles in their intended path first.

And if obstacles are giving you a hard time, you can consider removing some or most of them. This depends on what's technically doable and on what's fun.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement