Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

NancyJames

Turn Based Game AI RTS/RPG

This topic is 5293 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

As part of a uni project we are making a game and I''m responsible for the AI, I was wondering if anyone could give me a little help or point me in the direction of an articale that might help what I want to do. The game world is a large grid of squares, the aim of the game is to capture your opponents home square before they capture yours. Additionally each map contains certain resources that give your team access to weapons/items/skills. Each resource has a base importance that helps the AI determine a priority list of resources to collect. Currently the computer uses A* path finding to plot a course to each resource in order of importance then heads for the enemy home. What I would prefer to happen is that the computer plots a course that will get him to the enemy home in the shortest number of turns possible but at the same time collects as many high priority resources as possible. Additionally (but of lesser importance to the project) the computer has a team of x members and can split into smaller teams to defend certain resources. If the player and computer have teams on the same grid square then they must fight to gain control of the resource.

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
With the A* you can give the squares around high priority resorces a lower move cost. the farther from a resorce you get the higher the move cost. That should make the path go to the best resourcese while still heading towards the final goal.

Share this post


Link to post
Share on other sites
Thanks for the reply

What I''ve basically done is checked the direction from the target to the goal and discarded all the squares in the wrong direction then ranked the remaining resources with relation to the distance from the starting square, it then moves towards the resources with highest priority and lowerst distance.
Though your way sounds like it could work just as well or even better.

Share this post


Link to post
Share on other sites
It''s kind of an influence map radiating out from the resources and the enemy that you are seeding your path costs with. The result is that your paths will be following the "most efficient" route to the enemy in the same way they would navigate around forests, hills, etc.

Dave Mark - President and Lead Designer
Intrinsic Algorithm -
"Reducing the world to mathematical equations!"

Share this post


Link to post
Share on other sites
I had thought of doing that initially but I ran a simulation using a tool to demonstrate different path finding techniques and it seemed very slow, also the way the designer wants the map to play is that 1/4 of the map has resources on it meaning most squares are touching a resource square or are very close.
The method I''m using (if a little crude) seems to plot a very similar path but runs much faster.

Share this post


Link to post
Share on other sites
Read THIS thread... especially the posts about the modified cost-reward function. This will give you a way of expressing the possible rewards within the path cost function so that you can optimise over a function of both variables (as opposed to the tougher problem of optimising over the joint space of variables). If you use this method in your assignment though, you should give credit to its source by including the URL to the thread in your report bibliography.

Cheers,

Timkin

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!