Skip to content

EliaFantini/Master-of-Renaissance-A-java-online-multiplayer-board-game

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧝_♂️Master_of_Renaissance GitHub commit activity GitHub last commit GitHub code size GitHub repo size GitHub follow GitHub fork GitHub watchers GitHub star

Master of Renaissance is an online multiplayer board game coded in java, playable both on a javaFX GUI or on CLI.

The game was made as final project of the course Software Engineering (2020/2021) and presented as Engineering of Computing Systems Bachelor’s graduation's final project.

The game is entirely coded with java, plus javaFX and CSS for the GUI. Client side and Server side were both coded from the very backbone using a complex structure of java classes. Once the server has been set up and is running, all players can connect to it from all over the world (multiplayer function), chosing to play either on a command line user interface or on a more practical GUI. The server will wait for the players to join while players wait in a lobby screen, then the match will start.

Main functionalities:

  • Multiple games: the server can handle multiple matches between different players simultaneously.
  • Disconnections: if a player disconnects the server will save it's state and let the other players continue the match. When the player will join the match again, it will restart from where he had left.
  • Persistence: the server constantly saves all matches' states, so that if the server disconnects for some connection problems or it crashes, it is not a problem. In fact, whenever the connection problem is solved and the server is set up again and running, all the players will be able to rejoin the match, without having to start all over again.
Functionality State
Basic rules #c5f015
Complete rules #c5f015
Socket #c5f015
GUI #c5f015
CLI #c5f015
Multiple games #c5f015
Persistence #c5f015
Disconnections #c5f015

Authors

Gameplay

The following video shows a quick match between two players, one using the GUI and one using the CLI, while the server is running on the same machine (which is not necessary, it might have also been on another pc connected to internet). If you hare using Windows like me, you should run the CLI on the PowerShell or another shell substitute, it won't work on the command prompt. The GUI is optimized for a Full HD screen. Since my monitor is 2K, I could go to screen settings->resizing (on Windows) and set it to 125% to have a bigger window of the game and read the cards more easily, but in the video it was set to 100% to give a broader view of the two players.

2022-08-04.17-09-34.mp4

Contents

  • Deliverables: folder containing the two jar files (in the jar folder) to execute the server and the client, and another UML folder containing all sequence and class diagrams.
  • src: folder containing all code files, including code's tests.
  • Presentation.pdf: pdf with the project presentation.

How to run

  • Download the repository as a zip file and extract its content into a folder

  • In the Deliverables folder there are two multi-platform jar files, one to set the Server up, and the other one to start the Client.

  • If you don't have java installed in your machine, download Java 11 or higher first and install it.

  • The Server can be run with the following command on a shell prompt, as default it runs on port 1234:

    > java -jar MasterOfReinassanceServer.jar

    This command can be followed by these arguments:

    • -port: followed by the desired port number between MIN_PORT (1024) and MAX_PORT (65535) as argument;
    • -log: to save the log in a file;
    • -help: to get help.
  • The Client can be run with the following command on a shell prompt:

    > java -jar MasterOfReinassanceClient.jar
    • This command sets the Client on Graphical User Interface (GUI) mode, but it can be followed by -cli if the Command Line Interface (CLI) is preferred.
    • The Server's IP and port to connect to can be specified during the execution.

How to play

Click here to download the pdf with the rules of the game.

CLI View

Immagine1

GUI View

Immagine3

Server's simplified class diagram

Initial-Model-Controller_UML

Server-Client Network simplified class diagram

Initial-Network_UML

Tools used

🛠 Skills

Java, CSS, JavaFX, UML, JSON. Complex class structure with UML, advanced Java implentation of internet communication Client-to-Server and Server-to-Client. Game design for a practival and visually pleasing experience of the board game. Handling of server problems and features such as discconections, multiple games and match persistency.

🔗 Links

portfolio linkedin

License

This project is developed in collaboration with Politecnico di Milano and Cranio Creations

About

An online multiplayer board game coded in java, playable both on a javaFX GUI or on CLI, with many server features to make it robust to connection problems.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 99.6%
  • CSS 0.4%