Skip to content

Card Craft 1.0.1

Latest

Choose a tag to compare

@therezor therezor released this 24 Aug 08:56

A patch release. The game is unchanged to play; what changed is underneath it.

What's fixed

  • The keyboard no longer allocates while a key is held. Reading the key
    state copied a structure containing three vectors, so holding any key ran
    three allocations and three frees every frame — and that was the only place
    the game reached the allocator at all while you were playing.
  • Developer builds report their own memory. Heap low-water mark, a heap
    integrity check, the margin left on both task stacks, and how much of the
    placement-marker pool is spare. A freeze that happens once now leaves
    something behind to read.

This came out of a report of the game freezing when the craft card was opened.
That could not be reproduced, and nothing here is proven to be its cause: the
heap measures 35.5 KB free and does not move by a single byte when the card
opens, and both task stacks have room to spare. What the keyboard fix removes
is the one place in the frame where a memory problem could have surfaced —
which happens to be a keypress, the same keypress that opens the craft card.

If you are on 1.0.0 and have never seen a freeze, there is nothing here you
need. Upgrading costs you nothing either.

Install

Easiest — flash the full image at offset 0, nothing else needed:

esptool.py --chip esp32s3 --port /dev/tty.usbmodemXXXX --baud 921600 \
  write_flash 0x0 card-craft-1.0.1-cardputer-full.bin

If you already have the bootloader and partition table on the board, the
application image alone goes at 0x10000:

esptool.py --chip esp32s3 --port /dev/tty.usbmodemXXXX --baud 921600 \
  write_flash 0x10000 card-craft-1.0.1-cardputer-app.bin

Or build it yourself with PlatformIO:

git clone https://github.com/therezor/card-craft
cd card-craft
pio run -e cardputer -t upload

One build runs on both the Cardputer and the Cardputer ADV.

Controls

Right hand moves, left hand acts. Arrows move and turn, W mines, A builds,
E/S look up and down, ENTER centres the view, SPACE jumps, 1-9 pick
a hotbar slot, Q drops, TAB crafts, ESC goes back. There is a CONTROLS
card in the game too.

Checksums

465fb961d99a8baf6edbf29476257af89a819ee5c9a78ab8e8b006f603f69d66  card-craft-1.0.1-cardputer-app.bin
88af1c537df2155d0e11e6260b1911551da5a8eecf05050206bbd91f37f90092  card-craft-1.0.1-cardputer-full.bin

Full changelog: v1.0.0...v1.0.1