Skip to content

satyaabhiram/gaalihockey

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 

Repository files navigation

gaalihockey

https://github.com/satyaabhiram/gaalihockey

Description:
Our project is a 2 player online air-hockey game. Server can handle multiple games simultaneously.
On the server side, one thread is created for every match dynamically, which in turn creates multiple threads for moving the puck, watching for collisions, communicating with players.
Data races were dealt with Reentrant locks on position and velocity variables. We used immutable objects to keep XY coordinates thread-safe.

Instructions:
Download JavaFX 11
Extract the downloaded archive.
Set JAVAFX environment path to the lib folder in the unzipped folder and restart your terminal

Clone the repository or extract the downloaded repository zip

cd gaalihockey
make
cd out

Start the server

java --module-path $JAVAFX --add-modules=javafx.controls com.gaalihockey.server.Server

Start Player 1

java --module-path $JAVAFX --add-modules=javafx.controls com.gaalihockey.client.Client

Start Player 2 (You need at least two clients to start playing the game)

java --module-path $JAVAFX --add-modules=javafx.controls com.gaalihockey.client.Client

About

Concurrently robust adaptation of ping pong

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published