Asobiai SDK

Changelog

v2.7.0Check it from your game with window.AIGame?.version.Changelog

  1. v2.7.02026-11-10Latest
    • Leaderboards: AIGame.submitScore(score, { note }) can attach a short note to a score ("B23F", "Lv12", "Stage 3", … up to 24 characters). It's shown next to the number on the leaderboard; the note from the personal-best play is the one kept.
  2. v2.6.02026-11-05
    • Language: AIGame.locale tells you the language the Asobiai page is shown in ('ja' / 'en' / 'ko' / 'zh-Hans' / 'zh-Hant'), so the game's text can match the page. Outside Asobiai it follows the browser's language.
  3. v2.5.02026-11-01
    • Replays: AIGame.submitScore(score, { replay }) can carry a record of the inputs (any JSON, up to 512 KB). When it's a personal best in the top 20 it's kept, and anyone can watch it from ▶ on the leaderboard.
    • Replay playback: opening from ▶ loads the version the play was recorded on and sets AIGame.replaying to true. AIGame.getReplay() returns the record and whose play it was. While replaying, scores, trophies, tallies and saves are not recorded, and localStorage writes stay inside that page.
  4. v2.4.02026-10-24
    • Leaderboards: scores sent with AIGame.submitScore while you are in an online room (joinRoom) go to a separate "Online" leaderboard, apart from solo play. No code changes needed. Creators choose "separate", "same" or "don't record" under Leaderboard in the editor (online_scores in MCP and REST).
    • Share sheet: games can now call navigator.share (the phone's share sheet), for example to send results to LINE or X. It only opens on a tap.
    • Automated tests (check_game, test_multiplayer) now also list score, achievement and game-over calls in events.
  5. v2.3.02026-10-24
    • Online: rooms now hold up to 16 players (joinRoom maxPlayers up to 16, was 8).
    • Online: room.send(data, [id, id, …]) sends to several players at once (for example only your team); it counts as one message.
    • Online: players can send 60 messages per second (was 30).
  6. v2.2.02026-10-24
    • Tallies: cast a vote with AIGame.tally(name, choice) and read { total, counts } with AIGame.getTally(name). Use them for polls, "how many moves did everyone need today" charts, or training data for games that learn from players. One vote per name per play; guests can vote too. Only the totals are kept, never who chose what.
  7. v2.1.02026-10-24
    • Save generations: when you upload a new version with "Start with fresh save data", that version keeps localStorage, IndexedDB and cloud saves (AIGame.save) apart from earlier versions — no code changes needed. By default (unchecked) every version shares the same saves as before.
  8. v2.0.12026-10-23
    • Fix: when the game frame got its size after loading, some browsers never fired resize, so games that size their canvas at startup could stay a single flat color. The SDK now fires resize when the size changes without one.
  9. v2.0.02026-10-23
    • Saves: AIGame.save(slot, data) / load / listSaves / deleteSave. Saved to the player's account (cloud) when logged in, otherwise in the browser.
    • Trophies: AIGame.unlockAchievement(id) / getAchievements(). Define trophies on the game's edit page, with MCP achievements, or in asobiai.json in the game files.
    • Online: when the network drops or the player switches apps, they return to the same seat automatically within reconnect seconds (60 by default). Closing the tab counts as leaving right away. New events: away / back / reconnecting / reconnected / disconnected.
    • Online: room.saveState / loadState keep the room state on the server (per-player secrets are readable only by that player and the host), so a new host can continue the game.
    • Online: players whose joinRoom protocol (compatibility version) differs can't join the same room (error code "incompatible").
    • Change: room.on("close") now fires only after leave() or when reconnecting fails, not on a temporary drop.
  10. v1.3.02026-10-23
    • When a game is checked with the MCP tool check_game, the SDK now collects errors and files that failed to load. Normal play is unchanged.
  11. v1.2.02026-10-22
    • Online play: join a room with AIGame.joinRoom and message other players with room.send (works only when the game is played on Asobiai).
  12. v1.1.02026-10-22
    • AIGame.version now returns the SDK version as a string (for example "1.1.0"); it used to be the number 1.
  13. v1.0.02026-10-20
    • First release: AIGame.submitScore (leaderboards) and AIGame.gameOver.
    • Errors and console output are forwarded to a console only the creator sees.
    • WebGL preserveDrawingBuffer is enabled automatically for thumbnail capture.
    • Arrow keys and space no longer scroll the page.
    • In-memory fallback when localStorage is unavailable inside the sandbox.