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

Comments for Pac-Man

Return to Pac-Man

danpostdanpost

2017/6/12

The only problem I have detected is that the player only moves when a key is pressed. The pac-man should move in the last direction taken until a wall is encountered unless directed to turn at the next junction.
Super_HippoSuper_Hippo

2017/6/12

I noticed that it is like that in the original pac-man. However, it's much easier to control if you can stop when not pressing any key. At least that's my feeling. The only disadvantage is that if pac-man stops moving at a junction and you think that you can move in the next direction, but you can't because he is standing a few pixels next to it. That's why it is much easier to cut corners when pressing both arrow keys together, the direction you are moving right now and the next direction you want to move. If it somehow doesn't feel like pac-man with the movement code as it is right now, I could change it / have it as an alternative. I have never played the original version though so I am not 100 % sure how it works... If you are moving right and press the left key, are you changing the direction immediately or at the middle of the next tile? If you are moving right and press the up key and you can't go up, will you keep moving right or stop? And if you keep moving, will you go up when you reach the next junction (even if it is some tiles away) or do you have to press both keys together like it is here right now to make this happen?
MrBradleyMrBradley

2017/6/15

There doesn't appear to be a link to the game on this page...
Super_HippoSuper_Hippo

2017/6/15

You mean a link to the original Pac-Man game in the gamasutra article I put into the description? Well, the original Pac-Man game was played into one of those "cabinet's" (there are also pictures of them in this article). There are a lot of emulators and copies of the game you can find, but I don't think that Namco published the original one in the internet.
MrBradleyMrBradley

2017/6/15

I thought you had a GF version... I see that several people have scenarios for this game.
Super_HippoSuper_Hippo

2017/6/15

My GF version of the game is here on this site, yes. I think I don't understand the problem right now =/
MrBradleyMrBradley

2017/6/15

I think it is because it appears only as an applet, and my browser ignores applet tags.
Super_HippoSuper_Hippo

2017/6/15

Theoretically, you should either be able to access every scenario or none.
YehudaYehuda

2017/6/15

I like the real Pac-Man movement better because in your game I have to hold my fingers down on the keys as opposed to just pressing. I also don't like that it feels like I can move in all four directions when I'm surrounded by walls as opposed to just being able to move parallel to the walls.
YehudaYehuda

2017/6/15

The game is also very small I don't see why it can't be bigger (unless the reason it's this size is because that's the size of the images that you had).
Super_HippoSuper_Hippo

2017/6/16

I didn't use any images. They are created with the methods provided by GreenfootImage. I only looked it up how they should look. However, the background is an image after I created the world with wall objects and give them different images, but dropped that idea, took a screenshot of that, use it as the background and don't have a wall class anymore. The size is the original size (the pixels are just smaller/not so far away from each other) Probably it could also be twice the size to still fit on everyone's screen, yes. Usually I think smaller is better than too big though. Yes, you can move in all direction even though there is a wall, that's true. I still don't know how exactly the original movement worked. I mean in the article they talk about cutting corners and that even professional players don't always do that perfectly, but if you only click once and then click once again for the next direction you want to go at the next junction far away, it will always cut corners perfectly...
MrBradleyMrBradley

2017/7/15

I can run the game now. Looks good. I agree with a previous post, that the PacMac should continue in the direction it is facing without having to hold the arrow key down. Will you be posting the scenario for download?
Super_HippoSuper_Hippo

2017/7/15

As I mentioned, I don't know how the original movement works with the problems I wrote here in the comments... I could upload the source. However, it is mostly in German, so I don't know if it would help.
MrBradleyMrBradley

2017/7/16

Yes, go ahead and post the source. I'd like to have a look at it. I think it is a very good port.
A new version of this scenario was uploaded on 2017-07-16 18:21:55 UTC - No relevant changes - Publishing source
Super_HippoSuper_Hippo

2017/7/16

Okay, I published the source. I hope it helps.
MrBradleyMrBradley

2017/7/17

Thanks.
davmacdavmac

2017/7/27

The HTML5 version of this scenario runs quite well, and the UserInfo support (high scores) is now mostly working too :)
Super_HippoSuper_Hippo

2017/7/27

I was already wondering who is updating my scenario here ;)
davmacdavmac

2017/7/27

Ah right - I was just removing the old javascript translation, which must have updated the scenario's "last modified" time. Sorry about that!
hannesleandrohannesleandro

2017/8/20

I can't run the game...why this happend ? But I think this game is Awesome...
Super_HippoSuper_Hippo

2017/8/20

Do you get some kind of an error message? Are you using the applet or JavaScript (html 5) version?
jabberjabber

2017/8/30

neat
SnowfoxSnowfox

2017/9/7

Very cool and nicely done, plays well.
rugamborugambo

2017/9/7

very interesting game. I'm curious is there a way to speed up the action?
Super_HippoSuper_Hippo

2017/9/7

Thank you. You can't speed up the action. However, the speed of Pac-Man and the ghosts increases with higher levels.
Super_HippoSuper_Hippo

2017/9/7

Well, you could download the game and speed it up yourself. I personally don't think that it is too slow though. I mean you can think about your next move because the ghosts are predictable.
BananaramaBananarama

2018/7/23

very well done =)
Super_HippoSuper_Hippo

2018/7/23

Thank you :)
Ticker175Ticker175

2018/7/23

and i am getting the java error when i try to download it and run it on my pc
Super_HippoSuper_Hippo

2018/7/23

What error? Do you use Greenfoot version 3.1.0?
A new version of this scenario was uploaded on 2019-06-05 17:09:49 UTC Added the possibility to play in different sizes. (Hopefully this will work online.)
Super_HippoSuper_Hippo

2019/6/5

The window size is apparently fixed and does not update when the next world has a different size. You can download it to play in a different size at least. @davmac: Any chance that the window size here on the site could update every time Greenfoot.setWorld is called?
danpostdanpost

2019/6/6

Go to the largest sized level you can play at and update the scenario. It should accommodate all sizes online then.
A new version of this scenario was uploaded on 2019-06-06 10:43:30 UTC Uploading when biggest world is active. Maybe that fixes the size issue as danpost suggested.
Super_HippoSuper_Hippo

2019/6/6

Oh nice, it works! Thank you :)
Super_HippoSuper_Hippo

2019/6/6

Despite the fact that the Highscore table isn't really readable when using Edge. But that problem exists with every size. Maybe I have to manually create the image and give it a Font instead of using the GreenfootImage(String, int, Color, Color) constructor to create the image automatically. Maybe that causes the browser to use a default Font. (Just guessing.)
Super_HippoSuper_Hippo

2019/6/6

Oh, I just noticed I also added a different error to the scoreboard in yesterday's update.
A new version of this scenario was uploaded on 2019-06-06 15:12:12 UTC Fixed Scoreboard (hopefully) Ghosts now change their eyes in the house
Super_HippoSuper_Hippo

2019/6/6

Oh great, it works now. (At least for me using Edge.)
mikmik

2019/6/6

Nice!
Super_HippoSuper_Hippo

2019/6/6

Thank you mik :)
A new version of this scenario was uploaded on 2019-06-08 12:04:41 UTC Fixed a few bugs in the ghost movement
A new version of this scenario was uploaded on 2019-06-08 13:15:06 UTC Pinky now looks up correctly when leaving the house at the beginning. Moved the target tile of the "home" once to the left. This is still not the same as in the original though. Mainly because I am not sure how it actually is in the original. Need to find that out...