Page 1 of 1

AI

PostPosted: Mon Oct 24, 2016 10:59 pm
by FirbleMan
Hey there!
I have been using Game-Editor for a little while and I've made a few simple games. But now I'm working on an arcade style game that is more complex and my AI is terrible! I need help making Pac-man ghost type AI.
If anyone is capable of this, I would very much like your help! I included the game below. (B2 test9.zip)

Re: AI

PostPosted: Sat Oct 29, 2016 11:24 pm
by Night716
hmm.. you can try add physical response in the ia to walls and edge_ ... well, colision to that actors. is better

Re: AI

PostPosted: Sun Oct 30, 2016 1:20 am
by FirbleMan
I tried that, he STILL left the screen/phased through inside walls!
I also don't like how he will start to turn down a path and then immediately change his mind and continue in his previous direction. It kind of breaks the flow.

Re: AI

PostPosted: Sun Oct 30, 2016 1:24 am
by FirbleMan
Never mind, when I add collision he never leaves the outside track. Eventually he comes to a stop.

Re: AI

PostPosted: Thu Nov 03, 2016 8:07 pm
by Zivouhr
For a pacman game I made, I had the ghosts in a pattern path, and depending on the location of the player, when the player collides with an invisible zone (upper right zone of maze), the enemy could be prompted to react and then start another path towards that direction.

Otherwise, you can have a move to command for the enemies, and when they hit a wall and get stuck, add a command that moves them left, right, up or down depending on the direction they need to go, just so they clear that wall and keep going.

Just some ideas, not actual coding solutions.

Re: AI

PostPosted: Fri Oct 06, 2017 12:02 am
by FirbleMan
Thank you! That is a good idea. Unfortunately the level layout has a continuous rectangular ring all around the outside where the enemies start. He only encounters outside walls and never gets into the maze. What I'm trying to do now is make the enemy detect if he is in an intersection somehow using CollisionFree. Then randomly decide which way to go, out of the open options of the intersection. Eventually, I hope to have him make decisions based upon the player's position. This is the best I've got so far.

Re: AI

PostPosted: Sat Oct 07, 2017 9:19 am
by ITomi
Hello FirbleMan!

I made some corrections in your program. I hope, these aren't too difficult and can help you to solve your problem.

Re: AI

PostPosted: Thu Oct 12, 2017 10:45 pm
by FirbleMan
:? I have no idea what's going on! But it's Wonderful! :D Thank you so much!!
I don't think you want to explain everything, so may I just ask how I would change the speed?

Re: AI

PostPosted: Sat Oct 14, 2017 6:05 am
by Kcee
You can increase its velocity

Re: AI

PostPosted: Sat Oct 14, 2017 2:38 pm
by ITomi
FirbleMan wrote:how I would change the speed?


If you want to increase the speed, set the value of movingspeed variable greater than 1 in Enemy->Create Actor event, and if you want to decrease the speed, set the value of multiplier of movingspeed variable greater than 2 in the 3rd line of Enemy->Draw Actor event (e.g.: if (timer>=movingspeed*8)... ).

Re: AI

PostPosted: Mon Oct 16, 2017 6:26 pm
by FirbleMan
:D Thank you so much! That is very helpful.