Rebind keys per seat for two-player modes

オープン
#112 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
55/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript, vite
領域
frontend, game-dev

調査の方向性

Start with PLAYER_KEYS and resolveDefaults in shared/controls.ts, then read the sanitizing and clash handling in shared/settings.ts (around lines 239-255). The settings panel is in src/hub/settings-panel.ts, and shared/settings.test.ts is where the new tests belong. Run npm test; done means seat bindings persist, can be changed and restored on the hub, and clash checks cover them.

索引モデルが issue の本文から書いたものです。

説明

enhancement help wanted severity: low

Summary

Let players rebind the keyboard keys for player 1 and player 2 in two-player modes.

Where

  • shared/controls.ts:42-49 (PLAYER_KEYS: WASD + Space/Shift, arrows + Enter/Ctrl)
  • shared/controls.ts:97-115 (resolveDefaults ignores custom bindings for seats, except Pause and Mute)
  • shared/settings.ts:239-255 (clash handling covers only Pause and Mute)

Details

The two keyboard halves are fixed. The gamepad rebinding work (#71) deliberately left per-seat keys out.

Proposal

Add seatBindings: { 1?: ..., 2?: ... } to Settings (sanitized like bindings), have resolveDefaults prefer it over PLAYER_KEYS, add a "Player 1 / Player 2 keys" section to the hub settings panel that reuses the existing capture and clash checks, and include seat keys in the clash set sharedKeyCodes uses.

Who benefits

Players on non-QWERTY layouts (AZERTY moves A and W), laptops without a right Ctrl, or keyboards that drop some key combinations, in Snake versus, Pong versus and Siege co-op.

Acceptance criteria

  • Each seat's keys can be changed and restored on the hub.
  • shared/settings.test.ts covers sanitizing and clashes for seat bindings.

Getting started

  • Relevant files: shared/controls.ts, shared/settings.ts, src/hub/settings-panel.ts
  • How to run tests: npm test
  • Related: #63, #71

Filed by repo-audit/full-audit at de2b25b. Severity: low. Effort: M. audit-key: enhancement|shared/controls.ts|PLAYER_KEYS

主要言語
TypeScript
スター
3
フォーク
3
平均マージ
10時間 22分
マージ済み PR(30日)
6

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

TMHSDigital/GH-Arcade のほかの issue

TMHSDigital/GH-Arcade の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。