This project is a multiplayer game server-client application that allows users to upload and play games such as Tic-Tac-Toe. The server handles multiple clients simultaneously, managing game uploads and gameplay sessions.
- User authentication with username and password.
- Upload custom games written in C++.
- Compile uploaded games on the server.
- Play games in the terminal.
- Handle multiple client connections concurrently.
- C/C++
- POSIX Threads (pthread)
- Socket Programming
- Makefile for build automation
- Git for version control
-
Clone the repository:
git clone https://github.com/susmita2022khatun/multiplayer_game.git cd multiplayer_game
-
Server:
- Navigate to the server directory:
cd server
- Compile the server:
make
- Navigate to the server directory:
-
Client:
- Navigate to the client directory:
cd ../client
- Compile the client:
make
- Navigate to the client directory:
-
Start the Server:
- Navigate to the server directory:
cd server
- Run the server:
./server
- Navigate to the server directory:
-
Start the Client:
- Open another terminal window.
- Navigate to the client directory:
cd client
- Run the client:
./client
-
Authentication:
- Enter your username and password when prompted.
- After authentication, choose option 1 to upload a game.
- Enter the name of the C file you wish to upload (e.g.,
tic_tac_toe.cpp
). - Paste the content of your C game file when prompted.
- The server will compile the uploaded game. If successful, you'll receive a confirmation message.
- After authentication, choose option 2 to play a game.
- Enter the command to start the game (e.g.,
./tic_tac_toe
). - The game will start in the terminal, and you can play as prompted.