Skip to content

Configuration#

goboscript uses a goboscript.toml configuration file to store project-specific configuration.

Build Hooks#

Build hooks allow you to run custom commands before and after the build process.

Pre-build Hook#

Run a command before the build starts. The command is executed in the project directory.

pre_build = "echo 'Starting build...'"

Post-build Hook#

Run a command after the build completes successfully. The command is executed in the directory containing the output file.

post_build = "echo 'Build completed!'"

Platform-specific Behavior#

  • Windows: Commands are executed using PowerShell 7 (pwsh.exe)
  • Unix/Linux/macOS: Commands are executed using /bin/sh

Examples#

# Copy assets before building
pre_build = "cp -r assets/* ."

# Open the generated file after building
post_build = "open *.sb3"
# Windows PowerShell examples
pre_build = "Get-ChildItem -Path assets -Recurse | Copy-Item -Destination ."
post_build = "Start-Process *.sb3"

Note: If a hook command fails (exits with non-zero status), the build process will be aborted.

Standard Library Version#

If not provided, the latest version is picked (Updates fetched daily)

std = "2.1.0" # default is unset

Sprites layer order#

Specify the order in which sprites are layered, by default the order is undefined.

layers = ["sprite_name_1", "sprite_name_2"]

Turbowarp options#

goboscript can generate a turbowarp configuration comment inside the Stage. https://docs.turbowarp.org/advanced-settings

Frame Rate#

frame_rate = 60 # default is 30

Max Clones#

Default#

max_clones = 300

Infinite Clones#

max_clones = inf

No Miscellaneous Limits#

no_miscellaneous_limits = true # default is false

No Sprite Fencing#

no_sprite_fencing = true # default is false

Frame Interpolation#

frame_interpolation = true # default is false

High Quality Pen#

high_quality_pen = true # default is false

Stage Width & Height#

stage_width = 640 # default is 480
stage_height = 480 # default is 360