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

Report as inappropriate.

JL235 presents ...


Pac Man

This is my first proper Greenfoot game, a partial remake of Pac Man. Collect food and avoid the ghosts. Collect the pills to turn them edible for a period of time. Unfortinately I never created an ending for Pac Man, or more levels.

A, W, S and D or the Arrow Keys to move.

Sounds by Sebastian Lenton.

26452 views / 1874 in the last 7 days

13 votes | 0 in the last 7 days

Tags: game with-source remake retro

This scenario is a member of: Scenario showcase

open in greenfoot
Your browser does not support the canvas tag.


How to implement collision between pacman and wall?


There is more to it then this (because there are two types of walls, ghosts and pills to check for too). But essentially: when PacMan moves he first stores it's current location. Then he moves to the location where it is going to and uses getOneIntersectingActor to check for a wall. If a wall is returned, PacMan moves back to his original stored the location. If null is returned then he does nothing and stays at his new location.


got it!. but now the problem is the continuous movement. I f i press left, pacman doesnt move


If it's alright, can you upload the source code? Thanks :)
A new version of this scenario was uploaded on Fri Sep 11 19:52:53 UTC 2009


could you pls help me on this... i'm trying to do the same act ofr my character for my maze... i'm having difficulty with the wall... i tried doing the same code as the one here but still it passes through (the wall)... i've also tried to make some adjustments but those doesn't work as well.. pls help... thanks a lot!! =)


This could help a lot: make some kind of warning just before the ghosts turns ineaten again.
can i copy your code

Want to leave a comment? You must first log in.

Who likes this?

mward1 dibo Administrator Game/maniac Saidel charleson sushi creator22 Iveta MathManiac mutantleg skald