The International Simutrans Forum

 

Author Topic: Networking Simutrans discussion  (Read 18596 times)

0 Members and 1 Guest are viewing this topic.

Offline Isaac.Eiland-Hall us

  • Benevolent Dictator
  • Administrator
  • *
  • Posts: 3649
  • PanamaCityPC.com/support/
    • Facebook Profile
  • Languages: EN
Networking Simutrans discussion
« on: January 01, 2010, 06:18:45 PM »
The networking code nearly reaches the first stage, where poeple can connect a game and play over the network on the same map. This long term effort is now coming into its final stage. You need a nightly and can then start a server by putting -server -log 0 -debug 0 on the commandline. In the client, you need to enter net:127.0.0.1 as name for the game to load.

This is still early code, so the nightlies actually may become instable for a little while. For playing, you might rather use 102.2.1. When reporting bugs on networking, at the moment report only those, where the client lost synchronisation reproducably and give exactly the order of commands needed and then last twenty lines of simu.log of the clients.

Bugs on joining and so on are still too early, as we know there are still many.

When this hits the nightlies - should one be able to run two copies of Simutrans to connect to the local server?
« Last Edit: January 02, 2010, 08:40:04 PM by IgorTekton »

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9460
  • Languages: De,EN,JP
Networking Simutrans discussion
« Reply #1 on: January 01, 2010, 08:03:47 PM »
YOu can do so now, it is already mostly in, the only problem is the logfile. But it should work.

(For non-professionals: 127.0.0.1 is your local IP address. Loading a file from net:127.0.0.1 will try to connect to a server from your local hard disk.)

Offline vilvoh

  • One of the good guys
  • Administrator (Inactive)
  • *
  • Posts: 4504
  • I'm the constructor, the architect
    • Escala real
Networking Simutrans discussion
« Reply #2 on: January 02, 2010, 07:03:04 PM »
It works!!  ;D

One thing. If you replace the local IP by another one from a pc where there's a server active, will it work?
« Last Edit: January 02, 2010, 07:23:32 PM by vilvoh »

Offline jonasbb

  • Web Team
  • *
  • Posts: 167
Networking Simutrans discussion
« Reply #3 on: January 02, 2010, 07:57:06 PM »
It works.
You have to check, that the port on which ST listen is open, if you use any fireqall or router.

Offline Isaac.Eiland-Hall us

  • Benevolent Dictator
  • Administrator
  • *
  • Posts: 3649
  • PanamaCityPC.com/support/
    • Facebook Profile
  • Languages: EN
Networking Simutrans discussion
« Reply #4 on: January 02, 2010, 08:04:13 PM »
Well. I guess this means I will have to try and get it working on my secondary server. :D

Do you have to have a GUI, or will it run from command line? (for the server)

Offline jonasbb

  • Web Team
  • *
  • Posts: 167
Networking Simutrans discussion
« Reply #5 on: January 02, 2010, 08:13:25 PM »
I think you need a GUI, because ST-Server has also a window in which you can play.
X-Forwarding could make ST-Server run on an Unix-like system without GUI.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9460
  • Languages: De,EN,JP
Networking Simutrans discussion
« Reply #6 on: January 02, 2010, 08:37:50 PM »
You can compile with backend=posix, this will generate a server without graphics. But it is way too early for real gaming, and the interface has several points where you might try a buffer overflow, ihmo. This needs much more debugging.

The default port is 13353, but it could run on any other port.

Offline Isaac.Eiland-Hall us

  • Benevolent Dictator
  • Administrator
  • *
  • Posts: 3649
  • PanamaCityPC.com/support/
    • Facebook Profile
  • Languages: EN
Re: Networking Simutrans discussion
« Reply #7 on: January 02, 2010, 08:45:46 PM »
What bugs *do* you want reported? Or none at all? heh

So far, I found:

- Running a server and one client on a single box works fine, but trying to join a second client on the same box causes protocol error, then crash.

- Running server as public service and client as human: 1) clicking to place a station causes the server to also show the orange coverage grid, and 2) clicking 'new line' in schedule box creates the line, but doesn't pop up the box to add stops; however, "update line" works. heh

Do you want reports of these types of things? I mean, there's no expectation for instant fix - as you say, it's really really early in the development. But I don't know if reporting these things would be helpful or a waste of your time :)

Either way, thank you for letting us play with this as is. I scared my wife when I loaded the client successfully, because I accidentally let out a shout of excitement. hehehe

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9460
  • Languages: De,EN,JP
Re: Networking Simutrans discussion
« Reply #8 on: January 02, 2010, 08:55:28 PM »
Second cient does not really work is a known issue.

You can report bugs, but many of them at least I am aware. So I would think best only desynchronisation issues, which I am most likely not aware.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4568
  • Languages: EN, DE, AT
Re: Networking Simutrans discussion
« Reply #9 on: January 02, 2010, 10:23:10 PM »
@Isaac: your bugs should have been fixed already :P

Offline Isaac.Eiland-Hall us

  • Benevolent Dictator
  • Administrator
  • *
  • Posts: 3649
  • PanamaCityPC.com/support/
    • Facebook Profile
  • Languages: EN
Re: Networking Simutrans discussion
« Reply #10 on: January 02, 2010, 10:34:03 PM »
I'm sorry, I don't know where discussion takes place on bug fixing, and this was from the latest nightly. But I'll check again next nightly :)

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Networking Simutrans discussion
« Reply #11 on: January 02, 2010, 10:38:02 PM »
If it's in nightly, it is probably official, so I would wager a guess - bug reports go in bug reports? ;)

Offline Isaac.Eiland-Hall us

  • Benevolent Dictator
  • Administrator
  • *
  • Posts: 3649
  • PanamaCityPC.com/support/
    • Facebook Profile
  • Languages: EN
Re: Networking Simutrans discussion
« Reply #12 on: January 02, 2010, 10:41:22 PM »
Given the introduction of the feature by Prissi, I wasn't so sure. :shrug:

Offline z9999+

  • Coder/patcher
  • *
  • Posts: 377
Re: Networking Simutrans discussion
« Reply #13 on: January 03, 2010, 01:56:08 AM »
Do you have a plan to support these problem below ?

- Ctrl and shift key handling.
 This is a basic feature to build roads. I mostly use it but not synchronize.
- Underground mode.
 This is also basic but not synchronize.
- Last used way ( "s", "t")
 Last used way is not player dependent currently.
- Map rotation
 Map rotation support is also not good.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4568
  • Languages: EN, DE, AT
Re: Networking Simutrans discussion
« Reply #14 on: January 03, 2010, 09:09:10 AM »
Do you have a plan to support these problem below ?
These are known bugs. The underground/visibilty checks have to be removed from the building routines, also the state of ctrl has to be transfered over network.

More known bugs:
-- pausing the game may or may not work correctly
-- the player menu is not synchronized (ie a client cannot start a new company)

@Isaac: I was not aware that no new nightlies were produced the last days. But now there is one

Offline z9999+

  • Coder/patcher
  • *
  • Posts: 377
Re: Networking Simutrans discussion
« Reply #15 on: January 03, 2010, 10:34:38 AM »
These are known bugs.

Okay, it's not playable yet.
Then why announcing now ? What is near ?

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18588
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Networking simutrans is near
« Reply #16 on: January 03, 2010, 11:03:18 AM »
Excellent! This should add an exciting new dimension to Simutrans. I can only imagine that a very large amount of work has gone into this - thanks to all involved!

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4568
  • Languages: EN, DE, AT
Re: Networking Simutrans discussion
« Reply #17 on: January 03, 2010, 12:10:45 PM »
What is near ?
A network playable version? Near is not the same as ready.

There are limitations now, yes, but if one knows them and avoids them, it is playable.

So considere this announcement as an early pre-alpha version.

Offline Isaac.Eiland-Hall us

  • Benevolent Dictator
  • Administrator
  • *
  • Posts: 3649
  • PanamaCityPC.com/support/
    • Facebook Profile
  • Languages: EN
Re: Networking Simutrans discussion
« Reply #18 on: January 03, 2010, 03:24:58 PM »
@Isaac: I was not aware that no new nightlies were produced the last days. But now there is one

Ah! Well, that explains the confusion. :D

I'll download and test more. And try and get my wife to help. :D

Okay, it's not playable yet.

Even with problems, I was able to play and test some. Sure, the bugs were out of date because the nightlies were behind, but still I know it will be helpful when I download the latest. :D



I'm very very thankful for the release of code into the nightlies, and the release of information on how to use what's there. It's exciting and fun! :D

Offline sojo

  • Devotees (Inactive)
  • *
  • Posts: 851
  • Maintainer pak96.comic
    • German home of Simutrans
Re: Networking Simutrans discussion
« Reply #19 on: January 03, 2010, 03:42:29 PM »
I have only a question. Sorry, if I had not read it.

Will there be a chatfunction?

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4568
  • Languages: EN, DE, AT
Re: Networking Simutrans discussion
« Reply #20 on: January 03, 2010, 04:02:58 PM »
I have only a question. Sorry, if I had not read it.

Will there be a chatfunction?
Why not? However, the implementation only slowly catches up with all the dreams and wishes :D

Offline IgorEliezer br

  • Devotee
  • Administrator
  • *
  • Posts: 4083
  • Cake recipes are cool... REALLY!
    • Igor Eliezer Architect and Urban Planner/Arquiteto e Urbanista
  • Languages: PT, EN, AutoLISP, Python
Re: Networking Simutrans discussion
« Reply #21 on: January 03, 2010, 04:14:15 PM »
While an in-game chat doesn't exit, go using Simutrans Chat. It's a poor solution, but solves things for a while.

Offline Ashley

  • Coder/Patcher
  • Devotee
  • *
  • Posts: 1288
    • entropy.me.uk
Re: Networking Simutrans discussion
« Reply #22 on: January 03, 2010, 07:21:24 PM »
Wow, I missed this, how awesome :)

Offline Isaac.Eiland-Hall us

  • Benevolent Dictator
  • Administrator
  • *
  • Posts: 3649
  • PanamaCityPC.com/support/
    • Facebook Profile
  • Languages: EN
Re: Networking Simutrans discussion
« Reply #23 on: January 04, 2010, 02:53:55 AM »
While an in-game chat doesn't exit, go using Simutrans Chat. It's a poor solution, but solves things for a while.

Next time someone edits simutrans.com page, should add this link:
http://webchat.quakenet.org/?channels=simutrans

No need to download a client :)

Actually... I'll see about redirecting chat.simutrans.us there (.com later maybe)

Offline seb444

  • *
  • Posts: 279
Re: Networking simutrans is near
« Reply #24 on: January 06, 2010, 10:30:46 PM »
Great  ;)

That's a good idea

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4568
  • Languages: EN, DE, AT
Re: Networking Simutrans discussion
« Reply #25 on: February 03, 2010, 08:45:45 PM »
- Ctrl and shift key handling.
 This is a basic feature to build roads. I mostly use it but not synchronize.
- Underground mode.
 This is also basic but not synchronize.
- Last used way ( "s", "t")
 Last used way is not player dependent currently.
This should work now with revision 3075.

Last used way is client dependent. Different players within one client share these default ways. (As it used to be without networkmode)

Offline Václav

  • Devotee
  • *
  • Posts: 3230
  • formerly VaclavMacurek
  • Languages: CZ, EN
Re: Networking Simutrans discussion
« Reply #26 on: February 05, 2010, 08:44:07 PM »
May be I am wrong: is server installed via (for example) VertrigoServ sufficient for net game? - or is some else server needed?

Download of VertrigoServ is available on SourceForge.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4568
  • Languages: EN, DE, AT
Re: Networking Simutrans discussion
« Reply #27 on: February 05, 2010, 09:43:01 PM »
you do not need an extra server. Simutrans itself acts as one: just start with parameter -server (only trunk version not stable release candidate).

Offline Václav

  • Devotee
  • *
  • Posts: 3230
  • formerly VaclavMacurek
  • Languages: CZ, EN
Re: Networking Simutrans discussion
« Reply #28 on: February 05, 2010, 09:44:50 PM »
So: it makes own server?

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4568
  • Languages: EN, DE, AT
Re: Networking Simutrans discussion
« Reply #29 on: February 06, 2010, 09:54:10 AM »
yes.

Disclaimer: current nightlies are built from the stable branch without networking.
if you want to try it out either (a) compile yourself, (b) take the last trunk nightly 3055 from january 27 or (c) wait until the stable is released and nightlies are built from trunk again.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4568
  • Languages: EN, DE, AT
Re: Networking Simutrans discussion
« Reply #30 on: March 29, 2010, 09:05:09 AM »
... the nightlies on the nightly downloadpage contain the network features (&bugs) again !

Please test!

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18588
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Networking Simutrans discussion
« Reply #31 on: May 17, 2010, 02:33:01 PM »
How is testing of the network multiplayer mode progressing?

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4568
  • Languages: EN, DE, AT
Re: Networking Simutrans discussion
« Reply #32 on: May 17, 2010, 04:04:53 PM »
One should compile the code for himself, since the savegame version simversion.h needs to be stepped up.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18588
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Networking Simutrans discussion
« Reply #33 on: May 17, 2010, 05:30:21 PM »
Dwachs,

is anyone running a server for testing this...?

Offline jonasbb

  • Web Team
  • *
  • Posts: 167
Re: Networking Simutrans discussion
« Reply #34 on: May 17, 2010, 06:18:08 PM »
You can run your own server.
A server where you can see all available games is not possible.

You have to start your own server and give the IP to the ST-client.