1.4 KiB
1.4 KiB
Work Plan: Real Game & Online Multiplayer
User Epics
- Lobby System: Create and join private rooms.
- Game Setup: Use generated packs to start a game.
- Multiplayer Draft: Real-time drafting with friends.
- Chat: In-game communication.
Tasks
1. Backend Implementation (Node.js + Socket.IO)
- Create
src/server/managers/RoomManager.tsto handle room state. - Implement
RoomandPlayerinterfaces. - Update
src/server/index.tsto initializeRoomManagerand handle socket events:create_roomjoin_roomleave_roomsend_messagestart_game(placeholder for next phase)
2. Frontend Implementation (React)
- Create
src/client/src/modules/lobbydirectory. - Create
LobbyManager.tsx(The main view for finding/creating rooms). - Create
GameRoom.tsx(The specific room view with chat and player list). - Create
socket.tsservice insrc/client/src/servicesfor client-side socket handling. - Update
App.tsxto include the "Lobby" tab. - Update
CubeManager.tsxto add "Create Online Room" button.
3. Integration
- Ensure created room receives the packs from
CubeManager. - Verify players can join via Room ID.
- Verify chat works.
Technical Notes
- Use
socket.io-clienton frontend. - Generate Room IDs (short random strings).
- Manage state synchronization for the room (players list updates).