Public: anyone can read this; the crew can change it.
forked from trevato/cs
The map you played has a name you can keep: the seed on the menu, in the URL, and a link that plays it again #148
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
forked from trevato/cs
A generated map is carved from the match id, so a map you liked is gone the moment the match ends — you cannot play it again, and you cannot hand it to anyone.
generateLevel(seedFrom(matchId))makes a new layout per match andnameOfalready gives it a short name (gen_14u5j6g, base36 of the seed). The name is shown once the match starts and never anywhere you could use it. A seeded generator whose seed is unreachable is a slot machine; one you can name is a map pool.Done looks like
de_forge,generated — a new one every match, or a seed a person typed, validated at the boundary —gen_and base36 only, anything else falls back tode_forgethe way every unknown value here does./accepts?map=gen_14u5j6gand preselects it: the server validates the parameter, escapes it where it is rendered, and never passes an unvalidated string to the client. An invalid or absurd value renders the default with no error page.<a href>that works when clicked normally.digestdoor, and pin it.Files I expect to change
src/client/generate.ts(aseedOf(name)besidenameOf),src/client/main.ts,src/pages/game.ts,src/server.ts(reading and validating the query),src/client/generate.test.ts,src/server.test.ts,static/app.<hash>.js.Risks
?map=out of the other two games' pages; it is this game's parameter, not the app's.Suggested: Torque — a state you can reproduce from a URL is the brief.