Unciv server (#6384)
* Background implementation for Unciv server with ktor.
Server ip in settings, able to copy your own ip and copy ip from clipboard for easy sharing, created stub for the client-server data transfer. No actual data storage or server implementation.
* Unciv server round 2 - implementing crud for files and it works!
metadata seems to only be in use for mutex, which is currently unused
That's all for today
* When starting a new multiplayer game the files are correctly saved in the server, and the server can return the files, but the function in the game to retrieve the game info is non-blocking so it doesn't work. Still, progress!
* Changed the Gdx http to basic Java http, as used for Dropbox, and now everything works!!!!
* Documentation for running and using the server
* Better texts, translations, etc
* Trog is right this should be a PUT not POST
2022-03-22 02:05:02 +07:00
# Hosting a Multiplayer server
Due to certain limitations on Dropbox's API, with the current influx of players, we've many times reached the point that Dropbox has become unavailable.
Therefore, you can now host your own Unciv server, when not on Android.
To do so, you must have a JDK installed.
From the directory where the Unciv.jar file is located, open a terminal and run the following line:
`java -cp Unciv.jar com.unciv.app.desktop.UncivServer`
2022-03-28 21:34:08 +07:00
Don't forget to use 'cd' to switch to the correct dictionary. Here's an example in Windows.
2022-03-31 14:47:58 +07:00
2022-03-28 21:34:08 +07:00
```
D:
cd Games
cd unciv
java -cp Unciv.jar com.unciv.app.desktop.UncivServer
```
Unciv server (#6384)
* Background implementation for Unciv server with ktor.
Server ip in settings, able to copy your own ip and copy ip from clipboard for easy sharing, created stub for the client-server data transfer. No actual data storage or server implementation.
* Unciv server round 2 - implementing crud for files and it works!
metadata seems to only be in use for mutex, which is currently unused
That's all for today
* When starting a new multiplayer game the files are correctly saved in the server, and the server can return the files, but the function in the game to retrieve the game info is non-blocking so it doesn't work. Still, progress!
* Changed the Gdx http to basic Java http, as used for Dropbox, and now everything works!!!!
* Documentation for running and using the server
* Better texts, translations, etc
* Trog is right this should be a PUT not POST
2022-03-22 02:05:02 +07:00
Your server has now started!
In Unciv itself, from the same computer, enter Options > Multiplayer.
2022-04-01 03:03:14 +07:00
Enter the URL of the computer you ran the server on (or http://localhost)
Unciv server (#6384)
* Background implementation for Unciv server with ktor.
Server ip in settings, able to copy your own ip and copy ip from clipboard for easy sharing, created stub for the client-server data transfer. No actual data storage or server implementation.
* Unciv server round 2 - implementing crud for files and it works!
metadata seems to only be in use for mutex, which is currently unused
That's all for today
* When starting a new multiplayer game the files are correctly saved in the server, and the server can return the files, but the function in the game to retrieve the game info is non-blocking so it doesn't work. Still, progress!
* Changed the Gdx http to basic Java http, as used for Dropbox, and now everything works!!!!
* Documentation for running and using the server
* Better texts, translations, etc
* Trog is right this should be a PUT not POST
2022-03-22 02:05:02 +07:00
If you click "check connection to server" you should now get "Return result: true", which means it's working!
2022-04-01 03:03:14 +07:00
For other devices, you'll need an external IP, which is out of scope for this documentation since there are many ways of achieving it.
Unciv server (#6384)
* Background implementation for Unciv server with ktor.
Server ip in settings, able to copy your own ip and copy ip from clipboard for easy sharing, created stub for the client-server data transfer. No actual data storage or server implementation.
* Unciv server round 2 - implementing crud for files and it works!
metadata seems to only be in use for mutex, which is currently unused
That's all for today
* When starting a new multiplayer game the files are correctly saved in the server, and the server can return the files, but the function in the game to retrieve the game info is non-blocking so it doesn't work. Still, progress!
* Changed the Gdx http to basic Java http, as used for Dropbox, and now everything works!!!!
* Documentation for running and using the server
* Better texts, translations, etc
* Trog is right this should be a PUT not POST
2022-03-22 02:05:02 +07:00
2022-04-01 03:03:14 +07:00
On the other device, do the same - enter the URL, click 'check connection' from the new device, and if you got the same result - congratulations, you're both connected to the same server and can start a multiplayer game on the server!
Unciv server (#6384)
* Background implementation for Unciv server with ktor.
Server ip in settings, able to copy your own ip and copy ip from clipboard for easy sharing, created stub for the client-server data transfer. No actual data storage or server implementation.
* Unciv server round 2 - implementing crud for files and it works!
metadata seems to only be in use for mutex, which is currently unused
That's all for today
* When starting a new multiplayer game the files are correctly saved in the server, and the server can return the files, but the function in the game to retrieve the game info is non-blocking so it doesn't work. Still, progress!
* Changed the Gdx http to basic Java http, as used for Dropbox, and now everything works!!!!
* Documentation for running and using the server
* Better texts, translations, etc
* Trog is right this should be a PUT not POST
2022-03-22 02:05:02 +07:00
2022-03-28 21:34:08 +07:00
Please note that devices NOT connected to the same server will NOT be able to participate in multiplayer games together!