Report as inappropriate.

Master_chief_avatar_thumb

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.

6946 views / 35 in the last 7 days

6 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 is ignoring the <APPLET> tag.
No_avatar_thumbrolachaz

2009/6/13

How to implement collision between pacman and wall?
Master_chief_avatarJL235

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

2009/6/13

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

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
No_avatarbhe2xtoyo

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

2010/5/16

This could help a lot: make some kind of warning just before the ghosts turns ineaten again.

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

Who likes this?

Brain_thumb No_avatar_thumb Math_table_thumb No_avatar_thumb No_avatar_thumb