Molten

Shipping your game

When your game is ready for players, molten build --release turns the game folder into a standalone folder you can zip and distribute. The full technical reference is docs/shipping.md; this page is the walkthrough.

What you get

  • One executable with the engine and your gameplay compiled ahead of time by Clang with optimizations. No TinyCC, castc, live reload or dev link inside.
  • game.mtpack: every asset imported and packed, plus your checked concept, UI and style files.
  • Only the runtime libraries the game needs, and a third-party licenses file.

Before you build

  • Build Molten (Debug or Release workflow).

  • Install LLVM with Clang and LLD. On Windows the builder looks for clang-cl.exe on PATH, in Visual Studio's LLVM component (via vswhere) and in the standard LLVM folder; on Linux it looks for clang / clang++ on PATH. --clang PATH picks one explicitly.

  • On Windows it also uses the Visual C++ toolchain and Windows SDK that CMake found, and Ninja (from PATH or Visual Studio).

  • Fill in game.toml:

    name = "CoinYard"          # executable name; letters, digits, - and _
    title = "Coin Yard"        # window title
    organization = "MyStudio"  # player data goes in <user data>/MyStudio/CoinYard
    version = "1.0.0"
    icon = "icon.png"          # PNG up to 256 x 256, in the game folder
    first_screen = "MainMenu"
    
  • Make sure castc check passes. Run the game once in the dev build to verify loading and gameplay.

Build

molten build --release coinyard dist/CoinYard

The output folder must be new or empty and outside the game folder. The command checks the project, generates release C, imports and packs assets, compiles and links, and only then publishes the folder. If LLVM is missing, it stops with exit code 77.

Ship the whole output folder. Players run the executable from anywhere.

What players need

  • Windows or Linux with a Vulkan 1.3 driver and the system Vulkan loader (vulkan-1.dll / libvulkan.so.1).
  • On Linux, build on the oldest distribution you want to support, because the game uses the system C/C++ runtime.

Player settings and saves

The game's per-user folder is %APPDATA%\<organization>\<name> on Windows and ~/.local/share/<organization>/<name> on Linux. Players can put a settings.ini there:

width=1280
height=720
fullscreen=false
vsync=true
volume_master=1
volume_music=1
volume_effects=1
volume_ui=1

Cast's audioSetBusVolume writes the volume keys for you. saveWrite(name, text) and saveRead(name) store save slots in saves/ in the same folder.

Steam

--steam turns on an empty module boundary reserved for a future Steamworks integration; it does nothing yet.

Differences from the dev build

Dev build (molten-game) Shipped game
Live reload, dev link, devtools None
Assets imported on demand into the work dir Pre-imported into game.mtpack
Gameplay built by TinyCC with dev checks (divide-by-zero logging, arena stamps) Built by Clang with optimizations, without dev checks
Space toggles simulation pause in dev-link builds Space is available for gameplay

View this page's source on GitHub