Coalesce rapid mouse movements in games
- 主要言語
- Haskell
- スター
- 1.3k
- フォーク
- 201
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Games generate a LOT of mouse movement events, which are each propagated to all clients. We should be able to reduce this. For example, suppose each client tracked when it already had a mouse movement sent within the last 50 milliseconds; and if so, coalesced all consecutive mouse events and postponed broadcasting them until 50 milliseconds had passed.
We could also look into a trick similar to the redraw-avoidance. It's less straight-forward, though, because even if the MouseMovement doesn't modify local states, it still needs to be sent because it might matter in whatever (as yet unknown) state the game will be in, in the merged canonical event stream. So that's not great. BUT, if we could introspect that MouseMovement events are _always_ the identity function for a given game, then we could save a lot of traffic.
It's not immediately clear to me how to discover this. @nomeata knows a fair bit about this: any ideas?
コントリビューションガイド
調査の方向性
Issue では、ファイル、テスト、エントリポイントが特定されていません。まずマウス移動イベントの処理とクライアントへのブロードキャスト経路を特定し、次にここで言及されている再描画回避メカニズムと比較してください。イベントを安全にまとめる、または同一性を検出するアプローチを確立し、ゲームイベントの動作が正しいままであることを検証できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- haskell
- 領域
- game-dev, networking
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100