Thumbox
A drop-in Pygame emulator for your Thumby game/app
What is Thumbox?
Thumbox is designed to aid game devs in distributing their thumby games on Thumby, as well as on Steam. It is a drop-in emulator for your game, which allows you to test your game on your PC.
Requirements
Major requirements are
- Python 3
- Pygame
- numpy
How do I use it?
- Download
thumbox.py
andfont5x7.bin
from this repo - Place them in the same directory as your
game.py
a. If you don't have your game downloaded yet, create agame.py
file and copy the code from the online emulator into the file. - Monkey-patch your game to use Thumbox insead of Thumby, like so:
# imports...
import thumbox
# Create the Emulator object
thumby = thumbox.Thumby()
graphics = thumby.graphics
button = thumby.button
micropython = thumbox.Micropython()
time = thumbox.Time()
# rest of monkey-patching
...
# rest of code
To see a full example, check out the example.py
game in this folder.
Compiling your game
After you've monkey-patched your game and confirmed you can run it through Python, you can compile it into a standalone executable. To do this, you'll need to install pyinstaller
and run the following command:
- Windows
pyinstaller example.py --onefile --add-data font5x7.bin;.
Replace example.py
with the name of your game file.
Contributing
We are in development and really need contributors to reach 100% completion. Feel free to reach out to me on Github or make a PR