GP2X Turn Based Strategy Ai


MakavelianKode

Still Fresh
Joined
Jan 20, 2006
Messages
70
So, I'm thing about making a turn-based strategy game to quench my thirst for Advance Wars (I don't want to carry around my DS, what can I say).

I think AI is going to be the hardest part of the project. So far I found this gamedev.net article helpful. I was wondering if anybody else has some ideas or links on the matter? I don't have any specific questions yet, I just want to gather information for the time being.

Also, do you guys think people will contribute if I make this a community or moddable game? I definitely think so, but my idea is this - I suck at art, but more importantly, I don't think I'm creative enough to come up with cool levels. So, I figure, if I just make it so that it's easy to make new levels (or "chapters" - the word I'm looking for eludes me at the moment) then I imagine gp2x'ers will be happy to make new ones. What do you guys think?
 
It's actually really easy to write passable AI, but to write challenging AI for a game as deep as the advance wars series can be quite tough.

The best way to go is to think about how you would play the game, what decisions you would need to make, what things you would look for and so on. Then you need to try to make the computer look for the same things.

For example, in advance wars, do you have an infantry unit close enough to an undefended base that you can capture it before your opponent can bring any units to defend it? If so it makes sense to go for the capture and possibly reinforce it with nearby tanks.

Can you move a missile close enough to target an opponent while staying outside his return fire range?

Make a list of these kind of things and then try to code the most important ones into the AI so that the computer can use these to decide what to do.

You will probably want to assign an easily modifiable priority / weighting to each decision to tell the computer how important it is. Then you can easilly tweak the AI by, say, reducing the importance of killing infantry and increasing the priority of capturing bases. You can even have different enemy intelligences that are more aggressive or fear a particular unit just by playing with the priorities.

As far as making it moddable, I'd way that's a good idea, but it wouldn't hurt to try to get some good levels together any way. It'll be much easier to balance the AI if you have at least a few interesting levels to try it out with.

I don't have a load of time, but if you want someone to bounce ideas off you can send me emails through this site. I'd like to see a good turn-based strategy game on the gp2x so I'll help you out as much as I can. I might even be able to contribute some AI code if you want.
 
Thanks a lot man. I appreciate the advice and offer to help. I definitely think the AI should be easily tweakable because I know I'm going to be getting a lot of advice and suggestions :) And you're right I definitely would need to get a couple levels together - at the very least to see how everything comes together.

I got a 5-page paper on the Iliad due next Wednesday :( so I won't do any programming on my strategy game until that's done. On the bright side though, I'll be doing planning and this seems like a project that should be well-planned beforehand. After I finish this paper though I most likely will take you up on the email offer :)
 
I recommend "Artificial Intelligence - A modern approach" by Russel, Norvig. it's _THE_ AI book that teaches the basics and gives you a slight insight on AI.

big edit!

After thinking about try a "greedy" AI first, because that is the most simple way to get something running to fool around with because it has a few simple rules

1) Roam around (the lowest rule simple to implement)
2) Move to Enemy if one in sight (this needs field of sight and pathfinding (A*/A-Star)
3) Attack Enemy if close enough (this is the rule with highest priority)

On every turn every unit checks the highest rule first (in this case 3) if condition is not true go to the next lower one and so on and so one. This is so simple but already enables you to have 2 armys fight each other...
 
this may sound daft but it may quench your thirst!!
Advance wars was a copy of and old turn based PC engine game
wait - i just need to boot gpx up
the game in question is called millitary madness (thats a turbo grafx english version)
it works okay with gp2xengine (pc engine emu)
hope that helps!
 
raj_takhar posted on Feb 22 2006 at 01:27 PM said:
this may sound daft but it may quench your thirst!!
Advance wars was a copy of and old turn based PC engine game
wait - i just need to boot gpx up
the game in question is called millitary madness (thats a turbo grafx english version)
it works okay with gp2xengine (pc engine emu)
hope that helps!
Just looked at some pics - that game looks like fun - I'll give it a shot. I'll probably still end up trying to make a turn based strategy game anyway - but in the meantime this looks like it can definitely quench my thirst.

And yeah, Famicom Wars did come first


Also, thanks for the input synkro. I'll look that book up. And primitive AI is always a good place to start. No reason to code advanced AI from the get-go.
 
Last edited by a moderator:
So I'm looking up Advance Wars info and I came across the this wiki page: http://en.wikibooks.org/wiki/Advance_Wars

Seems to me that this game is so well documented that, other than AI, a clone should be relatively simple to code. We'll see once I get started next week :)

Edit #1: BTW, does it make sense to have a beta with no AI? Just you vs yourself? I know that's cool in chess, but is it just stupid here? (Keeping in mind - I said beta)

Edit #2: I just realized that beta would kinda make sense for "here, it's your turn buddy" style multiplayer :lol: (I like my new term)
 
Instead of "you vs. yourself" i would rather call it "multiplayer on one gp2x". So yes, it would definetly be useful. I think advance wars even has a game mode for this, where you can play against a friend on one gameboy.

Edit: well, looks like you already had the same idea ;)
 
The best aspect of an AI-less version is that you can get all the rules down first, make sure everything works and then start thinking about how the computer should play.

You could also distribute the source at that point and ask for help getting the AI going.

Sounds like a plan to me :)
 
i say you just download your brain into the computer, like lawnmower man or something. then you don't have to type or anything...
 
MakavelianKode posted on Feb 22 2006 at 08:18 PM said:
"here at it's your turn buddy" style multiplayer :lol: (I like my new term)
I think "hotseat" rolls off the tongue a bit better. ;) (Wow... Wiki really DOES have an article for absolutely everything: http://en.wikipedia.org/wiki/Hotseat_(multiplayer_mode) )

Best of luck with your Adv Wars clone. :)
 
Last edited by a moderator:
Ravnos posted on Feb 22 2006 at 06:45 PM said:
raj_takhar posted on Feb 22 2006 at 11:27 AM said:
Advance wars was a copy of and old turn based PC engine game
WRONG. Advance Wars is a game in the Nintendo Wars series. The first game in this series was Famicom Wars, which was released before Military Madness.

Famicom Wars, Superfamicom Wars and Gameboy Wars should run on the GP2X :)
 
Last edited by a moderator:
SatanClaus posted on Feb 25 2006 at 08:59 PM said:
Famicom Wars, Superfamicom Wars and Gameboy Wars should run on the GP2X :)
there's a super famicom wars!? And for some reason the others(GB and Famicom Wars) are just a little too lackluster for me.

Edit: Just saw Super Famicom Wars on wikipedia.. to bad I've never seen an eng translation of it.
 
Last edited by a moderator:
Back
Top