Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Any Artifical Intelligence tutorials for Strategy RPG games?

Author
Message
Lonnehart
15
Years of Service
User Offline
Joined: 17th Apr 2009
Location:
Posted: 24th Apr 2009 09:11
I'm working on one, but I don't know how the AI works. Is it all random, or is there some intelligence dictating how units move on a map and what attacks they use?
Dream And Death
18
Years of Service
User Offline
Joined: 21st Feb 2006
Location: The circus! Juggling job, kids and DBPro
Posted: 24th Apr 2009 10:41 Edited at: 24th Apr 2009 10:42
You'd need to come up with a ruleset to describe how the AI should make decisions and what its responses will be to those decisions. You will also want to put some randomness into the decisions so that it doesn't always follow the precise same path of logic.

I suggest a LOT of paper, a pencil, a ruler and a rubber (eraser to any Americans on the board!)

Start a big ol' flow chart!

"You get what everyone gets, you get a lifetime!" - Death, The Sandman Library

First you Dream, then you ... - Neil Gaiman, 2001
Lonnehart
15
Years of Service
User Offline
Joined: 17th Apr 2009
Location:
Posted: 25th Apr 2009 23:28
I usually do my alogorithms using the outline format. I used to use flowcharts, but I'd end up wearing my plastic out (for all those who are sound of mind, that's MY term for erasers, not credit cards).

I guess if I wanted to create a character unit that had a real grudge against the protagonist's unit, I wuld have to create an algorithm that would..

1. Save both unit postions in memory.

2. Find the shortest route to its target and get there using as many movement points as it takes.

3. Make a loop that repeats 1 and 2 until the units make contact with each other then..

4. Have the unit select an attack (if it has one) that is strongest against the unit it wants to destroy.

Heh... that does look kinda simple. I'll add more to it later on though.

Login to post a reply

Server time is: 2024-11-24 08:43:32
Your offset time is: 2024-11-24 08:43:32