Sign in to follow this  
BlackIgloo

What AI Techniques should i use in my RTS game

Recommended Posts

Hey all, ive been working on my RTS game and im now at a state where i can impliment the AI within the game. Ive managed to group the different game aspects and was wondering what AI you would use to impliment them Economic - farming - trading - exploring for energy sources NPC military activity - quests - hunting - enrollment in armed forces NPC military Leadership - strategic and tactical decision making Social activity - negotiation with other agents Cheers :D

Share this post


Link to post
Share on other sites
I think you'll have to tell us somewhat more about how your game works.. There's a fairly big difference between Settlers and Red alert for example.

Can you control every unit? How does building work (do you have some sort of builder, or do you use the classic CnC type building, or again, some classic Settlerstype building)?

Share this post


Link to post
Share on other sites
Hey :D

sorry i left that stuff out lol.

Its CnC style, theres 1 resource you have to mine and you can havest/farm crop with farm "patches" you create yourself. Buildings are the same as CnC aswell :D

cheers for any input

Share this post


Link to post
Share on other sites
I'm not very good at AI in general, and have never coded an rts, but here are some things I can think of:

Try to have different strategies for your AI opponents. This makes everything alot better to begin with.

As I see it, there are three main strategies for an RTS:
1. Defend and build economy/upgrades first, then offend
2. Offense is the best defense (keep attacking so that that the enemy can never really get strong)
3. Rush (often VERY effective, but imho not very fun to play against)


As for military activity. Well, depends somewhat on which of the above strategies you use, but a tip is to have the AI analyze the map and search for points that are good to defend. For example, if your base is in an area completely surrounded by mountains with only 1-3 openings, then it would be very good to defend those openings.


Something that almost always beats me is attacks from multiple directions..


Another thing, make sure your AI makes use of units abilities. In Cossacks, there's a unit called grenadier which can throw grenades at buildings/walls. It's insanely effective. The AI opponents always builds squads of grenadiers, but they never use their grenades. Instead they use cannons, which is nowhere near as effective. Also, the AI in Cossacks doesn't build walls.

What I'm trying to say is, if the player can use it, let the ai use it.

Just some thoughts.

Share this post


Link to post
Share on other sites
Navigation and real time combat would be the first IMO. From the list though it sounds like you can make this a non real time game if you prefer.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this