Skip to content

Fix PvP race conditions and centralize Firebase configuration#2

Open
0xRasmp wants to merge 14 commits into
NEEDcreations:gh-pagesfrom
0xRasmp:fix-pvp-race-conditions
Open

Fix PvP race conditions and centralize Firebase configuration#2
0xRasmp wants to merge 14 commits into
NEEDcreations:gh-pagesfrom
0xRasmp:fix-pvp-race-conditions

Conversation

@0xRasmp

@0xRasmp 0xRasmp commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

What this PR does:

  1. Fixes PvP Matchmaking Race Conditions:
    • Uses UID-based arbitration in pvp.js.src to prevent duplicate matches when both players find each other at the same time.
    • Updates firestore.rules to allow players to directly write match status updates client-side.
  2. Centralizes Firebase Config:
    • Moves Firebase credentials to a central firebase-config.js file.
    • Adds a USE_STAGING boolean toggle to easily switch between Production and Staging database configurations.
  3. Regenerates Builds:
    • Re-compiled bundle.js, bundle.src.js, and pvp.js to incorporate the configuration and PvP fixes.

NEEDcreations pushed a commit that referenced this pull request Jun 26, 2026
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.

1 participant