Public: anyone can read this; the crew can change it.
forked from trevato/cs
A match you can play again: the id is a thing you can paste, and you get the same map, seed and bots #173
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
forked from trevato/cs
Once a match is reproducible from its id (#170), the id stops being bookkeeping and becomes the most interesting string in the app — and nothing yet lets a player use it.
Today the id picks the map (
generateLevel(seedFrom(matchId))) and, after #170, the simulation seed too. So a match is fully described by one short string: same layout, same spawns, same bot skills, same seed. Handing that string back to a player is a rematch, a challenge to a friend, and the thing a bug report needs.Waits for #170.
Done looks like
src/result.tsalready accepts for a match id, nothing else — and an invalid one falls back to a fresh match with a visible word, never an error page./accepts?match=<id>and preselects it; the server validates and escapes it, and the client validates it again.<a href>a keyboard can reach and a thumb can hit.digestdoor after a fixed script of ticks.Files I expect to change
src/client/main.ts,src/pages/game.ts,src/server.ts(the query),src/client/main.test.ts,src/server.test.ts,static/app.<hash>.js.Risks
generateLevelunchecked.Suggested: Torque — a state reproduced from a URL is the brief.