Right way to play on LAN?

Right way to play on LAN?

Discuss your problems with the latest release of the engine here. Problems with games, maps or other utilities belong in their respective forums.

Moderator: Moderators

User avatar
AndiNo
Posts: 24
Joined: 23 Mar 2009, 09:45

Right way to play on LAN?

Post by AndiNo »

Hi all!
Me and some friends have been playing Spring (with XTA, NOTA and BA) for some years now and are happy to see development still going forward! :-)
However whenever we play we still use the age old version 91.0 of Spring. The reason for that is that something changed in the newer versions of Spring and with that the lobby (in our case SpringLobby) changed with it. But all of these newer versions do not work with the SpringLS lobby server anymore. I read several times that SpringLS is not developed any further and as such is not supported anymore. The question now is:

What is the currently suggested way for playing on a LAN on Windows?

I insist that you please do not link me to the Wiki page "Playing on a LAN", as all the info there seems to suggest to either use SpringLS (which I could not get to work with any current Spring version nor SpringLobby - I already spent several hours(!) trying just that) or use uberserver, which seems to only work on Linux.
The thing is: I just can't imagine that there is NO way to play Spring on LAN! Doesn't anybody play that way anymore? Or do all you guys play on Linux?
Or is it just that I don't understand how this is supposed to work? Should I log onto the official online lobby server with SpringLobby and create my game there and have all my friends on the LAN connect to me through the internet? This seems to be no good idea when we could just use our much faster LAN connection.

Please excuse me if this text got too long. But this issue has bothered us for several years now. And to add to that all existing forum topics seem to be several years old.

Thanks for your attention and time! :-)
lamer
Posts: 153
Joined: 08 Mar 2014, 23:13

Re: Right way to play on LAN?

Post by lamer »

As a user who did LAN setup a year ago i can share my old recipe:
1) Install virtualbox.
2) Install Ubuntu 14.04 as a guest system.
3) Make sure ubuntu's network in virtualbox configured as "Bridged Adapter".
4) Install uberserver (and required python modules) inside ubuntu. Run it.

Code: Select all

$ sudo apt-get install build-essential python-dev python-pip
(optional, to read server.db) $ sudo apt-get install sqliteman
$ pip install virtualenv
$ git clone https://github.com/spring/uberserver.git
$ cd uberserver
$ virtualenv venv
$ source venv/bin/activate
$ pip install twisted pycrypto sqlalchemy
$ python server.py
5) Run springlobby from host system (mine is actually another linux) or any other system in LAN.
6) Enter ubuntu's LAN ip:port (8200 by default) as server, register new account, login as that account.
7) Create battle, play.

Checked: old setup still works (vm uberserver+springlobby+engine100+BA9.10).
Maybe Vagrant can automate a lot of steps?
Try running uberserver on Windows directly, as recently Twisted was used (to eliminate linux-only requirement?).
Last edited by lamer on 08 Oct 2015, 11:53, edited 2 times in total.
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Right way to play on LAN?

Post by gajop »

Should I log onto the official online lobby server with SpringLobby and create my game there and have all my friends on the LAN connect to me through the internet? This seems to be no good idea when we could just use our much faster LAN connection.
Spring should use the fastest connection, which means you'd only need the internet to host and join the game, but once it starts, it would go via LAN.
This still isn't ideal as you need to have all PCs connected to the internet and everyone needs accounts, and I'm not 100% sure it will work as I don't know how spring deals with NAT and route finding.
8611z
Posts: 169
Joined: 08 Jul 2015, 20:20

Re: Right way to play on LAN?

Post by 8611z »

all the info there seems to suggest to either use SpringLS (which I could not get to work with any current Spring version nor SpringLobby - I already spent several hours(!) trying just that) or use uberserver, which seems to only work on Linux.
After similiar experience my conclusion was the same as yours. In end only uberserver on Ubuntu worked, at least when testing at home alone from same PC.
If I remember Jools memberlist.php?mode=viewprofile&u=7909 also tried to set up uberserver for LAN and made some ready-to-go image, maybe he still has that? However we then played with superslow internet connection (from phone) on official server because that was way easier.
Should I log onto the official online lobby server with SpringLobby and create my game there and have all my friends on the LAN connect to me through the internet?
If you have connection to internet, imo the best way! I am not sure how well "create game" will work: Port forwarding could be problem, then other players will be unable to connect when game starts.(timeout countdown on black background) There is option in springlobby to use "relay hosts" and it gets around this problem, but in last years that has stopped working. (at least for me)
lamer
Posts: 153
Joined: 08 Mar 2014, 23:13

Re: Right way to play on LAN?

Post by lamer »

Alternative way:
1) Install vagrant
2) Get vagrant configuration, unzip in SomeDir
Vagrantfile.zip
(661 Bytes) Downloaded 28 times
3) C:\> cd SomeDir
4) C:\> vagrant up
5) Start springlobby and connect to 192.168.0.42:8200 (see Vagrantfile if you want to change ip)

First "vagrant up" will give enough time to read how to control it.
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Right way to play on LAN?

Post by Jools »

Yes, I tried to install Überserver for a week or so, I don't remember if I ever got it working, as there were a lot of bugs. I think I got to the point where the server itself worked but would crash as soon as somebody joined a room. I also tried with the other server and I think there was some similar kind of issue, but I didn't try with spring 91, only 98.0.

I tried to look for an image and I didn't find it, maybe I removed it already. If you really want it I can try and look for it again, but basically it was just a linux mint installation with the server stuff added on a thumb drive.

Maybe it would be a good idea to distribute an image like that anyway, would there be any problems, like copyrightwise, in doing so?
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Right way to play on LAN?

Post by gajop »

would there be any problems, like copyrightwise, in doing so?
Generally no.
lamer
Posts: 153
Joined: 08 Mar 2014, 23:13

Re: Right way to play on LAN?

Post by lamer »

Yet another option is to use server directly on Windows. (But i wouldn't recommend it: vagrant with virtualbox is much more fun and enlightening.)
uberserver_de1736a5_fix.zip
(7.81 MiB) Downloaded 193 times
This is uberserver wrapped by pyinstaller. It's based on latest commit with a small fix for Windows compatibility (CryptoHandler.py uses bad os.fchmod) thus expect bugs.

Tested battle with 2xWin7 machines and server running on one of them + springlobby 0.237 + BA 9.10 + engine 100.
Instructions:
1) Download server, unzip.
2) Run server.exe from command line. On first start wait until rsa keys generated (~3-5 minutes), ChanServ will appear in log when it's done.
3) Run springlobby and register at 127.0.0.1:8200 (or <LAN ip>:8200)
4) Connect, host/join battle, play.
hokomoko
Spring Developer
Posts: 593
Joined: 02 Jun 2014, 00:46

Re: Right way to play on LAN?

Post by hokomoko »

can the fix be merged into the repo? (with a check for os)
lamer
Posts: 153
Joined: 08 Mar 2014, 23:13

Re: Right way to play on LAN?

Post by lamer »

https://github.com/spring/uberserver/pull/185
https://github.com/spring/uberserver/pull/186 (I guess proper fix is inside comment to PR, not PR itself)
User avatar
AndiNo
Posts: 24
Joined: 23 Mar 2009, 09:45

Re: Right way to play on LAN?

Post by AndiNo »

Thank you for all of your replies :-)
I had hoped that there was a solution which did not include Linux in any way. But it seems this is the way to go.
Why is it that none of the lobby clients have any backwards compatibility with the old lobby server? Or on the other hand: Why can't SpringLS be adapted to the new Spring / lobby client versions?

Anyway, my friend and I were finally able to play the new Spring 100.0 version. We did what I initially assumed. We joined the official online lobby server and hosted our game there (with password) and connected through this way. Surprisingly and fortunately we had no problems with this :-) Speed was the same as on LAN, so gajop was right.

I have no idea how many Spring LAN players are out there. However I would strongly advise you (the Spring team) to find a way to get SpringLS working again or give players a better guide as to what they have to do to play on LAN. Few people I know have enough patience to look for a solution for getting such a basic feature (LAN multiplayer) to work.

Anyhow keep up the good work :-)
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Right way to play on LAN?

Post by abma »

AndiNo wrote:Why is it that none of the lobby clients have any backwards compatibility with the old lobby server? Or on the other hand: Why can't SpringLS be adapted to the new Spring / lobby client versions?
to few man power, lack of time. maintaining two pieces of software which basicly do the same is a waste of time.
User avatar
AndiNo
Posts: 24
Joined: 23 Mar 2009, 09:45

Re: Right way to play on LAN?

Post by AndiNo »

abma wrote:to few man power, lack of time. maintaining two pieces of software which basicly do the same is a waste of time.
That's a legitimate reason. I do not want to attack any of you, for you do a good job with Spring. However my opinion remains the same. If any "normal" user encounters such a problem he/she will probably just go away and not bother any more. This is just bad user experience.
But the most important point is that I got it working :-)
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Right way to play on LAN?

Post by abma »

AndiNo wrote: I do not want to attack any of you, for you do a good job with Spring. However my opinion remains the same. If any "normal" user encounters such a problem he/she will probably just go away and not bother any more. This is just bad user experience.
i didn't see this as attack, getting uberserver work on windows is still on the todo but low priority. maybe most recent patches already fixed it, idk :-)
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Right way to play on LAN?

Post by gajop »

AndiNo wrote:give players a better guide as to what they have to do to play on LAN. Few people I know have enough patience to look for a solution for getting such a basic feature (LAN multiplayer) to work.
I think it's a much better option to just require players to be online to play the game in LAN, by hiding the process you went through with a better UI while still relying on an active lobby connection.
Even if we had SpringLS updated or had uberserver work with Windows, it's ridiculous to expect people to download, configure and start their own server each time they want to play on LAN. That's a much bigger requirement than just to ask them to be online. Alternatively this could also be automated and hidden via a UI, but the "always online" option is much easier.
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Right way to play on LAN?

Post by Jools »

That's true, it is just easiest to be online. You can even use your iPhone's internet connection to host the server, in case you don't have a good connection otherwise.

But, the option to burn a ready image to a usb-stick wouldn't be that far of a second option. Most people can handle to do that, right? I suppose this would be most useful for the few times you have a lan party for instance. It's not that big of a deal to start one computer with a usb stick which has all the stuff on it.
lamer
Posts: 153
Joined: 08 Mar 2014, 23:13

Re: Right way to play on LAN?

Post by lamer »

Do you guys just ignore my posts?
1) Uberserver works on Windows! (thanks to abma for switching to Twisted)
2) It's possible to wrap python script into exe (with pyinstaller for example), so user don't need to install python or git (see my last post with attachement)!
But online connection if it's possible should be preferred.
Last edited by lamer on 13 Oct 2015, 14:27, edited 1 time in total.
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: Right way to play on LAN?

Post by Silentwings »

@all: I guess we should update https://springrts.com/wiki/Spring_on_a_LAN to say the preferred method is join online server, make passworded room.

@lamer/abma: If I do that, would you write a little piece below about uberserver, with some basic idea of what to do but making clear that its not the best way.

And afaics SpringLS is long gone and we should remove reference to it.
8611z
Posts: 169
Joined: 08 Jul 2015, 20:20

Re: Right way to play on LAN?

Post by 8611z »

lamer wrote:1) Download server, unzip.
2) Run server.exe from command line. On first start wait until rsa keys generated (~3-5 minutes), ChanServ will appear in log when it's done.
3) Run springlobby and register at 127.0.0.1:8200 (or <LAN ip>:8200)
4) Connect, host/join battle, play.
This seems simple enough for players to use. It is also how TAServer & springLS worked: Just starting some file, then entering the hosting player's IP.
Playing on LAN is not difficult, it only is (was) problematic because on windows there is (was) no working server.

The next problems LAN players encounter are:
1) Figuring out which combinations of mod/engine/maps/AI work. That is not really solved for internet-play either, so maybe they "just have to know it."
2) Solving the typical LAN-party problem where one player has all the game-files, and files must be copied to other computers.
(Spring's folders & settings structure means one can not just simply "copy the game." Also spring-installations can grow to several dozen gigabytes which makes them bit slow to share.)
lamer
Posts: 153
Joined: 08 Mar 2014, 23:13

Re: Right way to play on LAN?

Post by lamer »

@Silentwings (FAQ: How to run uberserver on windows?)
Next setup is python-32bit win7 oriented (for convinience), ommited virtualenv for guide simplicity.
1) install python into C:\Python27. Python (or rather it's scripts) doesn't like paths with spaces.
2) Add "C:\Python27;C:\Python27\Scripts" to PATH env var:
Start->Control Panel->System and Security->System->Advanced system settings->Environment variables->New or Edit PATH.
3) install git
4) install VC++2008 Express, because some of python modules require compiler (uncheck silverlight and other burdens).
5) Run git bash (for convinience)
6) $ git clone https://github.com/spring/uberserver.git
7) $ cd uberserver && pip install twisted pycrypto sqlalchemy
8) $ python server.py
Wait until rsa generated for the first time (surprisingly long). Done.

For those who curious about one-file-exe (ommiting upx installation):
1) pip install pyinstaller
PyInstaller requires additional hacks (and i don't want to investigate why).
2) C:\uberserver>for %I in (protocol\Protocol.py protocol\Channel.py protocol\Battle.py protocol\AutoDict.py) do copy %I .\
3) pyinstaller --hidden-import=Protocol --hidden-import=Channel --hidden-import=Battle --hidden-import=AutoDict --hidden-import=SayHooks --onefile server.py
4) copy additional agreement.txt (and other *.txt?) next to generated server.exe (inside new dist\ folder), run it.

Now before this mess of memories would go anywhere (especially to wiki) someone else has to go through the hell, test, edit and confirm it.

Agree with 8611z that issues exists (assuming they existed with SpringLS also?), but... no free windows lan testers?.. sad.
Post Reply

Return to “Help & Bugs”