HydrolienF / Kokcinelo

Game of a ladybug that eat aphids
https://formiko.fr/kokcinelo
Other
1 stars 1 forks source link

AI ladybug take risk to avoid to be stuck in corners #140

Closed HydrolienF closed 1 year ago

HydrolienF commented 1 year ago

It may be a good idea to use https://github.com/libgdx/gdx-ai for behavior tree so that Creature take a good choice. Good choice become a bit complex when AI have to avoid more than 1 enemi or an enemi and a wall.


HydrolienF commented 1 year ago

Creature should also choose there direction to walk at max speed (not reduce one because run close to a wall)

HydrolienF commented 1 year ago

a way to fix it is to be able to run away from multiple enemis & to add wall as an enemi

HydrolienF commented 1 year ago

To include wall as enemis without having to deal with %360, we can add an offset & test as if it was 0,0 corner (angle from 90 to 270)

HydrolienF commented 1 year ago

It is working well for the current usage we have. (& should work well for multiple enemies levels).

Taking distance & speed of enemies into acound may be add in futur, but there is no need for now.