Skip to content

A multiplayer MUD(Multi-User Dungeon) game developed in Java

License

Notifications You must be signed in to change notification settings

stefangn98/java-mud-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

A simple CLI multiplayer game in Java

Instructions

  • Once extracted, use the make command in the terminal in the src folder
  • To start the server execute: java Server portnumber registrynumber maxgames maxplayers
    • An example would look like this: java Server 50015 0 5 16
  • To start a client execute: java Client hostname portnumber
    • Note: The hostname takes the name of your machine so use that.

Functionality

This application has been developed utilizing multithreading and the Java Remote Method Invocation API.

Whenever anything happens in the game, everything is logged to the server. In this case, it can be seen in the terminal on which the server was started. Users can do the following:

  • Register with a unique name.
  • Create, remove, join and exit MUD games.
  • Move around once a game is entered.
  • Interact with the world -> pick up items, open invetory, look around.
  • See if there are other players in the world.
  • Open a menu with help.

Utilizing multithreading I have implemented a sort of queue when joining the server or a game. If a user tries to enter a full server/game they will receive a message and be added to the queue. After some time a thread will make an attempt to join again untill there is a free spot. Note: As deadlocks and race conditions are a big issue when using multiple threads I have implement locks which ensure that processes will not overwrite eachother and everything can run concurrently without any issues.

Releases

No releases published

Packages

No packages published