I'll try to keep it short and sweet.
Basically I'm going to divert my efforts from MehPong (Breakout) to create a new game, which will involve turn based movement. I'm currently working on the sprites for the moment, but I know for a fact that if I take the game seriously and actually get the core of the game made, I'll have little to no idea as to how I should go about creating the enemy AI for it. I'm hoping to make the enemy into sneaky little bastards, in order to add tension to the game.
Not entirely sure wether there's some articles about it, but I'll give the Article Page a look, but I thought I'd post up here in the event that someone can throw me so alternate suggestions.
To explain the game further, it's a top down view where tbe 'Pieces' (Characters) are assigned movement points, and these points decide how many 'Squares' you can move by each turn (Think chess, and you have the idea). Same will apply to the enemy, but in order to ensure the game is worth anything, it'll greatly depend on the enemy movement selection. I have my hopes set high, like having movement decided on it's view of the Players in-game pieces, for example.
- Having them hunt down players that have low HP
- Avoiding stronger players when the enemy characters HP is low (ie Survival)
- Sneaky tactics allowing the enemy to perform surprise attacks
- Guarding critical locations or items.
And general things like that.
Any help or suggestions guys? It'd be greatly appreciated.
Also, a side note, if anyone can suggest where I can aquire some nice 'Tiled' graphics, creepy and atmospheric music (MIDI or Samples, either is good) and some fancy, space themed / metalic background images, I'll be extremely appreciative.
Thanks for any help given.
If, for example, a character can move anywhere within, say, 6 x 6 squares, and there happens to be an impassable object on one of these squares in the characters path, I'd like to figure out how I can get the character to work around this problem to get to the selected square destination, and in the shortest possible time.
I'd be able to work around the problems myself through time, trial and error, but by the time I even get the sprites ready, I'm sure someone will be able to provide some answers.
Thanks again.
n/a
Peblo Custom ratings must be 50 characters or less
Registered 05/07/2002
Points 185
14th August, 2005 at 23:12:31 -
Sounds like a bit like Final Fantasy Tactics. I have the beginnings of such an engine lying around somewhere, but it's movement is different than the one you asked for (clicking the square next to the player to move it). The one thing that made me quit the engine though was the AI. Having any sort of AI proved more than difficult, because locating anyone on the feild was hard to do. More or less the enemies would always go after the player with the least health, even if they were surrounded by 4 others.
I don't know, possibly proirity AI would work? I could help if you need it, although everything I touch seems to become corrupted. Meh.
"Isn't it always amazing how we characterize a person's intelligence by how closely their thinking matches ours?"
~Belgarath
So, what king of overarching AI are you after? Something that actively tries to compete against you like another human (hard), or enemies that just stand there and attack the player characters when they come near, or just blindly (slightly less hard)?
I sometimes feel like myself, Peblo, but thanks for the offer.
Any form of AI would be better than none at all, so I appreciate the offer.
It is somewhat like Final Fantasy Tactics. For every turn, you select each character with avaliable points and move it from it's location to any reachable destination (via movement squares), set the direction it should face, and voila, character movement complete. The direction you face is important, however, because unless you 'sight' the enemy, you will NOT see them, and the same applies to the enemy, hence I need to figure out a fair AI, because initially the enemy won't know where player characters are unless sighted, so I'm making this thread early as to get as much feedback as possible before I get to the point of programming some AI.
On top of that, it's The Games Factory, which may (Or may not) mean it'll be harder to make any feasable AI than what can be made with other packages.
Hopefully I'll be given enough help before I get to the programming side of things.
Taking a note or two from your engine will most certainly be a good start!
Preferably something that will at least present some form of challenge for the player Not super hard, but at least somewhat intelligent movement.
Also, something that could be tweaked slightly in order to make it easier (Or harder) in the interest of 'Difficulty Settings'.
I doubt all that I ask for can be done, but I can't be blamed for having a little faith
I wasn't referring to the difficulty of the game, I was asking how you want the enemies to behave; like mobs that just hang around or rush and attack you, or a moe strategically-minded AI.
I've already made a list above as to how I want them to behave. It's quite easy to realise, going by the list, that I'm not looking for berserk mobs of enemies, or enemies that hang around. I'm asking how I would go about creating sneaky tactical enemies that move depending on their situation/stats VS situation/stats of nearby player characters.
If you've played 'Shining Force' or other such classic games, that's the best example I can give you. The enemies in it didn't simply rush the nearest character, they chose the ones they knew could be killed in the quickest amount of time, with the least amount of damage to themselves. They also defended their own main/boss characters when they needed help, and also ganged up to face the tougher characters you had.
I don't want enemies that simply run at you and try to kill you, thats too easy, and I dont want you to have to do all the searching either, thats too boring.
It's similar to chess, only your turn doesn't end when you've moved one piece, it ends when all have been moved - When the round starts you have the option of moving all your pieces, then when that phase is over, the computer has to 'strategically' choose what would be the most effective way to deploy it's pieces. So in your own words, "Strategically minded AI", which I already listed.
It's going to be tough, hence I asked for advice, and I'm fully aware that the liklihood of me getting the AI remotely like what I have in mind is slim to none, but if anyone can help me prevent the AI being utter dribble, I'd be very appreciative.
Righto, calm down. I don't think anyone's ever gotten a working AI tree in MMF that could do the sort of things you're after. However, it might be possible to simulate it.
I'd begin by having units stored in an array containing their coodinates, current HP, and current strategic value (determined by a fixed strat. value for that unit type, modified by current HP for example), as well as anything else you need.
Then, once they are capable of moving, have AI units select their target based on their strategic value, modified by distance from the unit.
I'd then have a special class of invisible unit that acts as a rallying cry, which AI units wouldn't attempt to attack but which would have a high basic strategic value. They could be placed at important areas and chokes, or created by boss units when their HP drops below some threshhold. They might also have some nature of level-specific placement at runtime which would emulate a predefined strategic behaviour.
As for the movement itself, I'm sure there are articles on tile-based movement if you need them.
"Righto, calm down"
I'm as calm as a dead ant, just trying to get the point across
It's relatively hard to explain what I'm after without pictures to back up my posts, so I'm trying my best to type out my thoughts.
Thanks for that suggestion though, it's duly noted.
Took a brief browse through the available articles also, but wasn't too thorough so I'm sure I missed something. Will give it another look when I get the required basic materials for the game sorted out.
As I said before, I do realise that the chances of me getting the desired AI is unlikely, but I'll give it a damn good go
Thanks again.
I had a thought, if the invisible markers I mentioned simply modified the strategic value of units within a radius, or with an initially high value that decreases with distance, it would cause the AI units to rush to defend a point only when it's under threat (thereby reducing the need for level scripts), and with a decreasing additive radius, more attractive the more threat they're under.
In that case, the're be no need for separate special units at all; the behaviour might simply be an attribute given to important units or locations.
A mild version of the effect applied to all player units would give clusters of units a higher strategic value. That way, an AI unit could prefer to attack a group of units rather than a lone one as they pose more of a threat. The opposite would also be possible if necessary, with units prefering to attack those least defended.
Which makes me think it would be possible to have a similar effect applied to AI units, modifying something like a 'courage rating' rather than a strategic value. It could then be made so that strong groupings of AI units would prefer to attack (high strat. value-rating) groupings of player units, while small groupings or individual AI units would prefer those with a lower strat ratings (which in a group of the same type of player units would be the one furthest from a cluster, or in a mixed group would be the one with the lowest tradoff strat. value between distance from the cluster and intrinsic strategic value [to clarify: a very weak unit near some other units might be more attractive than a stronger unit slightly further away from the cluster, though unless the cluster modifying effect was subtle the one furthest away would probably win]).
n/a
Peblo Custom ratings must be 50 characters or less
Registered 05/07/2002
Points 185
15th August, 2005 at 11:21:25 -
...And Radix beat me to my idea, although my idea for stratigic value was
"(((Target HP + Target MP +(Speed*2))/average current HP of everyone on feild + average current MP of everyone on feild + average speed of everyone on feild) - (Distance from target player in pixels/(square height+length/2)) + 10 for each surrounding unit)"
"Isn't it always amazing how we characterize a person's intelligence by how closely their thinking matches ours?"
~Belgarath
Holy crap, we haven't had a good thread like this in a damned long time. Very nice ideas.
Ropedrink, I've got a very, very basic turn based engine, however it doesn't use square based movement. But it's in TGF (no ext) and has basic enemy movement, player unit selection, etc. It was geared for space combat; though I haven't gotten around to actually putting weapons in (if an enemy is in your attack range, and you click it, it gets destroyed). If you'd like I could send it to you to see if it gives you any ideas.