I am totally new to AI. I'm considering building a basic AI for heros in a MOBA. Wondered if someone might be able to point me in the right direction towards some tutorials for this.
nothing exists for this. After building my hero AI; I learned that it is pretty map specific, but there are always some general things to keep in mind. The best way to go about it, is to start with the very basic.
Example
Telling your unit that it needs to go heal if it is low on life.
Then you want it to do whatever the basic concept of your game is. For me, that is going to kill creeps in camps.
Now the AI is playing the game on a very basic level. Lets call this the "crawling phase"
In my game, items are pretty important, so I created a variable list for each AI, so it will buy specific items in a specific order, and sell old items to make space.
Skills are also very important; unlocking and leveling them. I created a list for each hero on which skills to prioritize leveling.
Making them use skills was tricky. You need to set up "sets" of validators. You dont want to cast a big AoE on a single creep; you want to make sure there are many, ect.
Now the AI goes to creep camps, and uses and levels skills to kill creeps. It uses the gold it earns to buy new items. Lets call this the walking phase.
After this, it got technical. In my game, there are bosses you try to kill. So I have to give a chance to evaluate the situation and see if the AI can beat the boss; or if an ally needs help with a boss; or if an enemy is attempting a boss.
AI tends to get cramped up at creep spawns, or will steal one from an ally. So I had to make them constantly evaluate if someone was in a creep camp or not, and re-target a new camp if so. If all camps are low on creeps or occupied, they will attempt to "steal" a camp from the other team.
Skills were good for creeping, but they sucked for pvp. I had to create 2-3 "sets" of validators for each skill, depending if there were many or few creeps, if there was an enemy player nearby, if there was a wounded friend nearby, or if it was a boss attempt.
With all that set, the AI was pretty good. Good enough to beat me more than half the time. I had to create a 2nd AI mode which was easier than what I had created. Lets call this stage "running".
A video of the first 5 min of the game with 3 AI and myself. The biggest downside of AI, is that it doesn't kite much (though kiting isn't a great strat in my game). The more advanced you want your AI, the more work you gotta do, and the more it will hurt game performance. I can run 14 AI at once on battle.net without any lag.
For my particular map I have an advantage, there is no item shop so I don't have to worry about that, but there are alot of skills and abilities and upgrades/leveling up.
Because I know nothing, I need a place to start from scratch. I know nothing about the AI editor or where to begin. Most tutorials I've seen talk about AI for Starcraft Melee maps.
The real roadblock for me is that most stuff i come up with (via triggers or rarely data) seem to take me further...
For instance "make the map boss" go look for the player's assets/hero whatever.. make it attack it when the hero is not there .. or making map bosses hide/survive.. etc/ sort of ideas i started on that led me to other ideas .. never allowing for enough testing because you want to see the next stage right away or the "new" idea you got from your previous idea/work/result is parasiting every other thought process...
For instance, i used the brood war weapon behavior etc to make a Legion death squad .. and boy am i having fun / hardship to work to test/adjust its power
(just changing range/life time / broodling to a tosh ..)
i mean .. just using the blizzard stuff ready made worked beyond anything i thought possible in such a short time of "r&d" invested on it (once you have sort of figured out all data related to the whole shabang) .. and that produced so many ideas coming out of just a lil experimentation.. "more ideas coming out than results" if that makes any sense?
<3 (testament to the quality/quantity of assets present in "default" blizzard assets)!
Furthermore i can't seem to get these ideas to be of any other difficulty level than lethal for "beginner" players discovering my maps.
Everyone i play with .. seems to require incremental tutoring into how the game works (how to use the hero/kite / run/ring around the rosie / etc)
and seem to expect to get this in under 5 minutes (counting the load screen time kappa )
While i don't mind, (you called it "running", hope i get there once at least :D ) i could change my ideas to "support" that sort of requirement .. i don't see doing so as only/purely something that would be good for the map/game/product i wish to do.
Of course you can have weaker map bosses do the trick .. then send the real lethal ones .. but again that just seems like fluff i don't want.
Once you start beyond the "default" "melee" ai (which is huge already) .. i feel you are consciously or not planning or even "doomed" to end up making a hard game.
Of course you can have weaker map bosses do the trick .. then send the real lethal ones .. but again that just seems like fluff i don't want.
Once you start beyond the "default" "melee" ai (which is huge already) .. i feel you are consciously or not planning or even "doomed" to end up making a hard game.
The difference between a good AI and high numbers is a very big difference though. If you are designing a map boss you can simply double its HP value, and the boss will be much harder. If you feel that your bosses are destroying new players because you gave them an ability which deals 50 damage per second; that has nothing to do with AI creation. That is just using big numbers to scare new players.
The AI in the topic, specifically, is creating an AI which replaces a human player. An AI who has no bonus over a human player, and has to abide by the same rules and options that players are allowed; to complete the same final goal that players in the game have.
my original map idea is an adventure map: 2 or more players selecting a hero each and playing out an adventure in a multiplayer setting (needless to say i quickly cut it down to a story only involving 2 players/heroes because of my low skill)
.. right away my map project hit a road block..
no players interested .. bad networking .. etc ..
Simply because i wanted the story to unfold .. it required 2 players and did not work without a second one..
.. so i tried to add triggers to simulate a player (but we do agree that it is all fake.. we don't make it "think" we just add things for the engine to do :D that would eventually "suitably" replace a player)
when i started trying to do that i failed miserably :D
So, for now, i'm making map bosses to understand stuff and how i can develop a way to simulate a player for my map specifically (as you pointed out earlier :) ) .. a way to make my story unfold when someone plays it alone and make it possible to involve more heroes that would be "active" in my story even if there are no players to "play" them.
.. a way that is "fair" as i believe is required (right now as i said earlier, if i do make the engine execute orders for a hero to compete with a player, the player will always lose)
"No players interested" is a roadblock for pretty much all games. You need to make a good game and advertise it well before players are interested. You can get a lot done by practicing it yourself; and then fine tuning the balance once you are complete with the game. This can be tricky with a game that "requires" 2 players, but you can simply give yourself control of both units. You being the guy who knows how everything works, should be able to use 2 heroes to beat the game; if you expect new players to be able to beat it. Or, even better, is to make AI for both heroes, and let them play the game while you watch. Every time they get stuck or die, you know where your AI is faulty, or where the game is faulty.
IMO for bosses, why I did (because a lot of other mappers here suggested is better, and I agree with) with bosses, was to make their "AI" all data based. Validators, requirements, target sorts, idle commands. They aren't amazing, but they are pretty good. They have unique mechanics that can be taken advantage of; but they aren't like micro-intensive RAID bosses. It may be easier for you to stick with the data route for bosses; easier on the hardware too; AI can suck up a lot of juice if it has a lot to evaluate.
"make AI for both heroes, and let them play the game while you watch"
That's the idea yes, the dream really :D i have since i started on the idea, .. but again i wanted an open city where players have to "discover" the map and i'm not sure how to do that (beyond thinking that making an ai that would "organically" go to the spots the players would is possible etc.. far long ahead (unseen yet) and frigging hard)..
.. still the challenge alone is worth it <3
"all data based. Validators, requirements, target sorts, idle commands."
Yeah.. it reminds me of mockster's poll on "which part of the editor you hate" and also the ensuing resulting posting <3:D
i love the data editor.. just a pain to remember everything of every layer of every link involved ... once you figured stuff out (not to mention the still ever present "any blizz homebase patch could change stuff" you never thought they would or never knew existed ..etc)
.. but in any case, 100 % agreed.. anything worth doing HAS to be in data "hardcoded" .. but i won't be able to go veryu far (because of my resolve to do something else that does not make it an imperative for my ultimate goal: movies)
The things you can do with what is there already is so potent it is jarring and i think basically unheard of before (no one's ever corrected me on that :D .. that galaxy is a prize fighter .. something of an unique "x" live right now.)
...
Sort of really sad that there are not more peeps joining in this very thread.. f ck me i must be old to be sad/surprised about it :]
...
Just one part where i disagree :D
"need to make a good game and advertise it well before players are interested"
i think it pretty obvious that without networking .. one's map may be awesome.. no one will see it :(
.. and a map without testers is like an ability without the graphic displays.. almost nothing! Not that i mind really.. :D i'm learning anything / everything through the maps i make in order to make movie scenes (which are 100% less hard to do since it isn't supposed to be playable.. just played :D
.. to make games with a tool to learn the tools .. f cken THE dream :P
i fully realize that my case does not really call for what can be referred to as an ai, but i do so love the parallels though
i wanted to find people to move the units around according to a script (a movie) and now i am trying to do it through the engine itself !
what a life :D
Sounds like alot of people in here have had some success with getting a basic MOBA hero AI going, and it sounds like you've all used triggers not the AI editor?
Would anyone be willing to maybe share a file with some of your triggers that I might be able to look at?
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hello,
I am totally new to AI. I'm considering building a basic AI for heros in a MOBA. Wondered if someone might be able to point me in the right direction towards some tutorials for this.
nothing exists for this. After building my hero AI; I learned that it is pretty map specific, but there are always some general things to keep in mind. The best way to go about it, is to start with the very basic.
Example
Telling your unit that it needs to go heal if it is low on life.
Then you want it to do whatever the basic concept of your game is. For me, that is going to kill creeps in camps.
Now the AI is playing the game on a very basic level. Lets call this the "crawling phase"
In my game, items are pretty important, so I created a variable list for each AI, so it will buy specific items in a specific order, and sell old items to make space.
Skills are also very important; unlocking and leveling them. I created a list for each hero on which skills to prioritize leveling.
Making them use skills was tricky. You need to set up "sets" of validators. You dont want to cast a big AoE on a single creep; you want to make sure there are many, ect.
Now the AI goes to creep camps, and uses and levels skills to kill creeps. It uses the gold it earns to buy new items. Lets call this the walking phase.
After this, it got technical. In my game, there are bosses you try to kill. So I have to give a chance to evaluate the situation and see if the AI can beat the boss; or if an ally needs help with a boss; or if an enemy is attempting a boss.
AI tends to get cramped up at creep spawns, or will steal one from an ally. So I had to make them constantly evaluate if someone was in a creep camp or not, and re-target a new camp if so. If all camps are low on creeps or occupied, they will attempt to "steal" a camp from the other team.
Skills were good for creeping, but they sucked for pvp. I had to create 2-3 "sets" of validators for each skill, depending if there were many or few creeps, if there was an enemy player nearby, if there was a wounded friend nearby, or if it was a boss attempt.
With all that set, the AI was pretty good. Good enough to beat me more than half the time. I had to create a 2nd AI mode which was easier than what I had created. Lets call this stage "running".
A video of the first 5 min of the game with 3 AI and myself. The biggest downside of AI, is that it doesn't kite much (though kiting isn't a great strat in my game). The more advanced you want your AI, the more work you gotta do, and the more it will hurt game performance. I can run 14 AI at once on battle.net without any lag.
Any questions?
Skype: [email protected] Current Project: Custom Hero Arena! US: battlenet:://starcraft/map/1/263274 EU: battlenet:://starcraft/map/2/186418
@GlornII: Go
For my particular map I have an advantage, there is no item shop so I don't have to worry about that, but there are alot of skills and abilities and upgrades/leveling up.
Because I know nothing, I need a place to start from scratch. I know nothing about the AI editor or where to begin. Most tutorials I've seen talk about AI for Starcraft Melee maps.
There is somewhere to start.
Skype: [email protected] Current Project: Custom Hero Arena! US: battlenet:://starcraft/map/1/263274 EU: battlenet:://starcraft/map/2/186418
You're welcome, glad we could have this chat.
Skype: [email protected] Current Project: Custom Hero Arena! US: battlenet:://starcraft/map/1/263274 EU: battlenet:://starcraft/map/2/186418
The real roadblock for me is that most stuff i come up with (via triggers or rarely data) seem to take me further...
For instance "make the map boss" go look for the player's assets/hero whatever.. make it attack it when the hero is not there .. or making map bosses hide/survive.. etc/ sort of ideas i started on that led me to other ideas .. never allowing for enough testing because you want to see the next stage right away or the "new" idea you got from your previous idea/work/result is parasiting every other thought process...
For instance, i used the brood war weapon behavior etc to make a Legion death squad .. and boy am i having fun / hardship to work to test/adjust its power
(just changing range/life time / broodling to a tosh ..)
i mean .. just using the blizzard stuff ready made worked beyond anything i thought possible in such a short time of "r&d" invested on it (once you have sort of figured out all data related to the whole shabang) .. and that produced so many ideas coming out of just a lil experimentation.. "more ideas coming out than results" if that makes any sense?
<3 (testament to the quality/quantity of assets present in "default" blizzard assets)!
Furthermore i can't seem to get these ideas to be of any other difficulty level than lethal for "beginner" players discovering my maps.
Everyone i play with .. seems to require incremental tutoring into how the game works (how to use the hero/kite / run/ring around the rosie / etc)
and seem to expect to get this in under 5 minutes (counting the load screen time kappa )
While i don't mind, (you called it "running", hope i get there once at least :D ) i could change my ideas to "support" that sort of requirement .. i don't see doing so as only/purely something that would be good for the map/game/product i wish to do.
Of course you can have weaker map bosses do the trick .. then send the real lethal ones .. but again that just seems like fluff i don't want.
Once you start beyond the "default" "melee" ai (which is huge already) .. i feel you are consciously or not planning or even "doomed" to end up making a hard game.
i like hard games, maybe that s the problem :D
The difference between a good AI and high numbers is a very big difference though. If you are designing a map boss you can simply double its HP value, and the boss will be much harder. If you feel that your bosses are destroying new players because you gave them an ability which deals 50 damage per second; that has nothing to do with AI creation. That is just using big numbers to scare new players.
The AI in the topic, specifically, is creating an AI which replaces a human player. An AI who has no bonus over a human player, and has to abide by the same rules and options that players are allowed; to complete the same final goal that players in the game have.
Skype: [email protected] Current Project: Custom Hero Arena! US: battlenet:://starcraft/map/1/263274 EU: battlenet:://starcraft/map/2/186418
my original map idea is an adventure map: 2 or more players selecting a hero each and playing out an adventure in a multiplayer setting (needless to say i quickly cut it down to a story only involving 2 players/heroes because of my low skill)
.. right away my map project hit a road block..
no players interested .. bad networking .. etc ..
Simply because i wanted the story to unfold .. it required 2 players and did not work without a second one..
.. so i tried to add triggers to simulate a player (but we do agree that it is all fake.. we don't make it "think" we just add things for the engine to do :D that would eventually "suitably" replace a player)
when i started trying to do that i failed miserably :D
So, for now, i'm making map bosses to understand stuff and how i can develop a way to simulate a player for my map specifically (as you pointed out earlier :) ) .. a way to make my story unfold when someone plays it alone and make it possible to involve more heroes that would be "active" in my story even if there are no players to "play" them.
.. a way that is "fair" as i believe is required (right now as i said earlier, if i do make the engine execute orders for a hero to compete with a player, the player will always lose)
Sorry if i'm off topic :/
"No players interested" is a roadblock for pretty much all games. You need to make a good game and advertise it well before players are interested. You can get a lot done by practicing it yourself; and then fine tuning the balance once you are complete with the game. This can be tricky with a game that "requires" 2 players, but you can simply give yourself control of both units. You being the guy who knows how everything works, should be able to use 2 heroes to beat the game; if you expect new players to be able to beat it. Or, even better, is to make AI for both heroes, and let them play the game while you watch. Every time they get stuck or die, you know where your AI is faulty, or where the game is faulty.
IMO for bosses, why I did (because a lot of other mappers here suggested is better, and I agree with) with bosses, was to make their "AI" all data based. Validators, requirements, target sorts, idle commands. They aren't amazing, but they are pretty good. They have unique mechanics that can be taken advantage of; but they aren't like micro-intensive RAID bosses. It may be easier for you to stick with the data route for bosses; easier on the hardware too; AI can suck up a lot of juice if it has a lot to evaluate.
Skype: [email protected] Current Project: Custom Hero Arena! US: battlenet:://starcraft/map/1/263274 EU: battlenet:://starcraft/map/2/186418
"make AI for both heroes, and let them play the game while you watch"
That's the idea yes, the dream really :D i have since i started on the idea, .. but again i wanted an open city where players have to "discover" the map and i'm not sure how to do that (beyond thinking that making an ai that would "organically" go to the spots the players would is possible etc.. far long ahead (unseen yet) and frigging hard)..
.. still the challenge alone is worth it <3
"all data based. Validators, requirements, target sorts, idle commands."
Yeah.. it reminds me of mockster's poll on "which part of the editor you hate" and also the ensuing resulting posting <3 :D
i love the data editor.. just a pain to remember everything of every layer of every link involved ... once you figured stuff out (not to mention the still ever present "any blizz homebase patch could change stuff" you never thought they would or never knew existed ..etc)
.. but in any case, 100 % agreed.. anything worth doing HAS to be in data "hardcoded" .. but i won't be able to go veryu far (because of my resolve to do something else that does not make it an imperative for my ultimate goal: movies)
The things you can do with what is there already is so potent it is jarring and i think basically unheard of before (no one's ever corrected me on that :D .. that galaxy is a prize fighter .. something of an unique "x" live right now.)
...
Sort of really sad that there are not more peeps joining in this very thread.. f ck me i must be old to be sad/surprised about it :]
...
Just one part where i disagree :D
"need to make a good game and advertise it well before players are interested"
i think it pretty obvious that without networking .. one's map may be awesome.. no one will see it :(
.. and a map without testers is like an ability without the graphic displays.. almost nothing! Not that i mind really.. :D i'm learning anything / everything through the maps i make in order to make movie scenes (which are 100% less hard to do since it isn't supposed to be playable.. just played :D
.. to make games with a tool to learn the tools .. f cken THE dream :P
i fully realize that my case does not really call for what can be referred to as an ai, but i do so love the parallels though
i wanted to find people to move the units around according to a script (a movie) and now i am trying to do it through the engine itself ! what a life :D
Sounds like alot of people in here have had some success with getting a basic MOBA hero AI going, and it sounds like you've all used triggers not the AI editor?
Would anyone be willing to maybe share a file with some of your triggers that I might be able to look at?