google / google/codeworld

Coalesce rapid mouse movements in games

オープン
#379 コメント 9 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement
主要言語
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

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

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