Java-Gaming.org Hi !
Featured games (81)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (575)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  RTS AI  (Read 4978 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.

Thanks

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.

@SimonH
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 Duke


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.

Try
http://gamasutra.com/
http://www.gamedev.net/
http://www.aiwisdom.com/

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.

-JAW
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  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Longarmx (33 views)
2014-10-17 03:59:02

Norakomi (25 views)
2014-10-16 15:22:06

Norakomi (24 views)
2014-10-16 15:20:20

lcass (26 views)
2014-10-15 16:18:58

TehJavaDev (50 views)
2014-10-14 00:39:48

TehJavaDev (50 views)
2014-10-14 00:35:47

TehJavaDev (40 views)
2014-10-14 00:32:37

BurntPizza (63 views)
2014-10-11 23:24:42

BurntPizza (36 views)
2014-10-11 23:10:45

BurntPizza (74 views)
2014-10-11 22:30:10
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!