Skip to content
GAMPEONCreate
New project
Preview: this works today, but details can still change.

Sandbox

Every resource runs in its own Lua 5.4 state. A resource that crashes, hangs or uses too much memory is stopped; the others keep running.

  • Lua 5.4 language features: integers, //, <const>, <close>, goto.
  • Libraries: string, table, math, utf8, coroutine, and from os only time, clock, date and difftime.
  • The GAMPEON Lua API.
Missing Why
io, os.execute, os.getenv, os.remove … No access to files or the machine
require, package, dofile, loadfile Scripts come from the manifest only
debug Could break out of the sandbox
string.dump, bytecode in load Bytecode can break the Lua VM
Limit Default
Memory 64 MB per resource
Instructions 50 million per run of a handler, thread step or export call

When a limit is hit, the current run stops with an error in the log, for example script exceeded instruction budget.

Client scripts come from the server and run on players’ computers. They have no PerformHttpRequest, no MySQL, no SaveResourceFile, and convars are read-only.

The client sandbox has not had its security review yet. Until it has, the game only runs client scripts from trusted servers. See Client scripts.

Report a problem with this pageOther ways to give feedback