µGame – a Python-based handheld game console

Showroom for MicroPython related hardware projects.
Target audience: Users wanting to show off their project!
Post Reply
User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

µGame – a Python-based handheld game console

Post by deshipu » Thu Nov 30, 2017 11:55 pm

I present to you a tiny little handheld game console, which you can program in Python to make your own games: https://hackaday.io/project/27629-game

This is still very much a work in progress, but with the 5th iteration of the prototype I feel confident enough to show it and to ask for feedback. You can read my development logs on the project page.

This is a project that I wanted to make ever since I first saw the PyBoard — unfortunately, at the time I couldn't even afford more than one myself, and the resulting consoles would be quite expensive for a toy. My hopes revived when I heard about the ESP8266 — I immediately started some preliminary tests, and after the Kickstarter, I was sure I was going to do it, even though a lot of things were missing software-wise. I started to slowly push the bits and pieces that I will need — the support for the hardware SPI peripheral, improvements to the framebuf module, etc. I very quickly realized that my goals don't align very well with the goals of the project in general, and the ESP8266 port in particular, and that it will take a really long time to get anything even barely working. So I gave up on the upstream-first approach, and started experimenting on a fork. But the impetus was lost, soon the project was shelved, and I directed my attention to other projects.

But then more ports of MicroPython appeared, and among them the CircuitPython port to Atmel's SAMD21 microcontrollers, which brought the ease of access to the filesystem known from the PyBoard with part prices close to that of the ESP8266. I decided to try and make a shield for the Adafruit's Feather boards, that would let you play simple games on an 8x8 LED matrix — and thus I spent the last year working on the PewPew FeatherWing. While it is potentially a great educational tool, it still needs much more work in terms of community building to actually amount to anything — we will see how that works. But that project also gave me the motivation and the experience to revive my original dream, and try to make a game console with a proper tile and sprite engine. So I started playing with the Adafruit's M0 boards and display modules, initially implementing everything in Python, and then rewriting the critical parts in C for speed. The CircuitPython project merged my patches, and I'm slowly polishing the console prototype into a usable and manufacturable state. I also wrote a couple of simple games and demos, and I'm working on expanding and improving the Python part of the game library. I'm trying to make it generally useful, not just on this one device, but without making it too generic at the cost of performance.

I'm hoping that in a couple of months I will have something that can be actually bought and used by a wider audience, and that there will be other projects using the same game library (not necessarily only for games).

Of course it wouldn't be possible without the great work of Damien, Paul, Scott and Dan, and all the other people in the MicroPython and CircuitPython community — but I hope that a small addition, like the game library I wrote, can bring a whole new audience and new energy into the project.

User avatar
mcauser
Posts: 507
Joined: Mon Jun 15, 2015 8:03 am

Re: µGame – a Python-based handheld game console

Post by mcauser » Fri Dec 01, 2017 3:28 am

Well done! Very nice!
Let us know when it's on your tindie and I'll grab one.
I'll have to start coming up with ideas for ... µGames.

ATSAMD21E - 256KB Flash, 32KB SRAM, 48MHz
ST7735 - 128x160 TFT, 18-bit color

The large black buttons on the V5 red board look much more user friendly than the tiny smd push buttons.
Are they just black covers over the red push buttons?

I'm not sure what they are called, but the pcb buttons on the PocketC.H.I.P. might be another option:
https://getchip.com/pages/pocketchip
Although, you may have to move some components out of the way or move them to the back to make pressing the buttons more comfortable.

Speaking of PocketC.H.I.P. - that row of GPIO pins at the top make it very useful for customisation and tinkering.
Some GPIO / I2C / SPI / UART pins broken out above your TFT would open up your device to 3rd party modules / hacking.

Would be nice to see it inside a polycarbonate case like the Arduboy:
https://arduboy.com/

Does the current version have a coin cell on the back? I saw you've entered the coin-cell-challenge.

shaoziyang
Posts: 363
Joined: Sun Apr 17, 2016 1:55 pm

Re: µGame – a Python-based handheld game console

Post by shaoziyang » Fri Dec 01, 2017 4:33 am

It is great.

User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Re: µGame – a Python-based handheld game console

Post by deshipu » Fri Dec 01, 2017 10:39 am

mcauser wrote:
Fri Dec 01, 2017 3:28 am
Well done! Very nice!
Let us know when it's on your tindie and I'll grab one.
I'll have to start coming up with ideas for ... µGames.
For now, you can build one yourself using a Feather M0 and a display module. But of course it's not as small then.
mcauser wrote:
Fri Dec 01, 2017 3:28 am
The large black buttons on the V5 red board look much more user friendly than the tiny smd push buttons.
Are they just black covers over the red push buttons?
They are special "quiet" buttons that I found on Aliexpress. I think that Pokitto also uses them, judging from the few images available. Using membrane buttons, like all the electronic gadgets around, would certainly make it a few cents cheaper, but then, as you say, I would need to move the components to the back, and I really wanted to keep the back clear.
mcauser wrote:
Fri Dec 01, 2017 3:28 am
Speaking of PocketC.H.I.P. - that row of GPIO pins at the top make it very useful for customisation and tinkering.
Some GPIO / I2C / SPI / UART pins broken out above your TFT would open up your device to 3rd party modules / hacking.

Would be nice to see it inside a polycarbonate case like the Arduboy:
https://arduboy.com/
Well, I used the smallest package of SAMD21, and I only have two or three free pins left, so I decided against breaking out anything. Routing them would also be a challenge with such a dense design. If you want to experiment, it's much easier to just roll your own clone on a larger board or on a breadboard.
mcauser wrote:
Fri Dec 01, 2017 3:28 am
Does the current version have a coin cell on the back? I saw you've entered the coin-cell-challenge.
Yes, it's a LIR2302 rechargeable coin. It doesn't last long and takes ages charging (there is a built-in USB charger), so in the future versions I will probably switch to a standard LiPo battery, and to keep the back clear, put it under the display. But that's all theory for now, we will see how it goes.

User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Re: µGame – a Python-based handheld game console

Post by deshipu » Wed Jan 31, 2018 10:28 pm

I just received 50 assembled devices from the factory, and I'm putting them up on Tindie for anybody who would want to have one.

Post Reply