npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@multi-indiegame/akashic-scoreboard-serve-coe

v0.1.0

Published

coe コンテンツで、プレイ記録を akashic serve の画面で確認するための実行基盤の代役(experimental)

Readme

@multi-indiegame/akashic-scoreboard-serve-coe

@akashic-extension/coe を使ったコンテンツで、プレイ記録を akashic serve の画面で確認するための実行基盤の代役。

experimental(0.1.0) サーバ側で受け取った記録をブラウザ側へ渡すのに OperationEvent を使っています。これは本来、コンテンツが game.json で宣言した操作プラグインのための種別で、このパッケージは番号を宣言せずに使います。コンテンツ側の操作プラグインと衝突しえます

coe を使ったコンテンツでは @multi-indiegame/akashic-scoreboard-serve は使えません。 記録は受け取られますが、画面には出てきません(akashic serve を起動した端末には出ます)。coe を使っているならこちらを使ってください。

できることは @multi-indiegame/akashic-scoreboard-serve と同じです。

  • 登録された記録を akashic serve の画面内に出します(ドックの「スコアボード」タブ → 全画面表示)
  • 記録を akashic serve を起動した端末にも出します
  • 形が合わずに破棄された値も警告として出します
  • 記録は実行基盤と同じようにマージ(後勝ち・null で削除)して保持します
  • 指定すれば、その結果を JSON ファイルにも書き出します(既定では書き出しません)

セットアップ

1. 拡張ライブラリ本体が入っているか確認する

game.json に次の記述があれば入っています。

"environment": {
  "external": {
    "scoreboard": "0"
  }
}

無ければ、先に本体をインストールしてください。

akashic install @multi-indiegame/akashic-scoreboard

2. このパッケージをインストールする

npm install --save-dev @multi-indiegame/akashic-scoreboard-serve-coe

3. sandbox.config.js に書く

server.externalclient.external の両方に書きます。

module.exports = {
  // ... 既存の設定
  server: {
    external: {
      scoreboard:
        require.resolve("@multi-indiegame/akashic-scoreboard-serve-coe/server.js"),
    },
  },
  client: {
    external: {
      scoreboard:
        require.resolve("@multi-indiegame/akashic-scoreboard-serve-coe"),
    },
  },
};

require() ではなく require.resolve() です。akashic serve に渡すのはパスであって値ではありません。

4. 起動する

akashic serve

ブラウザでゲームを開くと(= プレイが作られると)次の行が出ます。akashic serve を起動しただけでは出ません。

[akashic-scoreboard-serve] 記録を受け取ります。akashic serve の画面の「スコアボード」タブで確認できます。
[akashic-scoreboard-serve] 記録の送信先: http://localhost:3300
[akashic-scoreboard-serve] 記録を載せる playlog イベント: OperationEvent(操作プラグインコード 0x6d69)

送信先は必ず確かめてください。 サーバ側は akashic serve 自身の待ち受け先を推定しており、外れているとその宛先へ記録を送ってしまいます。違っていれば指定してください

画面の見方と設定

@multi-indiegame/akashic-scoreboard-serve と同じです。そちらの README を見てください。

設定を変えるときは、sandbox.config.js の中で configure() を呼び出し、設定をカスタマイズしてください。本番に合わせた上限(limits)もここで渡します。

// sandbox.config.js
const scoreboardServe = require("@multi-indiegame/akashic-scoreboard-serve-coe/server.js");

scoreboardServe.configure({
  outputPath: "./tmp/records.json",
  limits: { keysPerPlayer: 16, stringLength: 64 },
});

module.exports = {
  // ... セットアップに書いたものと同じ
};

指定したキーだけが変わります。akashic serve を起動したまま書き換えた場合は、プレイを作り直せば新しい設定になります。

使う操作プラグインコード

記録が更新されるたびに、操作プラグインコード 0x6d69(28009)の OperationEvent が playlog に載り、全インスタンスへ配信されます。既定の番号で、変えられます。配信されるのは akashic serve で動作確認しているときだけで、本番の実行基盤でこのイベントが流れることはありません。

コンテンツ側には次の影響があります。

  • 同じ番号の操作プラグインを登録していると衝突します。 そのプラグインの decode にこの記録が渡ります。番号を変えてください
  • scene.onOperation を見ているなら、この番号の操作もコンテンツに渡ります。 自分のコードでない操作は無視してください。
  • このイベントは playlog のダウンロードにも含まれ、リプレイ時にも再生されます。

番号を変える

sandbox.config.js の中で operationCode を渡してください。client.external はそのままで構いません(画面側は番号を見ていません)。

// sandbox.config.js
const scoreboardServe = require("@multi-indiegame/akashic-scoreboard-serve-coe/server.js");

scoreboardServe.configure({ operationCode: 30000 });

module.exports = {
  // ... セットアップに書いたものと同じ
};

実際に使っている番号は、起動時のログに出ます。

[akashic-scoreboard-serve] 記録を載せる playlog イベント: OperationEvent(操作プラグインコード 0x7530)

ライセンス

MIT