PucMon

Using, learning, programming and modding the Gigatron and anything related.
Forum rules
Be nice. No drama.
at67
Site Admin
Posts: 647
Joined: 14 May 2018, 08:29

Re: PucMon

Post by at67 »

steve wrote: 11 Jul 2020, 15:48 Dear "at67", you really - really - did a GREAT work: I've seen the emulator, then the basic compiler and ... this application that I think is the nicest one so far on Gigatron!!!
Cheers :)
steve wrote: 11 Jul 2020, 15:48 Regarding the implementation I've seen you've followed some nice guide for the AI, anyway if you didn't see there is also a nice video on it: https://www.youtube.com/watch?v=ataGotQ7ir8&t=943s
I hadn't seen this video before, thanks for the link.
steve wrote: 11 Jul 2020, 15:48 I've noticed anyway a little strange behaviour for ghost: when you hit them and they return in the cage they are still blue/scared, while I think normally they would be in their normal non-scared state.
Well spotted, it's probably the main difference between the original ghost AI's and my implementation, but there are many others as well :) Originally I was aiming to implement the ghost AI perfectly, (even the overflow in tracking that causes the ghost targets to offset to the left and top), but I quickly realised that I was going to run out of RAM before I could implement it fully, (this was even before sound effects, scoring and lives had been added). So I had to walk a fine line between trade-offs and a crappy implementation, (the source code has lots of comments in it describing my pain); the following is a short list:

Code: Select all

* Note i, j is in cell space and x, y is in pixel space.

- Ghosts stay in the ghost home when scared until scared mode is over.

- Collision detection between Ghosts and Puc do not use a simple does i == j test, but instead do a
ABS(xy - xy) < 3 test. This means the bug, in the original game, whereby Puc and Ghosts can warp through each other
 is missing.

- Distance calculations are mostly simulated using simple delta i and delta j IF statements instead of using
Taxi-Cab or Cartesian calculations.

- I forgo the random algorithm that ghosts use when they are in scared mode, instead I turn them blue and send them
into scatter mode instead.

- Blinky is missing his Cruise Elroy mode.

- There are no speed variations for Puc himself, i.e. when eating dots or for changing difficulty.

- There are no speed variations for ghosts, except when they are in tunnels or scared mode.

- Missing animation frames when ghosts are in scared mode.

- Missing lost life animation frames for Puc.

- Missing fruit and fruit bonuses.

- More that I have forgotton and would have to check the source code to determine.
There is 12782 bytes free for code, graphics and sound on a 32K RAM Gigatron and Puc's sprite graphics use up more than half of that alone, so I am pretty happy with the way Puc manifested itself.
walter
Site Admin
Posts: 160
Joined: 13 May 2018, 08:00

Re: PucMon

Post by walter »

at67 wrote: 12 Jul 2020, 02:54 There is 12782 bytes free for code, graphics and sound on a 32K RAM Gigatron and Puc's sprite graphics use up more than half of that alone, so I am pretty happy with the way Puc manifested itself.
I have to say I had not noticed these things when playing. Haven't played the original for a long time. So I think the little quirks will only be noticed by people that really know the original game very well.

Interesting stuff nonetheless. Made me waste some time on the history of the game :-)

Here's something to listen to while playing:
https://www.youtube.com/watch?v=OlU60vGRVHc
at67
Site Admin
Posts: 647
Joined: 14 May 2018, 08:29

Re: PucMon

Post by at67 »

walter wrote: 12 Jul 2020, 07:52 Interesting stuff nonetheless. Made me waste some time on the history of the game :-)
I find the development cycle of the original arcade machines fascinating, truly trail blazing pioneers; some of the coding architectures and styles were 10's of years ahead of their time, (they just happened to usually be implemented in assembler).
walter wrote: 12 Jul 2020, 07:52 Here's something to listen to while playing:
https://www.youtube.com/watch?v=OlU60vGRVHc
Very funny, Weird Al is awesome and reading the majority of the comments in the video I completely agree with them

When my kids were much younger, (toddlers), I made them listen to Weird Al so much, that they would walk around the house reciting the lyrics to Yoda, (as best they could), without understanding a word of what they were saying.
steve
Posts: 40
Joined: 08 Jul 2019, 19:40

Re: PucMon

Post by steve »

at67 wrote: 12 Jul 2020, 02:54 Well spotted, it's probably the main difference between the original ghost AI's and my implementation, but there are many others as well :) Originally I was aiming to implement the ghost AI perfectly, (even the overflow in tracking that causes the ghost targets to offset to the left and top), but I quickly realised that I was going to run out of RAM before I could implement it fully, (this was even before sound effects, scoring and lives had been added). So I had to walk a fine line between trade-offs and a crappy implementation, (the source code has lots of comments in it describing my pain); the following is a short list:
I can understand quite well your pain since in one of my last projects I was fitting a complete chess application inside a machine that for the system variables, the heap, the stack, the video memory (!) AND the application just had... 1k!
At the beginning I was just willing to fill in the full FIDE rules and playing a non trivial game, but at the end I was able to put inside even more as for example a little opening movebook!
My experience is that if you look again on your code you can always find something to oprimize even more! It takes time, maybe a lot of time, but it's just a matter of you to say that you're ok with what you reached! ;)
Post Reply