Back

Show HN: TinyCity – A tiny city SIM for MicroPython (Thumby micro console)

142 points23 daysgithub.com
allanrbo23 days ago

SIM=subscriber identity module. sim=simulator. :-)

inflam5223 days ago

I originally had sim but HN autocorrected it. I tried to edit it back to what I had but can't seem to now.

oakwhiz22 days ago

HN's autocorrect seems to cause more trouble than it's worth.

inflam5222 days ago

definitely agree

_joel23 days ago

I hope it "Reticulates Tiny Splines" (good work btw)

inflam5223 days ago

Haha thanks! Definitely adding that during map generation in next release.

gaudystead23 days ago

I literally JUST bought a Thumby out of a vending machine this past weekend, so this post feels a bit serendipitous for me. Thanks for sharing, and I'll have to check this out!

inflam5223 days ago

Congrats! Unplayable by most means but absolutely incredible how tiny it is so I love it.

JKCalhoun23 days ago

Is it using the 1.3-inch monochrome OLED display of the Arduboy or something smaller? (Guessing the 72 × 40 display of the Thumby?)

inflam5223 days ago

This is for 72×40 display right now but I was also working on an interface layer to abstract Thumby specific functionality in order to play on potentially other platforms running MicroPython/Python. Going to try and add that in the next iteration.

westurner22 days ago

There are a number of MakeCode-compatible devices with and without Microbit https://arcade.makecode.com/arcade-devices

bbcmicrobit/micropython: https://github.com/bbcmicrobit/micropython

But Pi Pico; RP2040, RP2350:

"Show HN: PicoVGA Library – VGA/TV Display on Raspberry Pi Pico" https://news.ycombinator.com/item?id=35117847#35120403

"MaplePad – RP2040 Dreamcast controller, VMU, and Purupuru (rumble pack) emulator" https://news.ycombinator.com/item?id=37522059 :

> PicoVision

pimoroni/picovision micropython: https://github.com/pimoroni/picovision :

> PicoVision enables you to create big, bold audio visual projects using MicroPython and an HDMI display of your choice.

> powerful digital video stick for bold audio visual adventures, with dual RP2040 chips and a conveniently HDMI-shaped output connector to boot!

> [...] dual RP2040 chips and a conveniently HDMI-shaped output connector to boot!

westurner22 days ago

TIL RP2350 support DVI video output with an HSTX: https://www.google.com/search?q=rp2350+dvi

And it's possible to convert from DVI to HDMI

westurner21 days ago

Wren6991/PicoDVI commit history: https://github.com/Wren6991/PicoDVI/commits/master/ :

> Add 720x480p 60Hz mode (270 MHz bit clock)

> RP2350 changes (including RISC-V)

From https://news.ycombinator.com/item?id=41260679 :

> The new HSTX interface on the RP2350 seems to be squarely targeted at this use case (video output) and doesn't require the use of PIO or consuming a ton of CPU cycles. There's a nice write up on the capability here:

inflam5222 days ago

This is cool thanks for sharing! I'm definitely be digging into these. It would be neat to support some of these devices too. I didn't know about MaplePad (+1 to Dreamcast VMU projects!)

inflam5220 days ago

Following up here, I just added a game interface abstraction to make it easier to support more devices. Planning on getting a few MakeCode-compatible devices to adapt for them.

Tiberium23 days ago

Small bug: the sim seems to double count residential population for taxes, industrial pop gets ignored. The duplicate logic seems to exist in UI but it's correct there.

Also I wonder if all the repetition could be reduced, or would it affect performance on MicroPython?

https://github.com/chrisdiana/TinyCity/blob/88d07cf98f13bb73...

inflam5223 days ago

Yeah great catch. So I mentioned this in the README but much of the mechanics were heavily inspired by jhhoward's MicroCity. This is the same way he calculated taxes and I figured to test it out to see how it worked in game. I really liked the flow of how his game played and seems like there are some pros/cons to that inbalance.

Pros: - Makes residential population more valuable for taxes, which helps early‑game cash flow. - Encourages zoning residential since it has outsized budget impact. - Offsets the fact that residential growth can be more constrained by pollution/unemployment.

Cons: - Skews the economy away from industrial/commercial impact. - Makes budget feel inconsistent with “total population.” - Can mask balance issues by injecting extra money, making difficulty tuning harder.

coldcity_again23 days ago

Looks super cool, nice job!

inflam5223 days ago

Thanks!

hei-lima23 days ago

Really cool!

inflam5223 days ago

Thank you!

bowlcutWiz23 days ago

looks awesome! can't wait to try the online version :)

inflam5223 days ago

Thanks I'll post when it's available. Still waiting on the PR to merge in their Arcade repo.

tinfoilhatter23 days ago

Looks neat! Great job!

inflam5223 days ago

Thank you!

mcsolid23 days ago

very cool!