I’m working on a Pac-Man game. I need to make it so the ghosts are relatively smart. In short I want an AI that changes directions when it bumps into a wall, and doesn’t just continously run into walls back and forth. I tried making one with one of the ghosts but it didn’t work out very well. Any help?
Also, there are many different object types used as walls. Is there any way to group them all as one so I don’t have to add a billion things for collision?
I have an idea, but it’s relatively complicated. I’m well known for my work in A.I., so I might be a good person to work with for this. Are you okay with a lot of work?
@“Biscuit Butter” in order to solve the collision issue you mentioned, create a single object type called “Barrier” or something, then make all your walls have that object as their parent. The just check for collisions against “Barrier” objects, and the children will all match.
Parents are a great shortcut - keep in mind that the child objects inherit all the parents’ behaviors as well, so any logic the parent has, the child also has.