@bountyboard/arcade-sdk 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,73 @@
1
+ # Bounty Board game design playbook (the "design brain")
2
+
3
+ What actually performs on the Bounty Board arcade, distilled from operating it. Read this
4
+ BEFORE designing a new game or porting one in — the SDK wiring is the easy part; these choices
5
+ decide whether the game earns plays, retention, and revenue.
6
+
7
+ > Draft co-owned with our partner studios — challenge anything here with data.
8
+
9
+ ## Session shape
10
+
11
+ - **Target a 60–180 second core loop.** Arcade traffic arrives mid-browse; games that deliver a
12
+ complete emotional arc (start → tension → payoff) in under three minutes get replays, and
13
+ replays drive feed ranking. Longer-form games need checkpointed sessions via cloud saves.
14
+ - **Time-to-first-input under 5 seconds.** Call `gameLoadingFinished()` honestly; players who
15
+ bounce on a spinner never come back. Defer heavy assets past the first playable moment.
16
+ - **Instant restart.** Death → new run should be ONE input and under a second. Restart friction
17
+ is the top killer of "one more run".
18
+
19
+ ## Score design (this is leaderboard design)
20
+
21
+ - **Scores must be integers with a meaningful gradient.** A good score curve separates a casual
22
+ run from a great one by 10–100x, not 2x — that's what makes a board worth climbing.
23
+ - **Skill ceiling over grind ceiling.** If score scales with time played rather than skill, the
24
+ board saturates and goes stale. Cap or decay pure-survival scoring; reward risk.
25
+ - **Design the "one point short" feeling.** Near-miss visibility (show the player's best and the
26
+ next board rank in-game via your own UI) measurably lifts replays.
27
+ - **Daily mode**: if your game has procedural content, ship a shared-seed daily run and submit
28
+ it with `{ mode: 'daily' }`. Daily boards reset at midnight UTC and are the strongest
29
+ retention surface on the platform — everyone plays the SAME level, so the board is fair chat.
30
+
31
+ ## Multiplayer design (for room-based games)
32
+
33
+ - **Latency-tolerant mechanics win.** Positional games at 10–20Hz snapshots with client
34
+ interpolation feel great for chase/tag/social deduction; twitch duels don't. Design around
35
+ prediction-friendly movement (momentum, grid steps) rather than instant-hit actions.
36
+ - **Information asymmetry is a server feature.** The room server sends each player only what
37
+ they may know (hiders invisible to the seeker). Lean into designs where hidden information IS
38
+ the game — it's cheat-proof by construction here.
39
+ - **2-minute rounds, drop-in lobbies.** Rooms fill from friends sharing codes; short rounds
40
+ forgive mid-round joins as spectators and keep groups cycling.
41
+ - **Send inputs, not outcomes.** If your design needs the client to decide who got tagged, the
42
+ design is wrong — move the rule server-side.
43
+
44
+ ## Monetization etiquette (rewarded ads)
45
+
46
+ - **Ads are a player's trade, never a toll.** Best-performing placements: revive ("continue this
47
+ run?"), doubler ("2x this run's coins"), cosmetic unlock. Never gate core progression.
48
+ - **One organic placement beats three pushy ones.** Interrupting flow trains players to leave;
49
+ `rewardedBreak` after a natural fail state converts best.
50
+ - **Always pause audio/game in `onStart`** and only grant on `true`. A game that grants on
51
+ dismissed ads gets its ad access revoked.
52
+
53
+ ## Platform fit
54
+
55
+ - **Mobile-first inputs.** Most arcade sessions are touch. One-thumb controls, generous hit
56
+ targets, no hover dependence, portrait-friendly if possible. Keyboard is the enhancement.
57
+ - **Performance budget: 60fps on a mid-range phone.** Cap DPR, pool objects, avoid layout
58
+ thrash. Players don't report jank, they just leave.
59
+ - **Own your standalone build.** The same bundle must run off-platform (the SDK no-ops). Don't
60
+ fork builds; feature-detect through the SDK's own fallbacks.
61
+ - **Cloud saves make your game feel native.** Load on boot, save on checkpoint/game-over, and
62
+ greet returning players with their progress (pair with `getPlayer()` for the name). Hosted
63
+ builds have no localStorage, so wire this early, not as a retrofit.
64
+
65
+ ## Ship checklist (design, not code)
66
+
67
+ - [ ] A stranger reaches "I get it" inside 10 seconds of play
68
+ - [ ] A full run fits in 3 minutes; restart is one input
69
+ - [ ] The score of a great run embarrasses the score of a lucky run
70
+ - [ ] Daily mode if content is procedural
71
+ - [ ] Rewarded placement is a trade the player initiates
72
+ - [ ] Playable one-thumb on a phone at 60fps
73
+ - [ ] Boots and plays with the SDK fully offline
package/package.json ADDED
@@ -0,0 +1,59 @@
1
+ {
2
+ "name": "@bountyboard/arcade-sdk",
3
+ "version": "1.0.0",
4
+ "description": "Bounty Board Arcade SDK — leaderboards, cloud saves, rewarded ads, A/B variants, and multiplayer rooms for games on bountyboard.gg",
5
+ "keywords": [
6
+ "bountyboard",
7
+ "arcade",
8
+ "game",
9
+ "sdk",
10
+ "leaderboard",
11
+ "html5"
12
+ ],
13
+ "homepage": "https://www.bountyboard.gg/arcade/sdk",
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/zachery-moore/bounty-board.git",
17
+ "directory": "packages/arcade-sdk"
18
+ },
19
+ "license": "MIT",
20
+ "publishConfig": {
21
+ "access": "public",
22
+ "registry": "https://registry.npmjs.org/"
23
+ },
24
+ "type": "module",
25
+ "main": "./dist/index.cjs",
26
+ "module": "./dist/index.js",
27
+ "types": "./dist/index.d.ts",
28
+ "exports": {
29
+ ".": {
30
+ "types": "./dist/index.d.ts",
31
+ "import": "./dist/index.js",
32
+ "require": "./dist/index.cjs"
33
+ },
34
+ "./multiplayer": {
35
+ "types": "./dist/multiplayer.d.ts",
36
+ "import": "./dist/multiplayer.js",
37
+ "require": "./dist/multiplayer.cjs"
38
+ },
39
+ "./global": {
40
+ "types": "./dist/global-sdk.d.ts",
41
+ "default": "./dist/global.js"
42
+ }
43
+ },
44
+ "files": [
45
+ "dist",
46
+ "AGENTS.md",
47
+ "docs",
48
+ "README.md"
49
+ ],
50
+ "sideEffects": true,
51
+ "scripts": {
52
+ "build": "tsup && node scripts/build-global-dts.mjs",
53
+ "clean": "rm -rf dist"
54
+ },
55
+ "devDependencies": {
56
+ "tsup": "^8.0.0",
57
+ "typescript": "^5"
58
+ }
59
+ }