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. The 18 modes that ship with Luderra, from bomb defusal to a full poker table, are built on the same public API you get.
- Start anywhere. Fork a shipped mode and change what you want, or start from an empty file.
- Safe by design. Scripts reach the documented services and nothing else, on the server and on the player's machine.
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));
};