Skip to content

Conversation

Copy link

Copilot AI commented Feb 1, 2026

Player movement was broken and server tick remained stuck at 0 when WebSocket mode was enabled.

Root Cause

The client incorrectly stopped calling the server tick endpoint when WebSocket was active, assuming WebSocket would drive tick progression. However, the server's tick only advances when explicitly requested via the /tick endpoint. Without tick progression, the server never processes player movement updates.

Changes

  • Client tick update logic: Removed conditional check that disabled updateTick() calls in WebSocket mode
  • Clarifying comment: Added explanation that WebSocket only broadcasts state changes but doesn't advance server tick
# Before: tick updates disabled in WebSocket mode
if not self.using_websocket:
    tick_counter += 1
    if tick_counter >= tick_update_frequency:
        self.updateTick()

# After: tick updates always run
tick_counter += 1
if tick_counter >= tick_update_frequency:
    self.updateTick()

WebSocket now serves its intended purpose: real-time broadcast of state changes, while the client continues to drive server tick progression.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…t mode

Co-authored-by: dmccoystephenson <21204351+dmccoystephenson@users.noreply.github.com>
Copilot AI changed the title [WIP] Transition to Spring Boot server and Pygame client Fix player movement and server tick progression in WebSocket mode Feb 1, 2026
@dmccoystephenson dmccoystephenson marked this pull request as ready for review February 1, 2026 23:13
@dmccoystephenson dmccoystephenson merged commit 649ba7d into feat/server-client Feb 1, 2026
@dmccoystephenson dmccoystephenson deleted the copilot/sub-pr-266 branch February 1, 2026 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants