Fighting Game AI

Need help with an engine or coding not on the list? Need help with a game or the website and forums here? Direct all questions here.
Post Reply
User avatar
vitinho444
Posts: 2825
Joined: Mon Mar 21, 2011 4:54 pm

Fighting Game AI

Post by vitinho444 »

Hey guys!! and girls?

So, this is my newest idea for a game, a funny one. The name is pretty pre-alpha but it should be: Pixel Tournament. It would be the "base name", this means i would make a base then make several editions.
The first ones will be a MEME FIGHT and NATIONS FIGHT
The memes one is easy, using those famous rage comics faces i would put them on a body and put them in a fight. Each one with special attacks for each "face"
The Nations one, would be like FIFA, several countries to choose, and then just fight 1vs1. Each one with stereotype special attacks :)

This will be coded in c++ using allegro lib as graphics and sound lib.
I've used some tutorials for a platformer to create the engine for the game and it's going well, just one thing left.. AI!!

If it were a normal platformer, i could make something like enemies walking from a certain range to another.. but it's a fighting game and i want to create a basic or normal AI that does the work so you can fight the CPU.

I could use that normal checking for player x and y and then enemy x and y and then move the enemy towards the player by adding or decreasing the x and y blablabla...
But that in a game where there will be some kind of platforms.. Like a normal platformer but with several floors so the game doesn't get static in the ground you know..

The question is: What would be the best way or the only or some kind of way to do the AI for the bots?
My Company Website: http://www.oryzhon.com

Skype: vpegas1234
User avatar
Jackolantern
Posts: 10893
Joined: Wed Jul 01, 2009 11:00 pm

Re: Fighting Game AI

Post by Jackolantern »

When you started talking about having platforms, and some platform-ish mechanics, I immediately thought of Super Smash Brothers. I think the AI for a game like that would be easier to program than a nuts-and-bolts technical fighting game like Street Fighter 2 or Mortal Kombat. It would also save on animation creation as well. The hardest thing about making decent fighting game AI is creating AI patterns and strategies. You can't just have the CPU always trying to close the distance to the player, or always uppercutting when they block a low attack, or the player will figure that out in just a couple of minutes at the most. With a SSB-style fighting game, you could basically have segments of patterns triggered by the player's actions, but have them randomly branch out so they will react differently. For example, if the player shoots projectile attacks at the AI, sometimes it will start a doomed move of its own so it will hit, sometimes it will do nothing and take the hit, other times it will block, and sometimes it will counter-attack. That is much more simple than if you had to account for complex counter-attacks to many different melee moves like you would have to do for a more traditional SF2 or MK-style fighting game. Maybe you could create "modes" they go into. For example, sometimes the AI will try to stay back, and will run from the player and try to attack from a distance. Sometimes it will just stay where it is, and other times it goes into "melee mode" and wants to close the distance.

Fighting game AI can be very tough. Even commercial studios really didn't get it decently until around the PS1 era (the original Street Fighter 2 on the SNES had tons of exploitable AI oddities due to the fact that the lower-memory environment couldn't do all the same crunching the arcade did). But if you have an interest in AI, I think it would be a great project to tackle :)
The indelible lord of tl;dr
User avatar
vitinho444
Posts: 2825
Joined: Mon Mar 21, 2011 4:54 pm

Re: Fighting Game AI

Post by vitinho444 »

I checked your link, and for what i got from that game, yes it's something like that.

The problem here is not making him reacting to the player. But do the bot "walking" ... i cant make him float like i said the decreasing and increasing the x and y. I need to make a more smooth movement because imagine the player goes to the top platform.. the bot can't be in the ground forever i guess..

You know what i mean?

And yes it would be great if i do this because i could use it for any other games also as a stand alone AI script that could help me and others in other projects.
My Company Website: http://www.oryzhon.com

Skype: vpegas1234
Post Reply

Return to “Advanced Help and Support”