おみくじ演出に「弾き盤」(ピンボール)を追加する - #243
Merged
Merged
Conversation
右端のレーンにある御神玉を下に引いて放すと、天辺の弧を回って盤面へ出て、 ポップバンパーに弾かれながら中央の穴で寝ている狐に落ちる装置。 omikujiMachines の一覧に加え、bell / slingshot と同じ確率で選ばれる (?scene=pinball で固定可)。 設計の要点(docs/backend.md にも記載): - 射出速度を [17,21]px/step に収める(弱いとレーンに落ち戻り、速いと壁を抜ける) - 玉が盤面へ出たらレーンの口に蓋を閉じ、跳ね返った玉が井戸へ落ち戻らないようにする - バンパーは反発係数でなく「一定速度で外向きに弾く」+ 向きに乱れ(シード注入可) - 床は中央の穴へ向かう2枚の台形斜面。右はレーン壁の手前で止める - スリングショットは壁に張り付けて隙間を作らない(隙間に落ちた玉が詰まった) ヘッドレス検証 scripts/simulate-omikuji-pinball.js(引き11段階×シード30=330点)で 失敗0・最遅到達8.9s・平均バンパー2.6回・無操作静止OK。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DwkB6Hj2JggoKcy7FoxNcU
レビュー指摘への対応: - 平らな蓋だと、天辺を右へ戻ってきた玉が蓋の上に載って右上の隅で止まった (330点中3点)。左下がりのくさびにして仕切り壁の上を伝って盤面へ落とす - 8秒の押し(nudge)が、まだ跳ね回っている玉の速度を書き換えていた。 静止している玉にだけ効かせる - 検証の合否: 狐に届かず静まった場合は止まった場所が穴の中でなければ失敗にし、 「届かず静止」の件数を要約に出す(棚止まりが見えなくなっていた) - omikujiMachines のインターフェースコメントを build(Matter, opts?) に更新 --seeds 30: 失敗 0 / 最遅到達 11.0s / 届かず静止 0(起こし 12s より手前)。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DwkB6Hj2JggoKcy7FoxNcU
- 蓋をくさびにして軌道が変わり、最遅到達が 11.0s になった。12s の起こしでは 長いラリーの途中で狐が起きうるので 14s にする(フェイルセーフ 20s は据え置き) - 押し(nudge)は静止検知が先に狐を起こすためほぼ保険であることをコメントと docs に書く - 検証スクリプトの冒頭の合否説明を、棚止まりを失敗にする現行基準に合わせる Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DwkB6Hj2JggoKcy7FoxNcU
kojira
added a commit
that referenced
this pull request
Sep 1, 2026
kojira
added a commit
that referenced
this pull request
Sep 1, 2026
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.
概要
おみくじ演出の装置に 3 つ目の「弾き盤」(ピンボール,
pinball)を追加します。#242 で装置を差し替え式にした続きです。右端のレーンにある御神玉(プランジャー)を下に引いて放すと、玉が天辺の弧を回って盤面へ出て、ポップバンパーに弾かれながら中央の穴で寝ている狐に落ちます。
bell/slingshotと同じ確率で選ばれ、確認用に/omikuji?scene=pinballで固定できます。変更
web/components/omikujiPinball.js(新規): 装置モジュール。omikujiMachines.jsのインターフェースを実装web/components/omikujiMachines.js: 一覧にpinballを追加web/scripts/simulate-omikuji-pinball.js(新規): ヘッドレス検証(引き 11 段階 × シード、--seeds N/--one/--trace)docs/backend.md: 装置一覧と「弾き盤の設計」を追記設計の要点
build(Matter, { rnd })で注入可)createSettleDetector)。押し 8s / 起こし 12s / フェイルセーフ 20s検証
yarn generate通過。🤖 Generated with Claude Code
https://claude.ai/code/session_01DwkB6Hj2JggoKcy7FoxNcU
Generated by Claude Code