Pongly is a project that enables multiplayer Pong game. It includes both client and server components. The server component listens for client connections and assigns them to game parties. Each party consists of two players. The server uses multi-threading to handle multiple clients concurrently. The client component connects to the server and allows players to control their paddles in the game. It handles user input, updates the display, and communicates with the server to send/receive game data. The project provides a complete game solution for multiplayer Pong enthusiasts.
The protocol definition can be found here : https://github.com/CoJaques/Pongly/tree/main/ApplicationProtocolDiagram
You can package the jar file directly by using the maven wrapper packaged into the project. If you use Intellij IDE, the packaging configuration is embedded into the project.
- Clone the Pongly repository:
git clone https://github.com/CoJaques/Pongly- Change to the project directory:
cd Pongly- Build the client and the server:
# Download the dependencies
./mvnw dependency:resolve
# Package the application
./mvnw packageTo play the game, you need, at least, one server and 2 client. Go to the folder where the server and client jar are and use these command :
Options de la ligne de commande :
-H, --hostname : Specify hostname or ip adress of the server, default is localhost
-P, --port : specify the used port number, default is 1313
-T, --thread : Define max thread number for poolThread of the server
java -jar server-1.0.jar [-P port] [-T nbThread]java -jar pongly-1.0.jar [-H hostname] [-P port]To run a server on the port 1300 with 12 threads use :
java -jar server-1.0.jar -P 1300 -T 12To run a client which connect to the localhost adress using port 1300 :
java -jar pongly-1.0.jar -H localhost -P 1300Contributions are welcome! Here are several ways you can contribute:
- Join the Discussions: Share your insights, provide feedback, or ask questions.
- Report Issues: Submit bugs found or log feature requests for COJAQUES.
