New version of PacMan (PuckMan) for the BBC Micro

developing/porting a new game or gaming framework? post in here!

Should I keep full Res' or go 3/4 to simulate 60fps?

Stick with full resolution
18
78%
Reduce to 3/4 resolution
5
22%
 
Total votes: 23

User avatar
tricky
Posts: 7695
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: New version of PacMan (PuckMan) for the BBC Micro

Post by tricky »

I would like to get Pacman's dying animation, but to align properly will take a lot of space.
Added pacman dying animation, had to trim a couple of pixels here and there. 766 byte remaining.

It would be nice to get some sort of intermission animation with a tune.
Tune in, need to add some animation, 492 bytes remaining.

The half dots are a pain to fix but would be nice to fix. (half fix for when dying added)

Pacman can still cause the lines in the energisers, as do reversing ghosts.

I would also like to get some better sound effects, but I don't know where from.
User avatar
tricky
Posts: 7695
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: New version of PacMan (PuckMan) for the BBC Micro

Post by tricky »

Fixed going Elroy while blue, but there is still a time when one of the other ghosts can get the wrong speed.
Please let me know if you notice it happening and what happened immediately before it.
490 bytes remaining.
Attachments
PacMan.ssd
(14.5 KiB) Downloaded 90 times
User avatar
Arcadian
Site Admin
Posts: 4223
Joined: Fri Nov 24, 2000 12:16 pm
Contact:

Re: New version of PacMan (PuckMan) for the BBC Micro

Post by Arcadian »

Played for a couple of hours this morning, so crashes or major issues to report, just the half dots and power pill glitches you're obviously aware of (sorry I wasn't keeping an eye out for the speed issue you mention as I hadn't read your post until just now - I was using the version you sent me yesterday).

Fruits (or in this case, the key) will overlap existing fruits when you've already filled the stack, but I'm pretty sure you've said you're already aware of this:

Pacman1.png

I also noticed that the fruit at the end of the corridor had been overwritten, so I played a new game to see how this happened.

If Pacman is the first to walk through the tunnel after the fruit appears, then he will take a little chunk out of the fruit:

Pacman2a.png

Then if a ghost walks through the tunnel, it takes a big chunk out of the fruit:

Pacman2b.png
Please subscribe to the ABug YouTube channel!
User avatar
tricky
Posts: 7695
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: New version of PacMan (PuckMan) for the BBC Micro

Post by tricky »

Thank you very much for the very extended play test, hopefully it was fun, obviously I can't take the credit if it is as I could only stop the original from being fun!
Wow, I didn't think anyone would need the extra digit in the score, but now I'm glad that I added it! And you still had a spare life.
I have had a thought how I can add a basic version of the eyes, but I'm not sure if they can follow the maze as I don't know if there is somewhere they might get stuck (I could just try all places and see if they work!).
I hadn't thought about the tunnel being a problem for the fruit :(
I like how far PacMan and the ghosts go into the tunnel, so I might split the fruits to skip the tunnel and go on both sides.
The arcade only shows the last seven, but I like the idea of filling the screen border with fruit.
User avatar
tricky
Posts: 7695
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: New version of PacMan (PuckMan) for the BBC Micro

Post by tricky »

Added intermission. 181 bytes of main memory, plus 15 and 52 byte chunks, 55 bytes of ZP and 3 bytes of stack remaining!

Z,X, /, : and RETURN to start, FIRE to enable joystick.

There is still a bug where one of the ghosts goes faster than the others and it doesn't seem to be because of Elroy.
I have noticed that it is possible to erase part of the maze in the bottom right hand corner, but haven't seen it happen.
The game seems to have a non-predictable random element that shouldn't be there.
I'll start recording my games so that I can try to spot the cause of these bugs.

I don't think that there is room for much more than bug fixes, but please let me know if there is anything that you think should be changed.
I know Arcadian would really like me to get the eyes in, but I don't think that there is room (or that I have the enthusiasm).

PS I did actually sit down today to add the eyes, not the intermission, but got distracted!
Attachments
PacMan.ssd
(14.75 KiB) Downloaded 87 times
User avatar
tricky
Posts: 7695
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: New version of PacMan (PuckMan) for the BBC Micro

Post by tricky »

Fix Elroy never scatters, an Elroy speed-up bug and dots left after intermission.
There is still at least one ghost speed bug that I haven't found the cause of.
There may still be other bugs that I haven't seen. 151 bytes remaining.
Attachments
PacMan.ssd
(16 KiB) Downloaded 84 times
User avatar
tricky
Posts: 7695
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: New version of PacMan (PuckMan) for the BBC Micro

Post by tricky »

I've just uploaded a video of Pac Man with a little commentary captured from my beeb using one of Hoglet's excellent PI RGB2HDMI and an Elgato HD60.

URL:https://youtu.be/Ef731FI_LZ0 View at 720p+ for 50hz.
User avatar
Iapetus
Posts: 81
Joined: Wed Feb 12, 2014 1:08 pm
Contact:

Re: New version of PacMan (PuckMan) for the BBC Micro

Post by Iapetus »

Super game, this is a winner!
User avatar
tricky
Posts: 7695
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: New version of PacMan (PuckMan) for the BBC Micro

Post by tricky »

Thanks, I'm really pleased with how it has turned out.
User avatar
fwibbler
Posts: 763
Joined: Thu Jan 13, 2005 10:37 pm
Location: Essex
Contact:

Re: New version of PacMan (PuckMan) for the BBC Micro

Post by fwibbler »

This really plays nicely now.
Thanks for this one Tricky.

Would you regard this as finished now?
User avatar
oss003
Posts: 3849
Joined: Tue Jul 14, 2009 12:57 pm
Location: Netherlands
Contact:

Re: New version of PacMan (PuckMan) for the BBC Micro

Post by oss003 »

Great game Tricky .... didn't get as far as Arcadian but no bugs or glitches ...
Nice ....

Is it an idea to reverse the direction of the ghosts after eating a powerpill?
In the original game, the ghost are running away from you if you eat a powerpill.

Greetings
Kees
User avatar
tricky
Posts: 7695
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: New version of PacMan (PuckMan) for the BBC Micro

Post by tricky »

Pretty much, but I do expect that there may still be some minor bugs!
Probably something meaning that isn't perfectly reproducible meaning that patterns do't work as expected.
There are probably a few minor graphical glitches left too.
I don't think that there is room to add another feature, but hopefully enough for bug fixes.
I made a tiny fix to timing this morning, but I doub't that anyone could spot the difference but it might make up to a second difference on the length of time a fruit is on screen. Fruit has a 10 second timeout (11 actually) but the current second (1.1 second) continues, so it is "randomly" less than 10 seconds (same as arcade).

I thought I had all the reverses in the right place, but I think you are right because after a while there is no blue period, but the ghosts should still reverse. I'll check.
Attachments
PacMan.ssd
(16 KiB) Downloaded 68 times
User avatar
oss003
Posts: 3849
Joined: Tue Jul 14, 2009 12:57 pm
Location: Netherlands
Contact:

Re: New version of PacMan (PuckMan) for the BBC Micro

Post by oss003 »

I also found an interesting article about someone writing Pacman in AGD.
Also ghost behaviour is included.

https://pacmanzxspectrum.blogspot.com/p ... iones.html

Greetings
Kees
User avatar
tricky
Posts: 7695
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: New version of PacMan (PuckMan) for the BBC Micro

Post by tricky »

Ghosts now reverse when eating energiser (well, soon after like the arcade game).
PacMan.ssd
(16 KiB) Downloaded 72 times
PS I think that I might have the ghost AI mixed up!
User avatar
fwibbler
Posts: 763
Joined: Thu Jan 13, 2005 10:37 pm
Location: Essex
Contact:

Re: New version of PacMan (PuckMan) for the BBC Micro

Post by fwibbler »

Just noticed that the ssd. you've posted doesn't run the 'LOADER' file when you shift-break-shift but instead it *RUN's the 'GAME' file.

Also discovered that the game works in the BeebEM 4.15 (which I think is a beta version).

And finally, neither of the 2 BBC emulators for RISC OS work with it.
I'll have a look and see what other recent offerings they fail on...
User avatar
Arcadian
Site Admin
Posts: 4223
Joined: Fri Nov 24, 2000 12:16 pm
Contact:

Re: New version of PacMan (PuckMan) for the BBC Micro

Post by Arcadian »

Enjoyed playing the latest version using the B2 emulator (and made extensive use of save states might I add!).

Found some new issues ...
  • I'd filled the fruit stack half-way up the left-hand side. When I collected the next bell, the third digit (from the right) in the score would temporarily corrupt before fixing itself on the next score update:

    Pacman201207_Scr1a.png

    So I reverted to the previous save state, and found the score corruption was repeatable by collecting the bell again:

    Pacman201207_Scr1b.png

    I then reverted back to the previous save state again, and avoided collecting any more bells on the level. The following level featured the key - when I collected the first key, there was no score corruption. So this suggests the issue might specifically be related to the bell (as opposed to happening whenever you collect half a column's worth of fruit on the left hand side):

    Pacman201207_Scr2.png

  • I noticed a tiny chunk of maze disappeared in the bottom left corner when Pacman walloped a ghost (on a powerpill) whilst passing. I reverted to the previous save state and found I was able to repeat it:

    Pacman201207_Scr3.png

    I did try to repeat this once on the opposite side of the maze unsuccessfully - but maybe I didn't quite catch the ghost in the right place.

  • Don't know if this was a coincidence, possibly not, but after the left hand column had been filled with fruit, I found a major problem in the game: when you collect a power pill, most/all of the ghosts will freeze after they've turned blue - and will stay blue unless you wallop them (in which case they'll return to the maze and respawn as a regular ghost). One of the blue ghosts may 'release' itself on its own.

    Here's some video of the problem - https://youtu.be/Vpbrs6wfb54 (oh, you'll notice I'm playing at 1.25x speed!)

    I was able to repeat this (after returning to a previous save-state) so it wasn't a one-off. The issue fixed itself on the next level but on the level after that - and all subsequent levels - the same would happen after I ate the first powerpill.

    I (twice) tried completing a level at a point where all ghosts were operating 'normally' (to see if that would fix the problem) but no such luck.

  • Finally, as happened previously, after you've filled the left column with fruits/bonus objects, the next object (on this build of the game, the 25th object) will still overwrite the first fruit at the bottom of the right hand column:

    Pacman201207_Scr4.png

    The temporary score corruption in the third from right digit also occured again around the 148x00 mark.

Question about the ghosts and the fruit - whilst playing I initially noticed that ghosts would effectively 'eat' the fruit (causing it to disappear) when they passed over it. But then I noticed ghosts passing over fruits and leaving them in tact. How has it been designed to work?
Please subscribe to the ABug YouTube channel!
User avatar
ash73
Posts: 223
Joined: Wed Feb 03, 2016 10:51 pm
Location: Cheshire, UK
Contact:

Re: New version of PacMan (PuckMan) for the BBC Micro

Post by ash73 »

Looks very nice but I don't know what the keys are and I can't get him to do anything. And it says game over all the time.

Had a go on your space invaders game the other day, it's brilliant... very smooth and zero flicker. This looks just as good! =D>
User avatar
tricky
Posts: 7695
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: New version of PacMan (PuckMan) for the BBC Micro

Post by tricky »

Thanks.
Z, X, /, ; and RETURN or FIRE to start.
FIRE enables the joystick, but keys will still work too.
User avatar
tricky
Posts: 7695
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: New version of PacMan (PuckMan) for the BBC Micro

Post by tricky »

Wow Dave, that's some dedication :)
I don't suppose you have the b2 save states, although I would need to learn its debugger.

I wonder if one or two of the digits have been corrupted - this would be very hard to find without a debugger that supports forward and reverse. If it is just when it draws the bell, that should be easy to debug.

The missing pixels might be due to clearing the ghost by clearing the 16x16 pixel area where they are, but should really use the mask that I use to draw them.

The fruit should be bitwise ORed with the background, so yellow will still be yellow when mixed with a ghost, but the other colours will depend on the combination at each pixel. It is the same as the key being ORed with the cherries. The idea is that it is trying to show both without another big chunk of memory and more code (but has to draw the ghost first).

I didn't expect anyone to collect more than 24 fruit, but at least you can still tell how many you did collect if you do. I can change this and erase the previous one fairly cheaply I think.

I'll check the ghost speeds code, but it should be use a table for the first 21 levels and then sticking with the values for level 21 for as long as you play. The speed for blue does go to 0 on level 17 and 19+, which could cause this, but I thought that I had checked that code! The timer for how long they are blue should also be 0, meaning that they don't actually go blue, they just reverse direction.
User avatar
tricky
Posts: 7695
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: New version of PacMan (PuckMan) for the BBC Micro

Post by tricky »

I can't find the cause of the score or ghosts getting stuck, but I think something must have scribbled on some memory :(
This could cause the score bug and stuck ghosts.

I did find a bug on level 17, where although the ghosts wouldn't have turned blue, they would still have been edible!

I'm going to need a way to record the game and play it back in a debugger.
I think MAME can do this and maybe b2.

I haven't looked at the missing dots yet - I think they can only happen to those two dots in a corner, so won't break the game, although I will fix them.
Attachments
PacMan.ssd
(16 KiB) Downloaded 69 times
User avatar
Arcadian
Site Admin
Posts: 4223
Joined: Fri Nov 24, 2000 12:16 pm
Contact:

Re: New version of PacMan (PuckMan) for the BBC Micro

Post by Arcadian »

No, unfortunately B2 doesn't appear to retain save states once you close a session from what I can tell.

I've tried the new build and found the same problem exists with the score corruption, but have done some more "investigation" ... I don't know if any of this helps?!

If, when the third digit from the right in the score is either 2, 3, 4 or 5 when you collect the bell (worth 4400 pts), the score will quite happily advance to xx6xx, xx7xx, xx8xx or xx9xx respectively, without corruption.

But the corruption /will/ occur if the third digit is either 6, 7, 8 or 9 when you collect the bell.

I can't tell you what happens if the dodgy digit is either 0 or 1, as the bell evidently refuses to appear if the current score contains either xx0xx or xx1xx.
Please subscribe to the ABug YouTube channel!
User avatar
Arcadian
Site Admin
Posts: 4223
Joined: Fri Nov 24, 2000 12:16 pm
Contact:

Re: New version of PacMan (PuckMan) for the BBC Micro

Post by Arcadian »

I've played a little further, and no signs of the ghosts bug on the new build, or at least not on this try (or rather, tries - as I'd keep going back to save states to repeat).

One thing that did happen - on a level around 150,000 pts (with four keys stacked up, overwriting the fruits on the right hand column) I found that eating any of the power pills wouldn't turn the ghosts blue or play the normal sound effect (though eating a power pill would have the effect of 'reversing' the ghosts so they run away). On the subsequent two levels, the powerpills were back to making the ghosts vulnerable for a very brief amount of time, then on the following two levels the powerpills were back to causing the ghosts to reverse and nothing else. I don't know if this is intentional?
Please subscribe to the ABug YouTube channel!
User avatar
ash73
Posts: 223
Joined: Wed Feb 03, 2016 10:51 pm
Location: Cheshire, UK
Contact:

Re: New version of PacMan (PuckMan) for the BBC Micro

Post by ash73 »

tricky wrote: Tue Dec 08, 2020 5:00 pm Thanks.
Z, X, /, ; and RETURN or FIRE to start.
FIRE enables the joystick, but keys will still work too.
Thanks, just needed to press ENTER and we're away. Looks super slick and plays very well!

I like the high res graphics and the dithering on the ghosts to get more colours, looks really professional.
oe7twj
Posts: 23
Joined: Fri Dec 04, 2020 4:25 pm
Location: Austria
Contact:

Re: New version of PacMan (PuckMan) for the BBC Micro

Post by oe7twj »

It looks very nice. :)

And your Moonbuggy, have tested it yesterday, it is great. Better than all finished versions I saw. The feeling is like this original arcade version.
User avatar
tricky
Posts: 7695
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: New version of PacMan (PuckMan) for the BBC Micro

Post by tricky »

Thanks everyone.
ash73, as you can probably tell, I'm a big fan of MODE 1 to give the correct resolution and movement.
oe7twj, If you have a NuLA, or run in the NuLA version of b-em, you should get the Moon Patrol arcade colours, well, most of them.
Arcadian, level 17 and level 19+ don't turn blue, they only reverse direction at least in the arcade anyway.
The fruit appears when a certain number of dots have been eaten, 70 and 170 iirc, so from a given point, you would have to try hard to engineer those numbers. I am hoping to get some time tonight to try to record and reproduce the bug in MAME so that I can replay and debug it (I just don't get on with the b2 UI). I'm hoping to be able to reuse the replay to test any fixes - I just have to remember how to run an SSD and how to exit!
I have no idea what could be causing the corrupt digits, especially if it is only temporary, nor why the initial value would make a difference.
User avatar
ash73
Posts: 223
Joined: Wed Feb 03, 2016 10:51 pm
Location: Cheshire, UK
Contact:

Re: New version of PacMan (PuckMan) for the BBC Micro

Post by ash73 »

Just been testing this and the original Snapper back-to-back and yours is MUCH better! Really slick.

One little feature I do quite like in the original is the ghost's eyes making their way back to base.
User avatar
tricky
Posts: 7695
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: New version of PacMan (PuckMan) for the BBC Micro

Post by tricky »

You and Arcadian :)
It was down to the intermission or the eyes and I chose the intermission because I liked the tune, not because
I was just too lazy :^o
User avatar
ash73
Posts: 223
Joined: Wed Feb 03, 2016 10:51 pm
Location: Cheshire, UK
Contact:

Re: New version of PacMan (PuckMan) for the BBC Micro

Post by ash73 »

This is way too addictive, and the ghosts seem quite clever, they're good at boxing me in... or I'm just rubbish.
User avatar
tricky
Posts: 7695
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: New version of PacMan (PuckMan) for the BBC Micro

Post by tricky »

The Pac-Man Dossier: https://pacman.holenet.info/ explains the ghost behaviour and the other aspects of the game including the four no entries for ghosts, which make the game a little easier. It's not really a spoiler, but it does take some of the magic away.
User avatar
tricky
Posts: 7695
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: New version of PacMan (PuckMan) for the BBC Micro

Post by tricky »

Fixed the score corruption with fruit worth 1,000 or more.

One ghost still speeds up sometimes when blue - this may become a "feature"!

Can still erase a couple of pixels on the inside of a corner - just needs time, code and about 120 bytes.

I may add erasing the previous fruit on the border of the maze if people prefer it. should only be 40-50 bytes.

139 bytes free, but I haven't got desperate enough to start reworking things.
Attachments
PacManScoreFix.ssd
(16 KiB) Downloaded 56 times
Post Reply

Return to “new projects in development: games”