* 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
1.5 KiB
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
Your server has now started!
In Unciv itself, from the same computer, enter Options > Multiplayer.
Click the first text (Current IP address) to copy the IP to the clipboard. Then, click the second the second (Server IP address) to put your computer's IP in the "Server IP" slot.
If you click "check connection to server" you should now get "Return result: true", which means it's working!
So far you ran the server and connected yourself to it, but now for the interesting part - connecting other people!
The IP should still be in your clipboard - if not, just click the 'copy to clipboard' button again. Send the IP to the other device, there - copy it, and click 'copy from clipboard'. You can of course enter the IP manually if that's easier for you.
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!
Please note that devices NOT connected to the same server will NOT be able to participate in multiplayer games together!