This site requires JavaScript, please enable it in your browser!
Greenfoot back
Ticker175
Ticker175 wrote ...

2018/7/4

Pacman Ghost AI

Ticker175 Ticker175

2018/7/4

#
hey guys i am at a loss with my pacman game im trying to make it like the original where the 4 ghosts have different attributes such as clyde (yellow) = tracks directly towards the player until he is 4 tiles away then runs away Blinky (red) = tracks the player and speeds up once half of the pellets have been collected pinky (pink (duh)) = tracks to 2 spaces ahead of pacman inky (blue) = tracks to 2 spaces behind pacman but i have no clue where to start i have created my world useing an 2D array and intend to keep it that way there are 31x28 tiles in the world (each tile is 30x30) i have also created a new layout for the game anyone know what i need to be doing to get the ghosts to follow their attributes and seek pacman and not go through the walls
Super_Hippo Super_Hippo

2018/7/4

#
Check out this link for a very good description of the game: https://www.gamasutra.com/view/feature/3938/the_pacman_dossier.php?print=1 You will see that your descriptions of the ghosts are not accurate. (Even the tiles are 8×8 and not 30×30.) You can also check out my Pac-Man game (http://www.greenfoot.org/scenarios/19573) and look at the source. However, it is mostly German so I don't know if it will help. But reading that article really helped me understanding how it works and it fascinated me to program it. (I never really played Pac-Man before.)
Ticker175 Ticker175

2018/7/5

#
thanks for the response =). i did find out after reading up about the ghosts personality's that i was incorrect but tbh i like my version better xD Yes i was pretty sure that the tiles wernt 30x30 but i personally like working with either 30x30 or 60x60 just because i find it works better with finding sprites ill check out the links now Thanks Thomas
You need to login to post a reply.