Phobos - gameboy style hand held game

So after making the Laser Target game (shown here) I wanted to move onto something I've been wanting to make for a while. And so I did:

I LOVE old platformers. Grew up on them - stuff like Commander Keen, Crystal Caves and Captain Comic. I also played heaps of gameboy games too - most of which where again platformers. So why not build my own? Sorry for my terrible camera, and terrible camera skills but for those interested here are two videos. The first is an overview of the hardware side of things, the second about the code.

Hardware Intro: Phobos arduino gameboy style prototype intro - YouTube
Software Intro: Phobos code overview - YouTube

The LCD is quite hard to see in the video, in reality while it does have some blur when your running, it's MUCH easier to see compared to what youtube shows.

Since my Duemilanove board is still connected to the laser game (and will be for a while since I still enjoying playing with that) I decided to buy a new chip. This time I went with the Teensy 3.0 for a few reason. First it's 3.3v the same as the LCD so I didn't need to muck round with any logic level converters. Secondly it has 132k flash memory which is way higher than standard Arduino boards. Right now I'm only using 20k of the 132k but it does mean I can (and hopefully will) add 5 more levels to the game. In future if I also want to go to a colour LCD it gives me enough room to store full RGB sprites/levels - something you'd struggle to do with the 30k of an Arduino Fio. It worked really well so for this application I'm quite happy with it.

Overall the game code took about 2 evenings to complete (and then another week of me tweaking the levels). The hardware side took me a weekend of tinkering to get the LCD working and figure out the best way to setup that system. It's all pretty simple stuff, but since I'm new to hardware it was still a great thrill to get it all working.

(PS. I have also seen the Arduino Esplora, but that would've made things just a little TOO easy. While I'm bad at soldering and so forth I enjoy the challenge so I decided to go with the my own setup.)

Great work mate! Looking good with the red'ish design :)! I had a similar idea once upon a time (not the game, but the actual method of using the PC to code/debug a whole game and then just simply port over the code by copy, pasting and filling in the gaps of course)! You didn't post your code, so I'm going have to bother you with a couple of questions =P! How will this run on an UNO? Will it fit and how will the performance be?


How will this run on an UNO? Will it fit and how will the performance be?

I assume it’d run fine on an Uno, but since I don’t have one to test on that’s basically just a guess. Still the game code is specifically as simple as possible (doesn’t even use any floats etc) so it should run pretty well on most Arduino’s. I wasn’t actually planning to run it on the Teensy until I found out about the 3.3v setup for the LCD and decided to look for a matching board.

As for the size - it will definitely fit. I just built the code after select the UNO board and the Arduino IDE said:

Binary sketch size: 8,146 bytes (of a 32,256 byte maximum)

So it’ll fit no problem. That version has a level that’s 256 map tiles long. Each “tile” is 6 pixels so that’s about 18 screens worth (or 1,536 pixels long). Considering how much space is left you could probably triple that before running out of space. Interesting when building for the teensy it comes out at:

Binary sketch size: 18,172 bytes (of a 131,072 byte maximum)

So it’s about 10k larger. I’m assuming that’s because it’s a 32bit chip so “int” is 4 bytes and so forth.

If anyone is genuinely interested in the code I could try to get it to a readable state and post it. Have to go through and remove all my horrible red-herring functions like lcdSetup() and lcdSetupTest() and lcdSetup2() haha, but it wouldn’t be that hard and it’s something I should do anyway. In 6 months time I’ll have no memory of how it originally worked if I don’t.