Sixteen operators drop into a decommissioned relay complex. Scavenge the racks,
hold a line with what you can build, and stay inside the signal before the zone burns you out.
Operator
Status
AuthorityIN-PAGE
TransportLOCAL LOOPBACK
Voice—
Build—
ORIGINAL WORK · NO THIRD-PARTY GAME ASSETSHARDLINE
STAGING
Room
------
PUBLIC
Slots0 / 16
Match stateSTAGING
Your linkLOCAL · 4 ms
AuthoritySERVER-SIDE RULES
Controls
Operators
Two ready operators start the countdown.
MATCH REPORT
#—
Performance
Eliminations0
Damage dealt0
Damage taken0
Survival time0:00
Structures built0
Shots fired0
Accuracy0%
Materials gathered0
SETTINGS
Audio
Accessibility
Key bindings
Click a binding, then press a key. Esc cancels.
Voice chat
The microphone is never opened without an explicit press.
Voice is optional; a match never fails because voice is unavailable.
HOW TO PLAY
Objective
Be the last operator alive. The signal zone contracts in phases; outside it you take
escalating damage. Everything that matters — health, ammo, loot ownership, hits, structures — is decided
by the authority, never by your client.
Desktop
MoveW A S D
SprintShift
AimMouse
FireLeft click
ReloadR
Weapons1 – 5 / wheel
Pick upF
Heal / plateQ / E
Build modeSpace
Build piece1 / 2 / 3 in build
HarvestHold F on a node
Pause · Perf · DevEsc · F3 · `
Arsenal
PAUSED · MATCH CONTINUES
The authority does not stop for one client. This overlay only
releases your inputs and pointer.
', 'SCRIPTXSCRIPT'],
[' ', ''], ['a\u0000b', 'AB'], ['../../etc', 'ETC'],
['NAMEWAYTOOLONGFORTHEFIELD', 'NAMEWAYTOOLONG']
];
for (const [i, o] of cases) { const g = sanitizeName(i); if (g !== o) return JSON.stringify(i) + ' -> ' + JSON.stringify(g) + ' expected ' + JSON.stringify(o); }
return true;
});
T('chat sanitisation removes angle brackets and quotes', () => {
const s = sanitizeChat('hi "there" `x` &');
return !/[<>&"'`]/.test(s) ? true : s;
});
T('chat is rate-limited', () => {
const a = mk(), r = a.createRoom('public', 'i'); const j = a.join(r.room.code, 'A', 'i1');
let blocked = 0;
for (let i = 0; i < LIM.CHAT_PER_10S + 4; i++) if (!a.ingest(j.sid, { t: MSG.CHAT, v: 'msg ' + i }, 1).ok) blocked++;
return blocked >= 4 ? true : 'blocked ' + blocked;
});
T('input validator clamps out-of-range numbers', () => {
const v = validateInput({ seq: 3.9, mx: 5, my: 5, aim: 99, sel: 77, junk: 'x' });
if (!v) return 'valid packet rejected';
if (v.seq !== 3) return 'seq ' + v.seq;
if (Math.hypot(v.mx, v.my) > 1.0001) return 'vector ' + v.mx + ',' + v.my;
if (Math.abs(v.aim) > Math.PI) return 'aim ' + v.aim;
if (v.sel !== 4) return 'sel ' + v.sel;
if ('junk' in v) return 'unknown key copied into authority state';
return true;
});
T('input validator rejects wrong-typed fields outright', () => {
const bad = [
{ seq: 1, mx: 'left' }, { seq: 1, sprint: 'yes' }, { seq: 1, fire: 1 },
{ seq: 1, use: 'nuke' }, { seq: 1, build: { piece: 'castle', gx: 1, gy: 1 } },
{ seq: 1, build: { piece: 'wall', gx: 'x', gy: 1 } }, { seq: 1, build: 7 },
{ seq: 1, hx: 'far' }, { seq: -1 }, { seq: Infinity }, { mx: 0 }
];
for (const b of bad) if (validateInput(b) !== null) return 'accepted ' + JSON.stringify(b);
return true;
});
T('room codes normalise and reject junk', () => {
if (normalizeCode('abc') !== null) return 'short code accepted';
if (normalizeCode('AAAAAA') !== 'AAAAAA') return 'valid code rejected';
if (normalizeCode('AAA-AAA!!') !== 'AAAAAA') return 'punctuation not stripped';
if (normalizeCode('IIIIII') !== null) return 'ambiguous alphabet accepted';
return true;
});
T('arena has spawns clear of geometry and all landmarks', () => {
const ar = buildArena(99);
if (ar.spawns.length !== 16) return 'spawns ' + ar.spawns.length;
if (ar.marks.length !== 6) return 'landmarks ' + ar.marks.length;
for (const s of ar.spawns) {
if (ar.solids.some((b) => circleBox(s.x, s.y, W.PLAYER_R + 2, b))) return 'spawn inside geometry';
const d = Math.hypot(s.x - 1600, s.y - 1600);
if (d < 300) return 'spawn too central';
}
return true;
});
T('loot spawns across the whole arena with mixed rarity', () => {
const a = mk(), r = a.createRoom('public', 'i');
const items = [...r.room.pickups.values()];
if (items.length < 40) return 'only ' + items.length + ' items';
const kinds = new Set(items.map((i) => i.kind));
return kinds.size >= 4 ? true : 'kinds ' + [...kinds].join(',');
});
T('multi-client simulation: 8 bots run a partial match end to end', () => {
const a = mk(), r = a.createRoom('public', 'sim');
const room = r.room;
const humans = [a.join(room.code, 'HUMAN-A', 'h1'), a.join(room.code, 'HUMAN-B', 'h2')];
for (let i = 0; i < 8; i++) room.join('bot' + i, 'BOT-' + i, { bot: true });
if (!humans.every((h) => h.ok)) return 'human join failed';
room.setReady(humans[0].pid, true); room.setReady(humans[1].pid, true);
for (let i = 0; i < 200; i++) room.tick(1 / 30); // countdown -> live
if (room.phase !== 'live') return 'never went live: ' + room.phase;
// both humans send well-formed input every tick; one also spams garbage
let seq = 1, rejected = 0;
for (let i = 0; i < 30 * 150; i++) {
const ang = i * 0.01;
for (const h of humans) {
const res = a.ingest(h.sid, {
t: MSG.INPUT, seq: seq, mx: Math.cos(ang), my: Math.sin(ang), aim: ang,
fire: i % 12 === 0, interact: i % 20 === 0, sprint: true, sel: 0
}, 1000 + i * 33);
if (!res.ok) rejected++;
}
if (i % 9 === 0 && !a.ingest(humans[0].sid, { t: 'input', seq: -5, mx: 'x' }, 1000 + i * 33).ok) rejected++;
seq++;
room.tick(1 / 30);
if (room.phase === 'over') break;
}
const anyKills = [...room.players.values()].some((p) => p.kills > 0);
const anyBuilt = [...room.players.values()].some((p) => p.built > 0);
const dmg = [...room.players.values()].reduce((s, p) => s + p.dmgDealt, 0);
const eliminated = [...room.players.values()].filter((p) => !p.alive).length;
if (room.zone.phase < 1) return 'storm never advanced';
if (dmg <= 0) return 'no damage was dealt in 150 s';
if (eliminated === 0) return 'nobody was eliminated';
if (rejected === 0) return 'garbage input was never rejected';
if (!anyBuilt) return 'no structure was ever built';
return true;
});
T('a finished match produces a coherent report for every player', () => {
const a = mk(), r = a.createRoom('public', 'i');
const j = a.join(r.room.code, 'A', 'i1'); r.room.join('b1', 'BOT', { bot: true });
live(r.room);
r.room.damage(r.room.players.get(2), 999, r.room.players.get(j.pid), 'test');
const rep = r.room.report(j.pid);
return rep && rep.place === 1 && rep.kills === 1 && rep.acc >= 0 && rep.acc <= 100 ? true : JSON.stringify(rep);
});
return out;
}
/* ==========================================================================
entry
========================================================================== */
if (HAS_DOM) {
if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', boot);
else boot();
} else {
const res = runTests();
const pass = res.filter((r) => r.ok).length;
for (const r of res) console.log((r.ok ? 'PASS ' : 'FAIL ') + r.name + (r.ok ? '' : '\n → ' + r.msg));
console.log('\n' + pass + '/' + res.length + ' passed');
if (typeof process !== 'undefined') process.exitCode = pass === res.length ? 0 : 1;
}
})();