I am making a fighter with my older sister, and i have the job of making the AI. How do I do that?
All tips help, so please share knowledge.
How do I create a Fighter game AI?
How do I create a Fighter game AI?
Dragons are great.
Re: How do I create a Fighter game AI?
Simple solution: https://youtu.be/Q4MU7pkDYmQ
Hardcore solution: weak AI, that was trained for you needs. See perceptron. https://en.wikipedia.org/wiki/Perceptron
Re: How do I create a Fighter game AI?
The easiest is a bunch of if-else-then statements as deep or complex as you like.
Build up from there.
Build up from there.
Last project:
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Idle gridiron. Set team orders then idle and watch: https://togfox.itch.io/idle-gridiron
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Idle gridiron. Set team orders then idle and watch: https://togfox.itch.io/idle-gridiron
Re: How do I create a Fighter game AI?
Yeah, I wouldn't start with a full-on AI unless absolutely required. Enemies in most fighting games have scripted behavior that they follow, and it's fairly easy to make it complex enough that it will be difficult for players to anticipate every move.
Any code samples/ideas by me should be considered Public Domain (no attribution needed) license unless otherwise stated.
Re: How do I create a Fighter game AI?
I did work on a fighting module in a different engine it was not Love2D but what I have done was to implement a state machine for both the player and the opponent so I can easily trigger any state for both player and the opponent.
-stand
-walk
-jump
-kick
-punch
-block
-crouch
...etc
And then I was tap in to this state machine with keyboard input for the player to trigger any of the states and for the AI I was simply use a bunch of if-else statements as togFox has recommended to check the state of the player and decide how the AI should respond.
For example if player punch I picked a random state if the opponent going to block or jump away or crouch or do nothing and take the hit or if the player was jumping then again pick a random state if the AI going to kick in the air or jump away..etc
It was pretty efficient to work with on a high level but it was a nightmare to debug when something did not work. But I liked it so this is what I would attempt to do again if I was making a proper fighting game.
But in case we are talking about some sort of boss fight in a platformer shooter game, I think it would make more sense what milon recommended and just script a pattern that repeat over and over again, this is how it works in most games.
-stand
-walk
-jump
-kick
-punch
-block
-crouch
...etc
And then I was tap in to this state machine with keyboard input for the player to trigger any of the states and for the AI I was simply use a bunch of if-else statements as togFox has recommended to check the state of the player and decide how the AI should respond.
For example if player punch I picked a random state if the opponent going to block or jump away or crouch or do nothing and take the hit or if the player was jumping then again pick a random state if the AI going to kick in the air or jump away..etc
It was pretty efficient to work with on a high level but it was a nightmare to debug when something did not work. But I liked it so this is what I would attempt to do again if I was making a proper fighting game.
But in case we are talking about some sort of boss fight in a platformer shooter game, I think it would make more sense what milon recommended and just script a pattern that repeat over and over again, this is how it works in most games.
Who is online
Users browsing this forum: No registered users and 6 guests