A small project to discover online multiplayer games.
- Improve the UDP connection (see issue #47).
- Add better graphics, such as a manor environment and ghosts and hunters skins for players.
- Launch the game on the ISCSC remote server (see issue #48).
Here is how it looks like:
- pygame
- shapely
python3 server.py or make server
python3 client.py <Server_IP> <Server_Port> or make client SERVER=<Server_IP> PORT=<Server_Port>
- sends
CONNECT <Username> ENDand receivesCONNECTED <Username> <Screen_Size> WALLS <Walls_List> STATE <Players_List> ENDas a connection confirmation and to setup the state of the game locally.
- sends
INPUT <Username> <Input> ENDand receivesSTATE <Players_List> ENDto update the state of the game on the server, and then locally.<Input>can beLEFT,RIGHT,UP,DOWNfor movements ;RED,BLUE,ǸEUTRALfor teams ;READYto set player ready for game start ; and.for none.
- sends
DISCONNECT <Username> ENDand receivesDISCONNECTED <Username> ENDas a confirmation before quitting the game.
- Client sends periodically
PING <clock_time> ENDand receives the same message to estimate the ping with the server. - When the game has started, the ̀
STATE <Player_List>becomesSTATE <Player_List> SHADES <Shades_List>to communicate to each client the things they can see or not. - To recognize if the game is currently played or if players are in the lobby, the server sends
LOBBY <Ready_Players_List> ENDif the server is in a LOBBY state, which allow clients to display players which are ready to launch the game. It sendsGAME <Time> ENDif the server is ingame,<Time>being the remaining time for seekers to hunt. - To identify transition states, the server sends either
TRANSITION_GAME_LOBBY <Message> ENDorTRANSITION_LOBBY_GAME <Message> ENDto respectively inform clients the server is in a transition state from GAME to LOBBY, or LOBBY to GAME,<Message>being the text to display on clients screens : such as the remaining time before the switch and the team that has won the game.
