Advertisement

Little more game mechanic help. :)

Started by March 04, 2013 02:51 AM
5 comments, last by moneal2001 11 years, 10 months ago

So for the SRPG I'm making, I find the most daunting thing I have ahead of me is designing a non-trivial AI. It's easily the thing that I'm going to need to do that I have the least (ie none) experience with. I did, however, come up with a little mechanic that I'd like to implement that doesn't seem overly difficult (assuming of course I can program some AI to begin with).

Basically the idea is this. I intend to give all enemies their own individual AI programming, Ideally I would have a few different ones, like this type of monster is aggressive, this other one is cowardly, and this one over here is defensive. However they would all be programmed to behave completely independently with no overall battlefield strategy whatsoever... Unless there is a commander unit present. Lots of games have commander units, but their function usually amounts to being slightly bigger and tougher and maybe you win the battle if you kill them. I intend to put commander units in slightly more vulnerable positions than normal, and program in some various coordinated strategies the enemy will use so long as the commander stays alive.

What I'm looking for is some suggestions on the sorts of tactics I could program in. My criteria, in order to not give myself an insurmountable task, is to make sure that whatever tactic is present in a given battle can be defined by as few criteria as possible.

Ex. Surround - The AI will attempt to position all its units at equidistant points surrounding some defined "center" of the players army before attacking, after having done so units will converge simultaneously (would have to define for the ai what would be "close enough" to trigger the convergence).

Ex. Maximum Casualties - The AI will prioritize defeating individual units at any cost. I thought this one up because I intend to have quests which involve strings of battles in which the player cannot res in between. Having this strategy in play in the beginning of one of these strings could be interesting. Seems reasonable to program in "ganging up" tactics, as well as giving exceptional weight to attacking injured units.

I've had tons of ideas on battlefield strategies I'd like to use, but I'm trying very hard to keep the logic required for the AI to execute them to an absolute minimum. So I'd love to hear some more suggestions, I'd love it if I could have 5ish in total. :)

I'm working on a game! It's called "Spellbook Tactics". I'd love it if you checked it out, offered some feedback, etc. I am very excited about my progress thus far and confident about future progress as well!

http://infinityelephant.wordpress.com

It is only called Artificial Intellegence simply because in everyday life there are to many extenuating factors to possibly program into a computer, So AI is basically your intelligence programming into the computer. With that little quip out of the way here are a few things to consider.....

If you were to role-play this game on the table, how would you decide when to be agrressive and when to be cowardly ? Normally this is done through stats and dice rolls.

A 2 or 3 dimmensional results table could be applied. You could also develop a conditional table. For example: Enemy 1 has an aggression rating of 6 vs Enemy 2 who has a Larger than life rating of 10. ( E1= Shitzu & E2 = Great Dane ) what do you think the results are going to be ?

Your Brain contains the Best Program Ever Written : Manage Your Data Wisely !!

Advertisement

Some orders could have a natural hierarchy. If the general, considering strategic needs, orders a platoon to exterminate an enemy platoon, the platoon leader can decide to try an ambush and order his squads to sneak in and surround the enemy, and the squad leaders could tell individual soldiers, as soon as the whole squad reaches firing positions, to start shooting and concentrate fire upon enemies in sequence, with individual soldiers exercising their discretion about retreating behind cover, advancing and exposing themselves, attacking with different weapons, etc.

Officers at every level of the hierarchy should have a reasonably small range of choices, without micromanagement.

Omae Wa Mou Shindeiru

I am not fully sure whether the following might help as your description of monsters and battlefields doesn't really define the context of the mobs.

Some thoughts:

If a mob is a military unit they should have certain (common to all military units) tactical options available to them. The options available may also scale with rank.

Is the mob a solo monster or a pack monster i.e. solo monsters may not charge headon whereas a pack might (until their number drops).

Ambush

Distraction while being flanked (remember the raptors in Jurassic park?)

Drawing the player into an ambush by using a decoy who gains your attention then runs away from you

environmental use i.e. high ground, cover etc.

traps/snares

scouts (fog of war reducers) i.e. if seen by a scout the enemy army re-orient their positionings/tactics to better meet you and your setup.

can we see a screen shot by any chance i like to see them.

I am not fully sure whether the following might help as your description of monsters and battlefields doesn't really define the context of the mobs.

I think a more thorough explanation is in order so here goes. At the basic level I am molding my game after a game called Shining Force for the Sega Genesis. This is not in any way a clone, but that's the basic idea. The AI in that game was basically brain-dead (as could be expected for the time frame during which it came out) but there were some hard battles because the computer would throw 2 or 3 or 4 times your number at you on a fairly regular basis. No single enemy was ever a match for any single unit of the player (with the exception of some bosses), but in large numbers they could be reasonably good at surrounding and killing player units that didn't stay close. Also, by comparison to more modern SRPGs, the battlefields could be fairly large, which is something I'd like to do as well.

Ideally (we'll see how much I'm able to implement) there will be mobs that range from single-minded and stupid to (hopefully) intelligent and coordinated. I have designs for both random battles with enemies chosen and thrown out based on various criteria (likely scaling with player level) as well as scripted battles with pre-defined enemies and formations. While there will be a wide variety of mobs, I do intend to place all the ones I design into some fairly easily identifiable archetype slots, such as the classic tank, healer, damage dealer and all that. On a very base level I intend to make sure the AI is smart enough to position units in a reasonably logical way based on the role that unit plays.

For the most part, random battles will be of the enemy isn't smart but there will potentially be a lot of them variety, whereas the scripted battles will likely have stronger individual units and more defined strategic "thinking".

I'm very big on creating a game in which the player is regularly encountering different factors he/she has to worry about from one battle to the next. Some battles will have fog of war, some won't. Terrain will be vital sometimes, at other times it will be in a big open field. Sometimes the player's goal will be to defend a position rather than attack the enemy. Etc. My goal with the AI is to extend this line of thinking. I do not intend an AI that can rival a human player in a straight up battle, I merely intend to put forth a system where the AI performs radically differently (but still, hopefully, effectively) from one battle to the next. I see it as a tool to create variability in battle on the same level as terrain, fog of war, etc.

can we see a screen shot by any chance i like to see them.

My "playable" game right now consists of a town screen, a world map, bits and pieces of a gui, and that's about it, lol. My timetable for this project is something playable by June, and something I can release by the end of the year. This post and the others like it I've posted recently are being used to inform my design document, which I've spent a lot of time on.

I'm working on a game! It's called "Spellbook Tactics". I'd love it if you checked it out, offered some feedback, etc. I am very excited about my progress thus far and confident about future progress as well!

http://infinityelephant.wordpress.com

Advertisement

Loved SF 1 and 2 back when i was a kid. even downloaded them when they came out on the wii store.

Hit and run would be something to add, if players/ai could move after attacking. ambushing would definitely be something to add. covering/protecting healers and "commander" units. flanking like others suggested would be good to add as well.

This topic is closed to new replies.

Advertisement