Exporting the game
Exporting turns the project into something others can run without the editor: an .exe for
Windows or a web page. The editor packs your resources and places them next to an export
template, a prebuilt engine executable.
Export templates
Section titled “Export templates”Templates are looked for in Engine/Binaries/platform/<platform>/, next to the editor, in a
debug/ and a release/ folder (Engine/Binaries/platform/windows/release/,
Engine/Binaries/platform/web/debug/…). Each platform has debug and
release templates, in two variants:
- 3D: for 3D projects (without the 2D actors).
- 2D: for 2D projects (without the 3D code), smaller.
You don’t pick the variant: the exporter checks whether the project is 2D or 3D and uses the
right one. The names say the platform, the variant and the configuration: on Windows, for example,
windows_3d_release.exe and windows_2d_debug.exe (plus _opengl for the OpenGL ES 3 renderer and
_console for the console wrapper); on the web web_3d_release.zip (_nothreads without threads);
on Android android_release.apk and android_vulkan_release.apk. Release templates are built for speed
(LTO on Windows).
If a platform’s templates are missing, its page in Project Settings > Platforms says so (“Export templates for this platform are missing”).

Exporting from the editor
Section titled “Exporting from the editor”The Platforms button, next to Play (as in Unreal), has a submenu for each platform:
- Export Game: a release build.
- Export Debug Game: a debug build, slower, with its errors and prints in a console.
- Export Dedicated Server (Windows and Linux): the game as a server for online games, see Online.
- Platform Settings…, or Install Module… when the platform’s templates are missing.
Below them, Export All… (every platform that can export, debug or release), Platform Modules… and Export Settings….

Project > Export is one list: an entry per platform that exports a release build, then Linux Server and Windows Desktop Server for the dedicated server, and Export All…, Platform Modules… and Export Settings…. It has no Export Debug Game or Platform Settings….
The game is written to <project>/build/<platform>/ (for example build/windows/ or
build/web/); a dedicated server to build/server/<platform>/.
The settings are in Project Settings: Packaging gathers what every platform shares (content, scripts, encryption, patching and features) and Platforms has a page per platform with its options, its icon and splash, and an Export button.

What gets exported
Section titled “What gets exported”In the resources you can choose to export only the marked levels and what they use (the
default for new presets). The main scene and the files named by a project setting always
go in; from there the exporter follows the dependencies: Grost uses,
prefabs, .uip UIs… so resources nothing uses stay out.

The pack is compressed with zstd (except formats that already are, like .ogg or .png).
Texture quality per platform (LOD Bias)
Section titled “Texture quality per platform (LOD Bias)”As in Unreal, a texture can go smaller on the platforms that need it, without touching the original file. Each level of LOD Bias halves its width and height: a 4096×2048 texture with 1 ships at 2048×1024 and takes a quarter of the video memory.
- On the texture (right click in Assets > Reimport, Lod section):
- Group: World, Character, Effects, Skybox or UI. It decides which levels each platform drops.
- Bias: levels dropped on every platform, in the editor too.
- On the platform (Project Settings > Platforms, Textures card): LOD Bias: World, Character, Effects and Skybox, the levels it drops from each group’s textures when exporting, on top of their own Bias.
UI textures are never reduced by a platform: use it for the interface and pixel art. By default, Android, iOS and the web drop one level of the skies (Skybox) and nothing else: the engine’s Skybox goes at 4096 on PC and at 2048 on mobile and web.
The editor always shows full quality; the reduced copies are made when exporting and kept for next time.
Native scripts
Section titled “Native scripts”In Packaging > Content, the Grost Export Mode of its Scripts section decides how the
scripts travel. Besides text and binary tokens there is Native: every exported script is
compiled to native code,
one library next to the game, named after it (exporting landwork.exe: landwork.grost.dll
next to landwork.assets; on the web index.grost.wasm; on Android libgame_grost.so per
architecture, inside the APK) that runs the scripts’ functions instead of the
script VM. Number crunching gets tens of times
faster, and vector and array code several times, and the game starts in about half the time.

Release exports to Windows x86_64, the web and Android are always Native (every Android architecture: arm64-v8a, armeabi-v7a, x86_64, x86), whatever the preset’s mode: their release templates have no script parser, compilers or VM, since the scripts come compiled (about 1.8 MB less on Windows 2D). On a phone (Galaxy A30) number crunching went 19 times faster, and array code 9 times.
The mode you pick applies to debug exports, which keep the VM so breakpoints and stepping work, and to platforms without native scripts. The default, Auto, is compressed tokens there.
- It works for Windows x86_64, Web and Android (arm64-v8a, armeabi-v7a, x86_64 and x86; one library per architecture). Picked by hand for a debug export to another platform, the export fails.
- It needs the Grost Native Compiler (clang and lld), which comes with the platform’s export templates (Project Settings > Platforms): about 60 MB for Windows and the web, 75 MB for Android. The first native export unzips it into the editor’s data folder. Without it, a release export fails and says to reinstall the templates.
- All or nothing: if a function uses something that can’t be compiled to native code yet,
the export fails and lists
file:line: what. The game never ships half native. - The same project builds the same library: it is cached in
<project>/.cache/grost_native/and only rebuilt when a script changes. - The library’s SHA-256 goes into the game’s executable (and the pack): on Windows the game doesn’t run a library that was modified or replaced. (It stops casual tampering; someone who patches the executable can get around it.)
- The scripts’ source doesn’t go in the pack. The library also holds each script as it was compiled (its members, constants, signals…), so the game loads them without parsing or analyzing anything and starts faster: a mid-size project went from about 1 s to 0.56 s.
- Breakpoints and stepping don’t exist in native code: to debug a build, export it as debug (with tokens, the default). A debug export with Native picked by hand still reports errors with their file and line, and the debugger’s Profiler lists the native functions (calls, total and self time) and the engine methods they call, as with tokens.
Native code when you press Play
Section titled “Native code when you press Play”Turn on Grost > Native > Run From Editor in the Project Settings (it shows with
Advanced Settings on, the switch at the top of the sidebar) and Play runs the game with
its scripts compiled to native code, as the export would (Windows). Before the game starts, the
editor compiles every script into <project>/.cache/grost_native/play/ (the first time takes a
while; then only what changed), and the Output says how many and how long. If a script can’t be
compiled, or the compiler isn’t there, the game runs in the VM and the Output says why.
Breakpoints don’t stop in native functions: turn it off to debug step by step.

Encrypting the pack
Section titled “Encrypting the pack”In Packaging > Security, Encrypt Exported Pack encrypts the game’s pack with AES-256 and
the Encryption Key (64 hexadecimal characters); Encrypt File Index also hides the file
names. On Windows and Linux the export writes the key into the game’s executable, so the export
templates work as they come. Other platforms need templates built with the key
(SCRIPT_AES256_ENCRYPTION_KEY). The key travels inside the executable: encryption keeps the
game’s content from being opened with a pack tool, not from someone who digs the key out.

Windows
Section titled “Windows”Options of the Windows preset:
- Renderer: Project, Auto, Direct3D 11, Direct3D 12 or OpenGL ES 3 (for older machines).
- Quality: Project, Low, Medium, High, Epic or Cinematic.
- Bake shaders (on by default): precompiles the shaders for the chosen renderer. Without them, the game draws materials with the error shader.

The web export produces an HTML page with the engine in WebAssembly (on WebGL2). It uses the
project icon (icon.svg). Useful options:
variant/compress_wasm: writes the.wasmcompressed with gzip.variant/compress_wasm_brotli(needs the previous one): also writes a Brotli version, noticeably smaller. Exporting takes longer.

The web templates include variants with and without threads (nothreads). To try it, serve
the build/web/ folder with an HTTP server; opening the .html straight from disk usually
doesn’t work in browsers.