Hi !
Featured games (85)
games approved by the League of Dukes
Games in Showcase (623)
Games in Android Showcase (176)
games submitted by our members
Games in WIP (676)
games currently in development
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  RTS AI  (Read 5316 times)
0 Members and 1 Guest are viewing this topic.
Offline lhkbob

JGO Knight

Medals: 32

« Posted 2008-03-07 20:12:28 »

I have had very little experience in game AI and I've been struggling to come up with a good framework for AI for a real-time strategy game.
So far the best I could do would be to have StimulusProducers and Reactors, where a soldier in the game would be a reactor and would know how to handle various stimuli.  I envisioned UI actions and orders as being a type of StimulusProducer.  It is slightly more complicated than that, but its a little hard to describe everything in my head.

My concern with the above approach is that it would involve too many checks and calculations to generate the stimulus for each soldier, especially if I want to have 500+ units running at the same time.

My goal is to have something that can handle dynamic terrain and to modify the terrain themselves (ie break through glass or doors if they're in a rush to get through), to be able to find realistic cover, and to behave tactically as squads of troops. 

Perhaps these goals are a little far-fetched for the scale I'm interested in, but any ideas, pointers, or links would be much appreciated.


Offline SimonH
« Reply #1 - Posted 2008-03-07 21:34:31 »

Good luck!

Some good AI stuff here.

People make games and games make people
Offline CommanderKeith
« Reply #2 - Posted 2008-03-09 05:09:01 »

Make it multiplayer, then you don't even have to bother with AI!

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline lhkbob

JGO Knight

Medals: 32

« Reply #3 - Posted 2008-03-10 14:06:36 »

Multiplayer was going to be a large part, but even then I wanted the soldiers to behave semi-intelligently when pathing around.  The tricky thing is that the game is set in an urban environment, so squad behavior is important for troops left alone by the player.  I don't want the ai to do too much for the player, but enough so that the player doesn't have to micro-manage everything.

The website looked interesting but was a little hard to delve into.  When I have more time, I'll check it out in more detail.

Offline JAW

Senior Devvie

Medals: 2

« Reply #4 - Posted 2008-05-09 13:31:45 »

I think it is well possible and not the hardest thing to do. Sure its not easy, but its possible. The problem is knowledge. I've read 3 books about game AI and have some ideas how to do it. But you cannot just type it in a few words. So I will rather tell you, there are ways to do this, but you will have to learn a lot about game ai.

The idea is very good alredy. A stimulus, or trigger, or event, influences the soldiers. One important rule is, that the event makes it self known to all objects in the area of effect, and not that all objects query for events in their sourrounding. But I do not see player actions as a stimulus in that way. The player gives rather high level targets, like attack that enemy, move to that position. The AI must break it down into simple actions like fire a shot or move north 1 field.

Dynamic terrain and pathfinding, finding cover, acting as squad, everything is possible and has a lot of solutions.


I read the first three editions of AI Game Programming Wisdom, and they cover a lot of such stuff. But they arent exactly cheap. Quite some of the articles are also available freely in the web, but you have to find them.

If you have more specific problems or questions I can maybe give a better help.

Offline lhkbob

JGO Knight

Medals: 32

« Reply #5 - Posted 2008-05-12 04:02:01 »

Sorry about the delay.  In the time period between now and my original post, I have done some rethinking of the idea.  My concern with the current one is that it doesn't seem computationally efficient for large groups of soldiers, but here goes the concept:

Instead of stimulus based, it is primarily goal based.  Soldiers have some amount of goals, which could include: complete orders, run in fear, attack spotted enemy, etc.  The goal would delegate to intermediate classes that would handle fulfilling that goal for a particular type of soldier (ie tactics might change if it had different weapons, etc).  Depending on the situation, goals can have multiple soldiers assigned to completing them, in which case the goal would ideally organize them to fulfill it more efficiently.  As soldiers interact with the world, stimulus are generated and can then affect soldiers.  Incoming stimulus have the ability to be ignored, affect variables such as morale, or turn into a new goal (such as when you give an attack move order and soldiers see an enemy, that stimulus creates a kill X goal, and once complete, the move goal returns into affect).

I haven't written any code yet since my game isn't at that stage yet, so this is purely hypothetical.

Pages: [1]
  ignore  |  Print  

basil_ (42 views)
2015-09-30 17:04:40

shadowstryker (21 views)
2015-09-29 15:55:06

TheSpaceHedgehog (27 views)
2015-09-29 01:58:48

GamerC4 (50 views)
2015-09-24 21:10:38

GamerC4 (70 views)
2015-09-24 21:09:48

htuy (27 views)
2015-09-24 04:57:24

htuy (36 views)
2015-09-24 04:56:35

htuy (25 views)
2015-09-24 04:56:09

htuy (26 views)
2015-09-24 04:47:33

Roquen (64 views)
2015-09-21 12:54:28
Math: Inequality properties
by Roquen
2015-10-01 13:30:46

Math: Inequality properties
by Roquen
2015-09-30 16:06:05

HotSpot Options
by Roquen
2015-08-29 11:33:11

Rendering resources
by Roquen
2015-08-17 12:42:29

Rendering resources
by Roquen
2015-08-17 09:36:56

Rendering resources
by Roquen
2015-08-13 07:40:51

Networking Resources
by Roquen
2015-08-13 07:40:43

List of Learning Resources
by gouessej