Skip to content

CoJaques/Pongly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


PONGLY

◦ Level up the fun with Pongly!

git-last-commit GitHub commit activity GitHub top language

📖 Table of Contents


📍 Overview

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

🚀 Getting Started

🔧 Packaging

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.

  1. Clone the Pongly repository:
git clone https://github.com/CoJaques/Pongly
  1. Change to the project directory:
cd Pongly
  1. Build the client and the server:
# Download the dependencies
./mvnw dependency:resolve

# Package the application
./mvnw package

🤖 Running Pongly

To 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 :

Note for windows user, use javaw in place of java

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

Server

java -jar server-1.0.jar [-P port] [-T nbThread]

Client

java -jar pongly-1.0.jar [-H hostname] [-P port]

Example

To run a server on the port 1300 with 12 threads use :

java -jar server-1.0.jar -P 1300 -T 12

To run a client which connect to the localhost adress using port 1300 :

java -jar pongly-1.0.jar -H localhost -P 1300

🤝 Contributing

Contributions are welcome! Here are several ways you can contribute:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages