Monster Muncher?

Discussion, Reviews & High-scores

Moderator: Moderators

User avatar
mingle
Vic 20 Hobbyist
Posts: 105
Joined: Sun Sep 25, 2016 2:38 am
Location: Melbourne, Australia

Re: Monster Muncher?

Post by mingle »

AndyH wrote: Thu Sep 12, 2024 11:29 am As I recently did the same for Blue Meanies, I'm picking away at the basic code of this game to see how it works.

I've removed all the integer types except for on the arrays where they do save space, and changed so you can press any key to start a game.

I'll see if I can fix some of the bugs once I'm familiar with it.
Great stuff Andy... I'll also be watching with interest!

Cheers,

Mike.
User avatar
AndyH
Vic 20 Afficionado
Posts: 442
Joined: Thu Jun 17, 2004 5:51 am
Website: https://www.hewco.uk
Location: UK
Occupation: Developer

Re: Monster Muncher?

Post by AndyH »

I'm quite enjoying this exercise. It's evident that Matthew was pretty experienced with BASIC, writing pretty clean code with some good space saving idea on his approach.

I can see there is a check for how many dot's you've eaten and it seems to be way off, maybe by almost 100, which is why you can't complete a level. It just redraws the maze (if it were to work) so acts like losing a life. I should be able to improve on both of these.

There's a reasonable amount of BASIC bytes free after taking into account the variable usage and opportunities to claw back some bytes with some simple changes. In contrast to Blue Meanies from Outerspace, I've yet to come across any hacks or dirty code and I'm impressed at what I've seen so far. I don't expect it to be too much of a headache to fix some of the issues, assuming remaining memory is not an issue.

Notice how the wrap around is aligned, it's how he deals with the movement. For a few hours work it's either he is the genius we've seen from later games, or he's written something similar before and hit and solved some of the problems that this implementation addresses with some simplicity.
mm.png
I've counted the dots. I've gone dot blind. I'll complete a level and see how many it reports...if you feel like counting them too, please let me know :-)
--
AndyH
HEWCO | Vic 20 blog
User avatar
mingle
Vic 20 Hobbyist
Posts: 105
Joined: Sun Sep 25, 2016 2:38 am
Location: Melbourne, Australia

Re: Monster Muncher?

Post by mingle »

AndyH wrote: Sat Sep 14, 2024 5:23 am I've counted the dots. I've gone dot blind. I'll complete a level and see how many it reports...if you feel like counting them too, please let me know :-)
I counted 204 dots and 4 pieces of fruit :-)
User avatar
Mike
Herr VC
Posts: 5132
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Monster Muncher?

Post by Mike »

AndyH wrote:Notice how the wrap around is aligned, it's how he deals with the movement. [...]
FRESSMANN (it's contained in my Unexpanded Games Collection, see the screenshot further down the thread) uses quite the same idea. :)
User avatar
AndyH
Vic 20 Afficionado
Posts: 442
Joined: Thu Jun 17, 2004 5:51 am
Website: https://www.hewco.uk
Location: UK
Occupation: Developer

Re: Monster Muncher?

Post by AndyH »

Ah yes exactly that. Everything in this game is written to minimise the number of basic instructions. I'm out of practice with writing Commodore BASIC programs but picking up a lot of simple ideas I can reuse in the future.
--
AndyH
HEWCO | Vic 20 blog
User avatar
AndyH
Vic 20 Afficionado
Posts: 442
Joined: Thu Jun 17, 2004 5:51 am
Website: https://www.hewco.uk
Location: UK
Occupation: Developer

Re: Monster Muncher?

Post by AndyH »

mingle wrote: Sat Sep 14, 2024 6:08 am
AndyH wrote: Sat Sep 14, 2024 5:23 am I've counted the dots. I've gone dot blind. I'll complete a level and see how many it reports...if you feel like counting them too, please let me know :-)
I counted 204 dots and 4 pieces of fruit :-)
Thank you. That looks like what I came up to. I'll try it out when I test. I've still got some lines to get through and I wonder if power pills and if ghosts are counted in some quantity as the target to complete a screen is currently closer to 300.
--
AndyH
HEWCO | Vic 20 blog
User avatar
AndyH
Vic 20 Afficionado
Posts: 442
Joined: Thu Jun 17, 2004 5:51 am
Website: https://www.hewco.uk
Location: UK
Occupation: Developer

Re: Monster Muncher?

Post by AndyH »

Analysed the code.

The bug where a duplicate pacman character is left on the screen happens because the way the ghosts move, pacman moves and then a ghost collision check is made. If the ghost moves then pacman moves they can skip each other. the ghost survives but it thinks it was on top of pacman and restores that character when it next moves. There is a simple fix for this.

There is a bug (possibly due to pacman and ghosts moving over dots and not restoring them) where once you have eaten all the dots you are short of the total needed. There is a check for eating all the dots and restarting the level, and I think Matthew likely knew of the bug and decided to make it impossible to win a maze by setting the dot count too high rather than spend more time on the game.

The pacman in the bottom right is a level counter, but it will only ever show one pacman and I suspect due to the above issue. Once that issue is resolved I can correct this.

It should be possible to allow pacman to restart when caught by a ghost without resetting the maze back to the start state, and leaving the dots eaten intact. I suspect Matthew could have decided to redraw the maze and dots again for the above issue and allow you to play longer, less likely to be left with an empty maze.

There is a bug where pacman scores twice for each dot eaten because a loop goes to the wrong spot. You hear the dot eating noise twice and get two lots of 10 points (20 in total). This is a simple fix and speeds up the game slightly.


If I can find and fix the cause of the discrepancy for the dot counter I should be able to fix the game to allow you to complete a level.
--
AndyH
HEWCO | Vic 20 blog
User avatar
AndyH
Vic 20 Afficionado
Posts: 442
Joined: Thu Jun 17, 2004 5:51 am
Website: https://www.hewco.uk
Location: UK
Occupation: Developer

Re: Monster Muncher?

Post by AndyH »

Started some of the fixes. Found one possibility for the eating dots counter being out, it's likely when a ghost is on top of a dot and you eat it, there's no condition to capture that.
--
AndyH
HEWCO | Vic 20 blog
User avatar
AndyH
Vic 20 Afficionado
Posts: 442
Joined: Thu Jun 17, 2004 5:51 am
Website: https://www.hewco.uk
Location: UK
Occupation: Developer

Re: Monster Muncher?

Post by AndyH »

The first problem is fixed, can complete a maze now.



I've split the game into two parts, with the first part loading the custom characters. As this was a common practice I don't think it is out of place and gives me a good chunk of memory for further fixes and improvements.
--
AndyH
HEWCO | Vic 20 blog
User avatar
tokra
Vic 20 Scientist
Posts: 1185
Joined: Tue Apr 27, 2010 5:32 pm
Location: Scheessel, Germany

Re: Monster Muncher?

Post by tokra »

Don't forget to delete line 10 with the POKE51,x:POKE52,y - this is totally superflous as mentioned in another thread.
User avatar
AndyH
Vic 20 Afficionado
Posts: 442
Joined: Thu Jun 17, 2004 5:51 am
Website: https://www.hewco.uk
Location: UK
Occupation: Developer

Re: Monster Muncher?

Post by AndyH »

Thanks tokra, that'll save some bytes too.
--
AndyH
HEWCO | Vic 20 blog
User avatar
fgasking
Vic 20 Devotee
Posts: 236
Joined: Sun Feb 06, 2005 7:53 am

Re: Monster Muncher?

Post by fgasking »

Andy, just catching up on your updates and exploration and this is fantastic to see! Thank you so much for taking a look at the game and looking to fix it. :)
User avatar
AndyH
Vic 20 Afficionado
Posts: 442
Joined: Thu Jun 17, 2004 5:51 am
Website: https://www.hewco.uk
Location: UK
Occupation: Developer

Re: Monster Muncher?

Post by AndyH »

I have a version to test if anyone is interested in giving it a try. There was a bug where the number of dots eaten was coming out one or two dots short. I think I've fixed that and haven't been able to replicate it recently. I've left a feature in where as a powered up muncher you can sometimes move through a monster that is also moving that loop. There's room for the code to be optimised further to free up some space, but I won't be correcting that now.

Download the version to test:
mmuncher.zip
(6.31 KiB) Downloaded 166 times

CHANGES

- Game split into two parts to allow all of the enhancements.
- It is now possible to complete a maze
- Bug where muncher will eat a dot twice when not powered up
- More sounds and a starting jingle has been added
- It is no longer possible to eat respawned monsters
- Improved how monsters move around the maze
- Closed the monster 'home' so they don't get stuck inside
- Fixed monsters leaving an image of the muncher instead of a space
- Reduced time the Bonus Apples are active. Decreases with each level
- Dot no longer 'lost' when eating a monster who is on top of one
- Monsters will now change direction and run away when you eat a power apple
- Can see last score on game over, and score will reset to 0
- Monsters won't respawn when gobbled until the effect of the bonus apple runs out
- A monster can now get you if it moves into you (as opposed to you moving into the monster)
--
AndyH
HEWCO | Vic 20 blog
User avatar
AndyH
Vic 20 Afficionado
Posts: 442
Joined: Thu Jun 17, 2004 5:51 am
Website: https://www.hewco.uk
Location: UK
Occupation: Developer

Re: Monster Muncher?

Post by AndyH »

Oh, and I did my best to replicate the jingle from the Atari 2600 pacman game, yes I know it sounds more like the Intel jingle! ;)
--
AndyH
HEWCO | Vic 20 blog
User avatar
Rich
Vic 20 Enthusiast
Posts: 176
Joined: Mon Nov 29, 2021 4:15 pm

Re: Monster Muncher?

Post by Rich »

Well done AndyH !! I`ll have a play later on :D Just got my teeth into a Sinlair QL i`ve required..........
Post Reply