In practice
A new game in a dozen lines.
Low gravity, auto-hop, a night sky and headshots only. Not a preset, not a settings
screen: rules you wrote, running on your server, played by anyone who joins.
- No hidden engine features. Every mode that ships with Luderra, from bomb defusal to a full poker table, is built on the same public API you get.
- Change it while it runs. Save the file, reload the mode, and the game goes on with the new rules. No restart, nobody kicked.
- Start anywhere. Fork a shipped mode and change what you want, or start from an empty file.
- Players stay safe. Your client scripts run sandboxed on their machines: their own folder and the game's API, nothing else.
modes/moonshot/mode.ts
// A game that didn't exist five minutes ago
mode.on_start = () => {
mode.physics = { gravity: 250, airaccelerate: 100, autobhop: true };
mode.environment = { sky: [0.02, 0.02, 0.05], fog_density: 0.015 };
};
// headshots only: every other hit does nothing
mode.on_player_damage = (victim, attacker, damage, hitgroup) =>
hitgroup === 1 ? 1000 : 0;
mode.on_player_death = (victim, attacker) => {
mode.message(-1, `${mode.name_of(attacker)} took the shot`);
mode.schedule(2, () => mode.respawn(victim));
};