An open API service indexing awesome lists of open source software.

https://github.com/orangomango/basicmultiplayergame

Simple multiplayer game in LAN
https://github.com/orangomango/basicmultiplayergame

java javafx multiplayer socket threading

Last synced: about 1 month ago
JSON representation

Simple multiplayer game in LAN

Awesome Lists containing this project

README

          

# BasicMultiplayerGame
## What you need
* java 8+
* javafx 11+
* every player and the server in the same LAN
## How to run
* Clone the repository by using this command:
```bash
git clone https://github.com/OrangoMango/BasicMultiplayerGame
cd BasicMultiplayerGame/bin
```
* Create an environment variable for your javafx path:
```bash
export FX_PATH=/path/to/javafx/lib
```
### Server
Run the server:
```
java com.orangomango.multiplayer.Server
```
### Player
Connect a player:
```
java --module-path $FX_PATH --add-modules javafx.controls com.orangomango.multiplayer.Game
```
For example: `java --module-path $FX_PATH --add-modules javafx.controls com.orangomango.multiplayer.Game 127.0.0.1 1234 Paul 200 200 "#ff3333"`
## Controls
Use WASD or arrow keys to move the player and SPACE to jump. **Avoid the bars by jumping**
## Screenshot
![multi](https://user-images.githubusercontent.com/61402409/163718693-9b6c8efd-be17-47c6-ab1b-316ecbbfccb9.png)