Repository navigation
Achievements on arcade via tak.arcade (RFC 0014) - #215
Merged
Merged
Conversation
Twelve arcade achievements for FishE: ten curated milestones carry an arcadeId (Letter of Marque is declared hidden), plus reaching the goal and retiring. Each is unlocked through tak.arcade.unlock at the moment the game announces it, and a loaded save re-asserts the ones it has already earned. Unlocks are fire-and-forget and touch no save state. Pins tak at 963cd3c (tak.arcade) in requirements.txt and the Dockerfile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0116e9DMUhtNXM5bHUdMhDAn
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FishE now reports achievements to arcade (https://danielstephenson.dev/play, Stephenson-Software RFC 0014) through
tak.arcade.unlock, which was added to tak in tak#21.Achievements (12)
first-catchmaster-fisherbig-earnerfirst-matetook-the-helmletter-of-marquefirst-exporthomeownerwaterfront-manorproperty-mogulreached-goalretiredarcadeIdinMILESTONES.arcadeDeclarations()produces the declaration list, and the gateway'sconfig/play/boards.yamlentry forfishewas generated from it, so the two cannot drift.first-catchandreached-goalare the ids already used by arcade-social's example.src/achievements/arcade.pywraps every call in try/except. Each unlock happens where the game already announces the milestone or goal, and inHome.retire(). On load,catchUp(stats)re-asserts whateverstats.earnedMilestonesalready holds, so achievements earned before this change (or while signed out) are credited. That path only reads the list.player.json,stats.jsonortimeService.json, and no schema changes. A test checks that a save written with unlocks recorded is byte-identical to one written with them stubbed out.requirements.txtand in the Dockerfile, which still hadv0.2.0.Verification
tests/achievements/test_arcade.py(25 tests) checks that every declared id is reached through the real game-loop, goal and retire code paths, that a milestone is reported once, that a new game reports nothing, that a loaded save re-asserts what it holds, that a raising bridge never reaches the game, and that saves come out byte-identical. The full suite passes locally (947 tests).https://fishe.play.danielstephenson.devwith arcade-social faked. A save written byorigin/maincode loaded and played on. The expectedPOST /v1/achievements/<id>requests were sent (catch-up, first catch, goal, retire). With/v1/sessionanswering 401, no unlock POST was sent. No page errors were seen.drafted by Claude on behalf of Daniel Stephenson
🤖 Generated with Claude Code