feat(registry): match/find for ranked against bots, match/create for listed player games, short idle exit #28
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/match-find"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Three match routes for game clients, and ranked bot matches that move rating.
POST /api/v1/match/find?game=&ladder=: Ranked. Answers the fullest ready ranked server of the ladder with room, one still starting, or starts one on Edgegap withSERVER_RANKED=<ladder>. 409 atEDGEGAP_MAX.POST /api/v1/match/create?game={game_id, name}: Create game. Starts a listed server on the chosen map and mode under the player's name.GET /api/v1/match/{id}: starting, ready (address, port, join code), failed or ended.SERVER_IDLE_EXIT_SECONDS=MATCH_IDLE_EXIT_SEC(default 60), so the server quits a minute after its last player leaves and its entrypoint ends the deployment.deployOnline, also used by the fleet page), so two cannot both pass the cap.ranked: truemoves each human's rating against every bot atBOT_RATING(default 1000) and counts it inbot_matches, shown on the board. Host-token or unranked botmatches still move nothing.launches.game/purpose/ladderandratings.bot_matches.assumed: ranked bot matches move rating, against a fixed bot rating, per the plan's Risks line (the human can reverse it).
assumed: match/find and match/create take the host or server token, like the other start routes, so a signed-out client can play ranked.
Tests:
go vet ./... && go test -count=1 ./...in golang:1.24, all ok; 6 new tests in match_test.go (find, skip other ladders and full servers, auth and ladder, create, bad input, ranked botmatch rating).Item: dbm-online-ranked
Task: ucp-1157
https://claude.ai/code/session_01KbJcEgFWr2HcJWg5zUcHyK