Hyperliquidのオーダーブックおよび約定履歴をWebSocketでリアルタイムに取得、売り方・買い方の約定履歴をもとに音ゲー(イメージとしてはダンスダンスレボリューション…
- User
Hyperliquidのオーダーブックおよび約定履歴をWebSocketでリアルタイムに取得、売り方・買い方の約定履歴をもとに音ゲー(イメージとしてはダンスダンスレボリューション)で遊べるようにして
- 上場している全銘柄をドロップダウンメニューから選択できる事
- HIP-3市場にも対応
- 音を聞くだけで買い方が優勢なのか、売り方が優勢なのか分かるようにしたい
- 注文サイズに応じた射倖心を煽る視覚効果
- ドーパミンが溢れ出すビート
Assistant
Confirmed the API shape — HIP-3 tickers use dex-prefixed names (e.g.
xyz:SP500) and work directly in WS subscriptions. Let me check the project config:Setup confirmed: React 19 + Tailwind v4, strict TS. I'll build HYPERBEAT — a DDR-style rhythm game driven by live Hyperliquid trades. Plan:
lib/hyperliquid.ts— REST meta fetch (all perp DEXs incl. HIP-3 + spot) + WS client (trades & l2Book)lib/audio.ts— fully synthesized dopamine beat engine whose key/brightness/stereo field encodes buy-vs-sell dominance- Canvas note-highway game with whale-tier jackpot FX
- UI panels: coin picker, order book, trade feed, dominance meter
Now the audio engine — a fully synthesized 132 BPM beat whose key, brightness, register and stereo pan encode live buy/sell dominance, plus combo-ladder hit SFX and whale drops:
Fixing the two lint issues (stray line in
kick, unusedtimer):Now the core game — the canvas note highway with DDR mechanics, whale-jackpot FX, particles, screen shake, fever mode, and autopilot:
Fixing a stray leftover expression in the HUD drawing code:
All panels compile. Now the main
App.tsx— wiring market discovery, WS lifecycle, trade aggregation into notes, whale-tier detection, dominance EMA, and the full layout:Fixing the
React.RefObjecttype reference in Highway (React default import was removed):Now let's build:
Build passed. I spotted one audio-scheduling bug: the milestone riser mixes
setValueAtTimewith pre-scheduled exponential ramps, which would cause a volume dip instead of a rise. Fixing:One robustness fix in the WS client: two effects can call
setCoinfor the same coin, which would double-subscribe and duplicate trades. Making subscription state idempotent, and removing a redundant ref in App:The lint errors were from intermediate edit states — let me verify the final WS client is consistent:
File is consistent. Rebuilding to confirm everything compiles:
完成しました。HYPERBEAT — Hyperliquid Orderflow Rhythm Machine がビルド成功です。
実装内容
リアルタイムデータ基盤 (
src/lib/hyperliquid.ts)metaAndAssetCtxs+perpDexs+spotMetaAndAssetCtxsで 全上場銘柄(メインDEX・全HIP-3ビルダーDEX・スポット)をインデックス- WebSocket で
trades/l2Bookを購読。HIP-3 はxyz:GOLD形式のDEXプレフィックス銘柄に対応、自動再接続・Ping維持・購読の冪等管理つき
全銘柄ドロップダウン (
CoinPicker)- 検索付き・DEX別グルーピング(Hyperliquid Perps / HIP-3 · xyz / HIP-3 · km … / Spot)・24h出来高・レバレッジ表示
音だけで売買の優勢がわかる (
src/lib/audio.ts)- 約定は 買い=右耳に明るい上向きブリップ、売り=左耳に暗い下向きグラインド にパンニング
- 買い優勢 → フィルター全開・ペンタトニック上昇ベース・高音アルペジオ+ディレイ・キラキラパッド。売り優勢 → ローパスで暗く歪んだフリジアンベース・短2度の不吉なドローン・低音スタブ
- 132BPMの四つ打ち+サイドチェーンポンプ+状態連動ハット密度の ドーパミンビート
射倖心を煽る視覚効果 (
Highway)- 約定額に応じてノートが巨大化・発光、ドル表示乗り、揺れ動くクジラノート
- Whale/MEGA判定(流動プールのP95動的閾値)で サブドロップ+ホーンスタブ+全画面フラッシュ+画面シェイク+中央バナー
- ヒットはコンボでペンタトニック音階を駆け上がり、25コンボで虹色FEVERモード、マイルストーンでライザー+クラッシュ
遊び方: D/F/J/K(or ←↓↑→ / タップ)で DDR式に判定(PERFECT/GREAT/MISS)。AUTOボタンでオートプレイ観戦モードにも。左にオーダーブック深度、右に Aggressionメーター(タグ・オブ・ウォー表示)とライブ約定フィードを配置しています。
Files built:
src/lib/format.ts,src/lib/hyperliquid.ts,src/lib/audio.ts,src/components/Highway.tsx,src/components/CoinPicker.tsx,src/components/OrderBook.tsx,src/components/TradeFeed.tsx,src/components/DominanceMeter.tsx,src/App.tsx,index.html,src/index.css
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.