I don't remember the exact date, but a friend showed me, recently, a youtube video of someone showcasing the Thumby, which claims to be the world's smallest game console, with a whopping 29mm of size on the largest size, the little thing seems pretty well built, and in the video, the youtuber showed that TinyCircuits, the company who makes the Thumby has a pretty good dev enviroment for it, support to code games in microPython, a c++ arduino library and even a blockly editor. So, obviously that got my attention as in, can i make something for it? And since i've been wanting to get more practice in Python, why not? Thus, Tinynvaders was born.
Considering the Thumby only has a 70x40 monochrome display and monophonic sounds, it's not exactly a game that will blow anyones mind, its a simple infinite, horizontal shooting game, nothing to really write home about, except, that is exactly what i am doing here, right?
I started by taking a look at the simple, but effective micropython API that is loaded into the Thumby, and within minutes i had something working, displaying a simple graphic. From there it was basically building up to a game. The main gameplay is simple, you avoid being shot and you shoot the enemies. You can only move up/down and you can also load up a shield, if you kill 5 enemies. You can't accumulate shields, however.
Below is a code example, for my player control routine.
if thumby.buttonU.pressed(): if playery > bordert: playery -= 1 playeranim += 1 #EndIf #EndIf if thumby.buttonD.pressed(): if playery < borderb: playery += 1 playeranim += 1 #EndIf #EndIf if thumby.buttonA.justPressed(): if playercs == 0: thumby.audio.play(440, 100) playercs = 1 playersx = 3 playersy = playery #EndIf #EndIf if thumby.buttonB.justPressed(): if playershieldstock == 1: playershieldstock = 0 playershield = 1 thumby.audio.play(250, 50) #EndIf #EndIf #EndDef
As you can see, the micropython API is very simple to use, and it doesn't take long to get something simple running on the device.
The graphics are built inside the dev enviroment, which is all browser based, so getting up and running takes literally no time.
The whole game is on my github page here: --https://github.com/jflores82/TinyCircuits-Thumby-Games-- and you can check out more about Thumby at --thumby.us--
This has been a fun little project, and i might even try more little thumby games in the future, especially if i manage to get my hands on the real hardware, who knows?