How I made enemy AI in my fighting game!

preview_player
Показать описание
Play Rochambrawl!

Join the Discord!

Helpful resources:

Buy me a coffee!

I made a second channel! Subscribe for goofy unrelated content

Follow me on Twitter/X for art, prototypes, and updates:

Song: Afternoon Tea
Рекомендации по теме
Комментарии
Автор

Smart way to solve the "dumb AI" problem!
Design-wise, I usually end up limiting gameplay so that it's easier to code. Like adding dodging, or making attacks slower. That way an AI can do what it thinks it's best and still play terribly.

panikongames
Автор

good vid
1:23 Is there a reason for not using raycasts instead?

2:25 I guess it's good enough for a game with simple enough obstacles, but a possible issue with this is the enemy will see the markers even if he didn't see the player in that spot.
Easiest way of testing this is putting them in a maze and taking a few turns outside enemy's vision.
Due to markers he will still follow you perfectly, giving an impression that he can see you through walls instead of the intended one. It should be fixed if you add a check whether the enemy could see the player when he left the marker: if not, the enemy ignores the marker.

Also, at 2:47, while it may make the enemy seem smart for trying to go in the other direciton to catch you, it's probably an unintended consequence of both having too low of a quantization of angles (shooting out 32 rays instead of, well, more) and increasing vectors opposite of an obstacle (1:34). Not sure what could be done about that, short of removing the latter one.

Шпрот-ви
Автор

This was well explained. Had to subscribe right away

heagandev
Автор

Idk if this is already your plan, but i feel like the game would be more interesting with larger free-for-all fights between 6 or more characters.

For this example lets say you are playing rock.

You would want to attack sissors while avoiding paper. You might want to try to chase sissors into an enemy paper so that you don't have to fight them head on. I think it could add some really interesting strategy and varried gameplay.

justinsemple
Автор

Isn't that just the same moving towards the player but just a bit more naturally? its basically the same but only dodges obstacles

prisma.
Автор

im just wondering if i can get this into geometry dash

epiccoffee
Автор

why not use nav meshes instead for the movement. Good vid btw

ReddyzGD
visit shbcf.ru