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

Report as inappropriate.

JL235
JL235 presents ...

2008/7/28

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.

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

Sounds by Sebastian Lenton.

22594 views / 36 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.
rolachazrolachaz

2009/6/13

How to implement collision between pacman and wall?
JL235JL235

2009/6/13

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.
rolachazrolachaz

2009/6/13

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

2009/9/6

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
bhe2xtoyobhe2xtoyo

2009/12/22

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!! =)
MathManiacMathManiac

2010/5/16

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