In-game scripting

Client-side

  • Works like game mods, something like load Rust library into game via API

  • Probably WASM-based, though JS is possible too (due to no need for gas)

  • For running more complex logic that are not latency-sensitive, like client-side autopilot

Server-side

  • Probably in WASM, with gas fees for limiting allocation of server resources.

    • We could also support JS, using Deno or similar

    • Deno vs wasmtime vs wasmer is probably the biggest thing to decide

    • Do we wanna support a Lua or JS API? (backed by something like QuickJS compiled to WASM) Might be easier for people

  • Gas is paid in in-game currency

  • Would be used for latency-sensitive things, like a PID controller to track another ship

Challenges

  • Need to design a system for integrating the two pieces seamlessly

    • Basic building block: a simple IPC channel between the client and server-side code

  • What about "logically in-game client-side code"? e.g. cockpit panels

    • Ideally this can be zero-gas on the server side and zero-latency from the client's perspective

    • Do we need a third category of "in-game UI mode"?

Last updated