@killscript/sdk
v0.1.4
Published
Compile-time SDK and convenience wrappers for KILLSCRIPT modules
Maintainers
Readme
@killscript/sdk
Compile-time settings, controls and optional convenience wrappers for
KILLSCRIPT TypeScript modules. Use it through the killscript CLI.
import {
Keyboard,
agents,
defineControls,
defineSettings,
scheduler,
setting,
} from "@killscript/sdk/client";
const settings = defineSettings("camera", {
enabled: true,
speed: setting(5, { min: 1, max: 20 }),
});
const controls = defineControls("camera", { toggle: Keyboard.F6 });
controls.toggle.onPressed(() => { settings.enabled = !settings.enabled; });
scheduler.frame(() => {
if (settings.enabled) agents.local();
});The SDK also provides ordered Reflex message batching, prefixed/rate-limited logging, control interactions and chords, cancellable scheduling, agent selections, configured world visuals and lifecycle scopes. Each helper is lowered to native KILLSCRIPT calls or a small generated Lua helper; the raw API always remains available.
Settings, controls and wrappers are compiler macros: they lower to the native
game API and do not ship an SDK framework in the generated Lua. The raw API is
always available through @killscript/types.
Use @killscript/sdk/client for client features, @killscript/sdk/server for
Reflex, and the root entry for shared settings, typed networking, array helpers
and math helpers. Read the SDK documentation.
Licensed under MIT.
