CS128 Honors Gamestate & Description Doc
Team MemoryLeak: Yichen Liu (yichen32), Peiyang Guo (pg22), Weijia Zhang (weijia4)
Motivation: To learn about the technical skills required in practical multithreading and chatroom servers, team collaboration in coding, as well as deployment of rust projects.
Goal: Chatroom that supports multiplayer and creation and running of multiple simultaneous chatrooms based on similar rules to "Werewolves of Miller's Hollow"
Short Description: Multithreaded chat server/client and chatrooms for a mystery game similar to the "Werewolves of Miller's Hollow."
Roles
- Ruster (Killers)
- Vagrants (citizens with various roles)
Concepts
- Multithreading
- Chat server
- Docker/server rust deployment
Libraries and Tools Used
- Tokio-rs: Asynchronous networked rust application
Chat Server System
-
Struct Message: Convey Properties such as text, userID, time that needed for sending a message -
Class User: UserName, UserID and other properties that needed for a player’ -
Class Event(): Used for build channel, addListener(), receive and send message. -
Class Chatroom: a Chatroom class that contains everything needed for a chatroom
WaitForPlayers()Host()KickPlayer(Player player)InvitePlayer(Player player)
-
Class ChatroomManager: Used for managing, creating, searching and deleting multiple chat rooms. Use a map< key: int roomID, value: Chatroom room> to manage them.Create(Chatroom room)Delete(Chatroom room)Search(int roomID)Join(Chatroom room)
-
Class DatabaseInteraction: A class for interacting with databases
Game Loop System
- Game Loop
- Class GameState
- Role Assign
Struct AbstractRole:int id,Player&,Chatroom&,bool aliveStruct VagrantRoleextendsAbstractRole: xxxStruct RusterRoleextendsAbstractRole: xxx- Role Specific Chat (Use tag to set visibility)
- Different roles process
- Win/Lose Condition/Detection
Additional Features
- UI: Menu, RoleImage, VoteEffect, RoomBackground
- Voice Messages
| Date | Task |
|---|---|
| November 15 | Tasks up to Chatroom |
| November 30 | Complete Server-Server Chatting and Functional Game Website |
| December 5 | Complete Back-Front End Communication and Game Loop Preparations |
Project Oriented
- Group member availability and cohesion
- Limited efficient use of time in between difficult STEM courses, midterms, finals.
Technical
- Working with new rust crates (Tokio...)
- Docker and server deployment and testing