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.
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?
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.
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.
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).
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...
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?
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.
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.
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.)
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?
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.
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.)
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...
2017/6/12
2017/6/12
2017/6/15
2017/6/15
2017/6/15
2017/6/15
2017/6/15
2017/6/15
2017/6/15
2017/6/15
2017/6/16
2017/7/15
2017/7/15
2017/7/16
2017/7/16
2017/7/17
2017/7/27
2017/7/27
2017/7/27
2017/8/20
2017/8/20
2017/8/30
2017/9/7
2017/9/7
2017/9/7
2017/9/7
2018/7/23
2018/7/23
2018/7/23
2018/7/23
2019/6/5
2019/6/6
2019/6/6
2019/6/6
2019/6/6
2019/6/6
2019/6/6
2019/6/6