Keeping ally players alive.
I have a game that has a bunch of different characters that are all on the screen at once and you can switch between them at any time. But when you aren't playing as one of them they are AI controlled. How should I keep the AI controlled ones alive in combat without them being invincible? I don't want the player to just switch to a different character when the players favorite is low on HP just to keep him or her alive. It's an action game, so it isn't like keeping them alive in an RPG.
Surely you will just have to make the AI play perfectly if you want it to always survive - it's often easier to create a "perfect" AI (100% accuracy etc) than a realistic one
Quote:
Original post by 3DModelerMan
How should I keep the AI controlled ones alive in combat without them being invincible?
You can achieve it two ways other than making allies invulnerable:
Make enemies hit the active player most of the time if he has high level of health. Or make your allies go behind you to avoid being hit. The second is more difficult to achieve and it also could ruin your present attack formation.
Quote:
Original post by 3DModelerMan
I don't want the player to just switch to a different character when the players favorite is low on HP just to keep him or her alive.
If he runs into the field of fire and than just switches back, he cant blame stupid AI for his player death. Player must get some consequences in order not to cheat.
The changing ability could also be used only if you're under cover or at least with half health. Try to figure out in what situations this ability would be reasonable to use and appropriate to your desired gameplay. Then try to make rules for the player, so he needs to think before changing his character.
I would want some more details about your game in order to provide more exact suggestions. Is it a war-sim, a game where you can order your allies etc.
Hope I helped you out in some way.
Time is measured by stuff you do. Don't waste minutes on nothing, have more time.
Yeah it's kind of like a squad based combat game. Except it's in medevil times so it uses crossbows/bows and swords/axes. You can switch the AI between follow, and a few other states. I guess if you could just switch to defend or pull back then you could keep them alive yourself, by telling them to take defensive measures. The problem with that is that if they blindly listen to whatever you say they'll look like dweebs. They shouldn't just fly into a murdurous rage with low HP because you tell them too. And on the same note, they should be a little more agressive when they have higher HP. There isn't any magic in the game though.
If the AI controlled characters receive less damage than the currently controlled one, they will live longer but not be invincible.
Unfortunately, anything you do is going to be slanted. If the AI is so good that the players don't die, there's no reason to switch between them. If the characters just hide or defend, then switching between them doesn't bring any tactical advantage.
I guess you just need to decide which way fits the game play better.
Unfortunately, anything you do is going to be slanted. If the AI is so good that the players don't die, there's no reason to switch between them. If the characters just hide or defend, then switching between them doesn't bring any tactical advantage.
I guess you just need to decide which way fits the game play better.
Quote:
Original post by 3DModelerMan
I guess if you could just switch to defend or pull back then you could keep them alive yourself, by telling them to take defensive measures. The problem with that is that if they blindly listen to whatever you say they'll look like dweebs. They shouldn't just fly into a murdurous rage with low HP because you tell them too. And on the same note, they should be a little more agressive when they have higher HP.
I guess you could multiply your order priority by the character's health. So if he has little health he wouldn't listen to anything you say, maybe just stay behind you. In that way, most of the time the charging would be done by you, but in a medieval game there should be an option to attack at once by everyone, but if you stay put they wont go for themselves.
But yet again it wouldn't be realistic from the side if one warrior would be the leader and suddenly you switch and order him what to do. One of the opportunities this ability would allow is to make your allies to attack, while you go around and take enemy from behind.
An example of where you would want to use this ability would be helpful.
Time is measured by stuff you do. Don't waste minutes on nothing, have more time.
Actually you bring up a good point about it looking wierd if you switch to an ally and then order the leader around and he does what you want. I have a bunch of ally characters in my game that I want to be playable. But I don't know how to keep them all in one piece on the battlefield when you're not playing as the leader. I guess if I used scripted AI for the characters that you aren't playing as it might work... but that's alot of scripting even for only one level. I was going to use the commands to just keep the others from being killed, but I guess playing as one of the allies would ruin that...
Though I'd need to know how this game is going to be played and will go into battle, why not have threat assessment?
For example:
If the enemy is mostly archers; get behind cover. If they have a ranged weapon of their own; fire back.
If the character has little armor, stay away from strong enemies.
Your orders could be the general mindset of the allies rather than true commands. This could help imply the strategical plan of the group. "Take down the archers.", "Take out the strongest (the commander)." "Keep them at bay (Hold your ground.)", etc.
Try breaking down your own survival tactics. Put yourself in a situation that a character could be in. Write down everything you think and do. Do this over and over again. Start formulating these notes into workable AI evaluations.
If you can get to a prototyping stage, try throwing the AI into combat sessions. See if they survive. Refine from there. Heck, have someone else try your AI evaluation in the real world within a situation. See if they can spot any more variables or commands needed or a way to streamline it.
For example:
If the enemy is mostly archers; get behind cover. If they have a ranged weapon of their own; fire back.
If the character has little armor, stay away from strong enemies.
Your orders could be the general mindset of the allies rather than true commands. This could help imply the strategical plan of the group. "Take down the archers.", "Take out the strongest (the commander)." "Keep them at bay (Hold your ground.)", etc.
Try breaking down your own survival tactics. Put yourself in a situation that a character could be in. Write down everything you think and do. Do this over and over again. Start formulating these notes into workable AI evaluations.
If you can get to a prototyping stage, try throwing the AI into combat sessions. See if they survive. Refine from there. Heck, have someone else try your AI evaluation in the real world within a situation. See if they can spot any more variables or commands needed or a way to streamline it.
If there is no, or little different game play variety that different classes have, players wouldn't switch. But if you have archers and sword warriors, changing could be quite useful, because if your enemies fire with bows at you and you have just one archer, you might want to switch to him (as he would be the only playable character).
I came up why? and how? the player could switch characters:
The different classes would be good, because you could have all of the characters at one time, and use which you feel is best. It would increase game play variety.
Having one leader forbids you from doing what you want with other characters (in real life). You can solve this by not allowing characters to go too far away from leader: AI wouldn't go and the player would be switched back to the leader if hes too far. There would be some forbiddings in game play, so this needs to be considered before adding.
Like in most tactical games, even if there isn't an opportunity to order (just single missions), you have certain objectives: sabotage, assassin, guard etc. The character switching option I think would be something similar, but it just lets you to see the progress of every character at once while being able to make some decisions for yourself, instead of AI. Example: One character must fire a building and the other needs to rob the some valuables from the same building and run at the in the chaos when it's getting on fire. I don't think this would be in your game, but I wanted to explain ho it could be used.
The last thing would be an attack done by a lot of warriors, so there wouldn't be any command necessary as it would be unorganized fight. It wouldn't need different classes. It would allow you to switch when low on life, so you wouldn't need to stop after few hits (very fun). I think there wouldn't be any characters (heroes of the whole game) and just separate warriors, that could die very easily. The output of fight would need to be based on your stats(in the battle), so if you stand and do nothing you would loose.
I think it would be easier to make standard warriors with no differences, but there couldn't be a RPG element (as you play as any warrior). The AI scripting will come after you decide what you need, tell us if you want to have characters that would play throughout the whole game.
I came up why? and how? the player could switch characters:
The different classes would be good, because you could have all of the characters at one time, and use which you feel is best. It would increase game play variety.
Having one leader forbids you from doing what you want with other characters (in real life). You can solve this by not allowing characters to go too far away from leader: AI wouldn't go and the player would be switched back to the leader if hes too far. There would be some forbiddings in game play, so this needs to be considered before adding.
Like in most tactical games, even if there isn't an opportunity to order (just single missions), you have certain objectives: sabotage, assassin, guard etc. The character switching option I think would be something similar, but it just lets you to see the progress of every character at once while being able to make some decisions for yourself, instead of AI. Example: One character must fire a building and the other needs to rob the some valuables from the same building and run at the in the chaos when it's getting on fire. I don't think this would be in your game, but I wanted to explain ho it could be used.
The last thing would be an attack done by a lot of warriors, so there wouldn't be any command necessary as it would be unorganized fight. It wouldn't need different classes. It would allow you to switch when low on life, so you wouldn't need to stop after few hits (very fun). I think there wouldn't be any characters (heroes of the whole game) and just separate warriors, that could die very easily. The output of fight would need to be based on your stats(in the battle), so if you stand and do nothing you would loose.
I think it would be easier to make standard warriors with no differences, but there couldn't be a RPG element (as you play as any warrior). The AI scripting will come after you decide what you need, tell us if you want to have characters that would play throughout the whole game.
Time is measured by stuff you do. Don't waste minutes on nothing, have more time.
Hi,
in Jericho you can also switch Charakters and have a simple way of commanding them. Maybe on of the special features of the commander is to be able to give more complex and stronger commands. So a "normal" guy could say "Stay here", "Go there" but the commander could say "Defend this door" or "Hold position" and the characters would be more likely to keep there moral high and not flee when there health is low.
Just some thoughts
in Jericho you can also switch Charakters and have a simple way of commanding them. Maybe on of the special features of the commander is to be able to give more complex and stronger commands. So a "normal" guy could say "Stay here", "Go there" but the commander could say "Defend this door" or "Hold position" and the characters would be more likely to keep there moral high and not flee when there health is low.
Just some thoughts
“Always programm as if the person who will be maintaining your program is a violent psychopath that knows where you live”
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement