Work continues · macOS · Windows · Linux

SolidCraft Autobattler

Two squads of five Frames are on a board. The SolidCraft CAD kernel makes the solids for the body of each Frame. Three d100 tables from the Starforged population data set the species, the presentation and the age of each Frame.

No download needed to look: play the web demo on the last slide.

Each zip file has the game, its data (.pck) and the sandbox library in one folder. Unzip the file and start the game. To examine a download, compare its SHA-256 with SHA256SUMS.

How the game operates

Frames, wear and the kernel

Each Frame can cause damage to the Frames of the other squad. The kernel makes boxes, cylinders, spheres and tori, and the game puts them together. If a Frame is not broken at the end of a round, it stays in its squad with wear. Each round of wear decreases its health. After five rounds of wear, the Frame stops. New Frames go into the empty positions.

Each Frame has a role: melee, range or cyber. Melee is stronger than range, range is stronger than cyber, and cyber is stronger than melee. A melee Frame has a shield and hits at close range. A range Frame has a barrel and hits from 7 m. A cyber Frame has a dish, hits from 3.8 m and makes the next attack of its target slower. Each squad has each role one time or more.

The kernel is a Rust program for RISC-V. It operates in Godot through godot-sandbox. For each system, we translate the kernel to native code before you get the game. A preview of the web game is on the last slide.

Work continues: The game is a test of the sandbox and the kernel. Work on the game continues. After an upload, a build can change or not operate correctly.
First start

The builds do not have a signature

To examine a download, use shasum -a 256 <zip> on macOS and Linux. On Windows, use certutil -hashfile <zip> SHA256. Compare the result with the value below the button or in SHA256SUMS.

macOS

macOS puts the download in quarantine and does not open it. Remove the quarantine one time. Then start the game:

xattr -dr com.apple.quarantine solidcraft-autobattler-macos-arm64
./solidcraft-autobattler

Only for Apple silicon.

Windows

SmartScreen shows a warning about an unknown publisher. Click More info. Then click Run anyway for solidcraft-autobattler.exe.

Only for 64-bit x86.

Linux

./solidcraft-autobattler

Only for 64-bit x86 with glibc 2.35 or a glibc with a higher version number. Ubuntu 22.04 has glibc 2.35. The Godot runtime sets this minimum.

To do a test of a build, start it with --headless -- --selftest. The test makes 18 solids and does two rounds. A good build shows RESULT PASS.

Measured · data/measurements.json

Translated code and interpreted code

How the translation operates

One bake for each system

1 · Bake

The game operates one time on the target system. The sandbox writes its translation as C code. The result is 32 files: 336 MB of C for 16 MB of RISC-V code.

2 · Compile

A compiler compiles the C code for the target system. The linker puts it into the sandbox library. The game does not compile or load a translation when it operates.

3 · Hash

When the sandbox loads the kernel, it calculates a hash of the kernel and the machine layout. If a translation has the same hash, the sandbox uses the translation. If not, the sandbox interprets the kernel.

The machine layout is part of the hash. Thus C code from one system does not operate on a different system. Windows and Linux on x86_64 have the same layout and hash. But each system compiles a copy for that system.

Changes for the Windows host

The first start of the kernel on Windows

The kernel uses Linux system calls. Before this work, it did not operate on Windows. On Windows, the emulator gave incorrect results for four system calls. The kernel stopped with and without translation. Thus these changes are in the emulator, not in the translation.

Heap break

brk did not keep the new break. Static glibc puts the data of the main thread at the first break. The heap then used the same memory and gave an address in read-only data.

Clock

The clock gave the time in the Windows layout: a 32-bit nanosecond field and padding. The 64-bit kernel read the padding as part of the time.

Error numbers

Above 34, Windows uses different error numbers. The kernel got a different error for "not implemented". glibc uses this error to select a fallback for rseq and clone3.

Number of CPUs

sched_getaffinity was not available on Windows. On Linux and macOS, the emulator gives a result of one CPU. After this change, Windows gives the same result.

After the first three changes, the kernel stopped again. The registers and the page condition at the fault showed the cause.

Build hosts

Where we make the libraries

PREVIEW: We translate the kernel to WebAssembly before you load the page. The page downloads a 131 MB library. Then the page stops for some seconds while the kernel makes 18 solids. Keep this tab in front. Chrome decreases the speed of tabs that are not in front.
Loading
No person controls the game.The SolidCraft CAD kernel makes the solids for each Frame. The kernel is a RISC-V program. It operates in godot-sandbox in your browser. Godot 4.8 · WebGPU · libriscv · © 2026 chibifire
Click the page, not the game. Then use ← → or swipe.
loading…

This page sends error reports and browser details to AppSignal so we can fix crashes.