Scribble game#90
Open
ShireenAzad wants to merge 10 commits into
Open
Conversation
- Track host ID on room creation and expose it via snapshots (Scenario 1). - Implement 2s lobby polling on the frontend to sync player list. - Restrict 'Start Game' button to the host and enforce 2-player minimum. - Improve error handling for joining rooms with specific Zod validation messages. - Fix API base URL and add unit tests for host assignment and isolation. - Add 'playing' status and backend logic for starting games and assigning drawers (Scenario 2 foundation).
- Add 'playing' status and backend logic for starting games and assigning drawers. - Implement 'startGame' method in frontend store and API service. - Handle lobby-to-game transition via polling-based redirection. - Display secret word and role-specific UI on the game screen. - Add backend unit tests for game start logic and word visibility rules.
- Add 'canvasData', 'guesses', and 'scores' to Room model. - Implement backend services and API routes for drawing and guessing. - Update frontend store and components (Scoreboard, GuessForm, GamePage) to handle gameplay interactions. - Add backend unit tests for drawing permissions, guess validation, and scoring.
- Add 'result' status and backend logic for ending rounds and restarting games. - Implement 'endRound' and 'restartGame' methods in frontend store and API service. - Update GamePage and ResultPanel to display final round results (scores, word, history). - Reset room state and preserve participants on game restart. - Add backend unit tests for end-round permissions and restart state reset.
- Add HTML5 canvas to GamePage for interactive drawing. - Capture and JSON-encode strokes (coordinates) for backend synchronization. - Implement real-time rendering for drawers and polling-based sync for guessers. - Replace placeholder drawing simulation with a playable canvas mechanism.
- Factor in the ratio between CSS display size and internal canvas resolution in getMousePos. - Ensures drawing appears precisely under the cursor regardless of screen scaling.
- Document implementation of all four scenarios. - Reflect on AI-assisted workflow and architectural tradeoffs (polling, coordinate sync).
- Introduce 'drawerIndex' in Room model to track and rotate turns. - Implement random word selection for each round. - Add 'nextRound' backend service and API endpoint. - Update frontend store and ResultPanel to support continuous multi-round gameplay. - Add backend unit tests for turn rotation and randomization logic. - Update REFLECTION.md with Scenario 5 details.
- Include speckit.checklist for manual verification steps. - Include PULL_REQUEST.md for submission documentation.
- Move constitution to .specify/memory/constitution.md. - Split feature specifications, plans, and tasks into specs/NNN-* folders. - Ensure all artifacts meet the minimum character count requirements for validation. - Remove legacy root-level speckit files.
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.
Summary
This PR delivers a complete, playable multiplayer "Scribble" game. It covers all core scenarios including room management, secure role-based gameplay, interactive drawing, and scoring, plus an additional scenario for continuous multi-round play with turn rotation.
The implementation strictly follows the provided constitution, prioritizing minimal changes, architectural integrity (HTTP polling only), and robust validation.
Key Features & Changes
1. Room Management & Lobby (Scenario 1)
2. Secure Gameplay & Roles (Scenario 2)
3. Interactive Drawing & Guessing (Scenario 3)
4. Results & Turn Rotation (Scenarios 4 & 5)
Technical Integrity
/frontendand/backend.REFLECTION.md, and a manualspeckit.checklistprovided.Verification Steps
speckit.checklistto verify the end-to-end flow.npm run testin the/backenddirectory.Contributor