TinyCircuits Forum

TinyCircuits Products => Thumby => Topic started by: rli on October 17, 2021, 03:06:43 AM

Title: Magic 8-Ball App
Post by: rli on October 17, 2021, 03:06:43 AM
Hacked together a simple app today: https://github.com/raymond-li/thumby_magic_8_ball

Gif of it in action:
(https://raw.githubusercontent.com/raymond-li/thumby_magic_8_ball/main/demo.gif)

Anyone interested can change the sprite and the messages by modifying the code at the top of the file!


I'm unfamiliar with micropython and haven't done very much game programming so I had to spend some time writing code just to test simple functionality I wanted to put in the end product. The lack of feedback when something goes wrong in the emulator forced me to write code and test very incrementally. The sprite also took many iterations to get to something I liked.
Edit: It turns out you can open the Chrome console (Ctrl + Shift + J on Windows/Linux) and get the usual stdout and stderr along with other activity on the page!

You can see a bit of my development process in this version of the code: https://github.com/raymond-li/thumby_magic_8_ball/blob/main/magic_8_ball_dev.py

Attached as well (from commit 1ea840b02a1ef8536832fe7b5a8d0cddd4723378)
Title: Re: Magic 8-Ball App
Post by: Void777 on October 17, 2021, 09:30:38 AM
Sweet App.  I also wanted to thank you for pointing out the Ctrl + Shift + J, its been an absolute lifesaver after about a week of developing my own game and spending hours trying to find  single character errors.
Title: Re: Magic 8-Ball App
Post by: CoolieCoolster on October 17, 2021, 09:36:18 AM
Modified the 8 Ball sprite a bit: