A pac man clone ported from the attinyarcade -- By andy_j_000

A PAC-MAN clone ported from the AttinyArcade

Author :  andy_j_000

PAK-MAN is a clone of the classic PAC-MAN game, originally designed for the Attiny Arcade (check out www.webboggles.com for info on that), ported to the Gamebuino classic / MAKERbuino platform. 

The original screen size is 128x64 so the visible playing area scrolls around. The code is designed to make it easy to change the maze layout, so you can try your own (I used Windows Paint to draw the one in the game, but any other drawing package should do the trick). 

See more
Author :  jicehel

I'll try it this evening on my Makerbuino  ;)  You should buy a META too, nice to play it in colors too and you seems good in programmation. Maybe it's could be fine to split the source into parts by activity (Ghosts, Player, Graphics, etc ...). The only things to do to avoid problem if you do is to add and include .h files 

Author :  jicehel

What will be next target to port for gamebuino ? UFO or Tetris ?  Gloups i have my Meta, but i don't find my Makerbuino atm. Sorry will have to test it later...

Author :  jicehel

As i couldn't try on my console, i have try to port it on Meta, but you use specific instruction (low level) and use buffers and direct access to memory. I can't port it, i have hard fault as i expected when i saw your source. Pityit should be fine, so i have to wait to find my old console now for test  :(

Author :  andy_j_000

Hiya, sorry it's been hard to port across. Of course, the code was designed for a very different platform, but I'd like to try to get it working on the Meta (and I'm planning to buy one next month so I can..).  I did try to use the libraries for the gamebuino, but found that I couldn't get the sounds I wanted with the gamebuino audio functions (the shortest sound created by gb.sound.playNote() seems much too long for what I need, and I couldn't find another way of making bespoke tones?), so in the end, I used the same approach as for the AttinyArcade by writing directly to the output pin - which works fine on the MAKERbuino, but does nothing on an emulator..

Did you get it working ok on your MAKERbuino? I hope so. 

I've ported Frogger across too (it's here: https://github.com/andyhighnumber/Attiny-Arduino-Games/tree/master/Frogger_MAKERbuino) and thinking about what to do next. Maybe UFO or stacker (there's already a nice tetris port for MAKERbuino), so that's lower priority - I started porting PAC-MAN before spotting that someone else had done that too, although the other game (PAQ-MAN) is a bit different to mine in terms of gameplay, so I hope it was still worth having both...

Author :  jicehel

Sure, i have ported the Pacman of Yoda on the Meta as atm there is none but it's cool to have choice of the version.

I haven't test yest on my Makerbuino as i have to find where me or children have put it in the house, first... (was not expected to have to search it ...)

For sounds on Makerbuino, have a look on Yoda's Paqman code. His code is very well documented (so it was easy for me to port it on Meta).

You can try to make it with standart instructions of the 'legacy' gamebuino with his code, if you want. (He already have coded the soundfx so if you have difficulty to find your own sounds with sound tool, you can always use his own to complete your game).

Author :  Sorunome

I just tested it and it plays quite well! A suggestion might be to downscale the graphics and somehow fit the entire map on the screen, but it's not really needed, it already plays great!

Author :  andy_j_000

Thank you :) 

My thinking was that, now the scrolling is working ok, I can upsize the map to something closer to the original PAC-MAN screen (when I get time!). Getting the scrolling to work was an interesting challenge (at least vertically, where I'm writing to the screen a byte at a time in horizontal stripes, so there's a lot of bit-shifting to be done!).