Test swipe functionality on cloud game and verify touch protocol#3
Draft
Copilot wants to merge 2 commits into
Draft
Test swipe functionality on cloud game and verify touch protocol#3Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
…f normalized 0-65535 The cg.163.com JavaScript sends mobile touch events (down=1, move=2, up=3) using raw video pixel coordinates via send_touchstart/move/end_message which call this.transform() but NOT getPercentPos(). The 0-65535 normalization is only used for PC mouse events (codes 100+). The click handler already correctly used raw pixels (via pack_message), but the swipe handler was incorrectly normalizing coordinates to 0-65535 range, causing swipe touch points to hit completely wrong positions on screen. Co-authored-by: Tokisaki-Galaxy <61621971+Tokisaki-Galaxy@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Test drag and swipe functionality with Playwright
fix: use raw pixel coordinates for swipe touch events
Feb 6, 2026
Copilot
AI
changed the title
fix: use raw pixel coordinates for swipe touch events
Test swipe functionality on cloud game and verify touch protocol
Feb 7, 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.
Tested the cloud game swipe/drag functionality by connecting to cg.163.com, navigating the game, and verifying the touch event protocol against the official JavaScript client.
Findings
Touch protocol is correct: Reverse-engineered
chunk-common.c94e2694.jsconfirms mobile touch events usedown=1, move=2, up=3with raw video pixel coordinates. ThegetPercentPos()(0-65535 normalization) is only used for PC mouse events (codes 100+). Ourhandle_swipeandhandle_clickimplementations match this.Session time exhaustion: Initial clicks (START, login dialogs) worked. Later interactions appeared unresponsive because the cloud game session's
remaining_timehad dropped to ~35s by that point — the game was in a timeout/idle state, not a protocol failure.Protocol reference (from cg.163.com JS)
No code changes
The existing swipe implementation (
create_touch_cmdinhandle_swipe) correctly sends interpolated touch events with raw pixel coordinates. A fresh session with sufficient time is needed to complete the full warehouse navigation + swipe test.💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.