The International Simutrans Forum

 

Author Topic: Easier on Creation Simutrans Servers  (Read 2999 times)

0 Members and 1 Guest are viewing this topic.

Offline ROCAMBOLER529

  • *
  • Posts: 91
  • Languages: ES EN
Easier on Creation Simutrans Servers
« on: November 14, 2017, 09:03:39 PM »
I have friends that play in Simutrans but we dont know how to play simutrans together. I dont know why but the Simutrans Online Servers are in maint or down for any reason. Why not create an Online network easier that the actual network and why not create a Servers Creators easier than the actual.

Srry for my english i hope that you understand.

 

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2524
  • Languages: EN
Re: Easier on Creation Simutrans Servers
« Reply #1 on: November 14, 2017, 10:56:56 PM »
Quote
I dont know why but the Simutrans Online Servers are in maint or down for any reason.
The listing servers appear to be working fine. Those are the only official servers.

All actual servers on the listing server are privately and unofficially run by other Simutrans players.
Quote
Why not create an Online network easier that the actual network and why not create a Servers Creators easier than the actual.
Simutrans is primarily targeted at Linux. For that reason doing anything with it is not easy command line stuff.

The standard built client can be made to run with a server back end to it, if started with appropriate command line parameters. This works for simple private games, the server does not even need to be advertised on the listing server. Like all servers, if other people can connect is up to the local network administrator to make sure that the server machine can receive incoming TCP communications, something that might require port forwarding with local NATs or be impossible with carrier grade NATs.

Offline ROCAMBOLER529

  • *
  • Posts: 91
  • Languages: ES EN
Re: Easier on Creation Simutrans Servers
« Reply #2 on: November 15, 2017, 12:41:02 AM »
But the designers cannot build or design a new method to join &/or create a new private server for example,
a new option that it said "Create Server" or "Join Server". You must have a new world for this option, for that reason, when you press the buttom the sistem must open the New World menu with an aggregate that ask for the Hamachi ID. When you create the world the computer will send you an IP. This IP is going to use it to join the server when you press the buttom "Join Server". After pressing "Join Server", you must put the IP in the manual server selection and the Hamachi ID of the admin and the sistem must try to join the server. The composition of the code must be like this: Hamachi ID+Server IP, for example, 12.3.456.789:12345).


Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2524
  • Languages: EN
Re: Easier on Creation Simutrans Servers
« Reply #3 on: November 15, 2017, 04:37:30 AM »
Quote
But the designers cannot build or design a new method to join &/or create a new private server for example,
Seeing how the netcode has problems keeping clients in sync with each other when the network connection is unreliable there are far worse problems that need to be fixed first.
Quote
a new option that it said "Create Server" or "Join Server". You must have a new world for this option, for that reason, when you press the buttom the sistem must open the New World menu with an aggregate that ask for the Hamachi ID.
Simutrans does not need Hamachi, and I doubt any of the developers will support adding it as a requirement.
Quote
When you create the world the computer will send you an IP.
Simutrans is not a network stack driver. It will never generate IP addresses. All IP addresses are managed by the operating system network stacks.
Quote
This IP is going to use it to join the server when you press the buttom "Join Server".
One can already join servers by IP address. Instead of entering a domain name, one can simply enter the IP address and hit join. Simutrans supports connecting to servers via domain name lookup, IPv4 and IPv6 and should even work with multiple available network stacks.
Quote
The composition of the code must be like this: Hamachi ID+Server IP, for example, 12.3.456.789:12345).
I suggest reading up about IPv4 addresses and TCP communication protocols.

12.3.456.789:12345
IPv4 address -> 12.3.456.789
TCP Port number -> 12345

The way the server system is setup is such that one cannot dynamically start it, it must be started from the command line. This is typical practice for Linux applications and I do agree it is not user friendly.

Ideally the server and client system should be made the only way commands are processed. This would prevent the need for 2 command paths. To avoid network stack overhead if the server is internal to a client a special path could be used to feed in the packets and bypass the stack. Advertising a game could be as easy as changing the server settings. However this would be a non trivial change to implement.

In the mean time, to create a server I suggest you create a shortcut to your Simutrans executable and pass it the appropriate parameters. If you want a no graphics servers, eg for running on a dedicated computer, then you will need to build one yourself.

Online Leartin

  • Devotee
  • *
  • Posts: 1078
  • PAK-DEV P192C
  • Languages: DE, EN
Re: Easier on Creation Simutrans Servers
« Reply #4 on: November 15, 2017, 05:00:49 AM »
Just a suggestion, if creating a server of your own seems too hard for you, there is a service out there to create simutrans servers: http://www.simutrans.ovh/
If you feel there are not enough servers listed, you can create your own and get it listed for others to enjoy.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5368
  • Languages: EN, NO
Re: Easier on Creation Simutrans Servers
« Reply #5 on: November 15, 2017, 06:52:40 AM »
Why not create an Online network easier that the actual network and why not create a Servers Creators easier than the actual.
Simutrans is primarily targeted at Linux. For that reason doing anything with it is not easy command line stuff.

I don't get the impression that Simutrans is Linux targeted. Windows seems at least as important, if not more. However, Simutrans is made by relatively computer savvy people primarily for their own enjoyment. That they make it available for other people at all at no cost is a bonus.

On the other hand, Linux is the more common platform for running servers in general. Even Microsoft has had to admit that and now offers a Linux-like environment for Windows. (It is funny how they promote "Microsoft ♥ Linux", when it is everything but Linux, but I digress.) Linux is, especially when used for hosting servers, command-line oriented. However, these are servers that run non-stop for days, weeks or even months. (Maintenance and upgrades probably prohibit longer non-stop runs these days.) And when they do stop, they start again soon after, possibly automatically.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 17764
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Easier on Creation Simutrans Servers
« Reply #6 on: November 15, 2017, 10:59:12 AM »
Starting a server using Windows is not hard - just add a shortcut to Simutrans with the command line argument "-server". You can then set up the server directly from the normal Simutrans graphical interface. As long as the server remains running, people will be able to connect to it. If the correct settings are configured in simuconf.tab, it will be able to connect to the announce server and be listed publicly for all Simutrans players with the same version and pakset to see and connect to.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5368
  • Languages: EN, NO
Re: Easier on Creation Simutrans Servers
« Reply #7 on: November 15, 2017, 05:36:48 PM »
Starting a server using Windows is not hard - just add a shortcut to Simutrans with the command line argument "-server".

That might indeed be too hard for a lot of people. I would not be surprised if most of the worlds population, even if we exclude those who have not even used a computer, do not know what a shortcut or a command line argument is. In fact, I don't remember creating more than one shortcut explicitly in the past fifteen years or so. I might only know how to do so because it was a more useful skill to have in the Win9x era.

Offline ROCAMBOLER529

  • *
  • Posts: 91
  • Languages: ES EN
Re: Easier on Creation Simutrans Servers
« Reply #8 on: November 15, 2017, 09:15:18 PM »
Ok, so my idea has been rejected like all the others ideas... Is very hard to programm or create an easier way to create a private or public server on Simutrans?? Another thing... I dont know why but i dont see a public server open in the game more than one month!!! and i have a very good internet connnection.

Just a suggestion, if creating a server of your own seems too hard for you, there is a service out there to create simutrans servers: http://www.simutrans.ovh/
If you feel there are not enough servers listed, you can create your own and get it listed for others to enjoy.
Im a poor guy bro, i dont have money to rent a simutrans server!!
« Last Edit: November 15, 2017, 09:26:37 PM by ROCAMBOLER529 »

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 17764
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Easier on Creation Simutrans Servers
« Reply #9 on: November 15, 2017, 10:06:13 PM »
Ok, so my idea has been rejected like all the others ideas... Is very hard to programm or create an easier way to create a private or public server on Simutrans??

It is much, much, much harder to code a whole new way of setting up a server than it is to explain to people who want to set up a server to use a "-server" command line argument when starting an instance of Simutrans. If you really want to set up your own server, now that you know how to do so, there is really nothing stopping you.

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2524
  • Languages: EN
Re: Easier on Creation Simutrans Servers
« Reply #10 on: November 15, 2017, 11:58:51 PM »
Quote
Ok, so my idea has been rejected like all the others ideas... Is very hard to programm or create an easier way to create a private or public server on Simutrans?? Another thing... I dont know why but i dont see a public server open in the game more than one month!!! and i have a very good internet connnection.
Because no one has hosted a public server? They are not free to maintain after all, as they use power, internet bandwidth and hardware, so someone must devote some financial resources towards one.

Offline Isaac.Eiland-Hall us

  • Benevolent Dictator
  • Administrator
  • *
  • Posts: 3594
  • PanamaCityPC.com/support/
    • Facebook Profile
  • Languages: EN
Re: Easier on Creation Simutrans Servers
« Reply #11 on: November 16, 2017, 06:50:46 AM »
Just to add a little bit to that - a lot of games are set up such that setting up a public server is probably pretty okay to do for players. But with simutrans, it is much easier than with many games to cause mischief on a server. If players are not friendly to each other, it would be very easy to delete public roads others are using, or to otherwise easily cause their companies to fail.

So it makes much more sense for players to know each other or at least all be cooperative in nature, even while "competing" in the game.

As far as the difficulty on setting up a server: Well, I'm sympathetic to that, but at the same time, for many years, Simutrans didn't have an installer. Now it does. And now it's on Steam, which makes it even easier for more players to get it installed. So it's not like there hasn't been any progress over the years. But please realize that the community is small, and all volunteer. It might be one thing if the game was for sale - and even many games for sale have terrible support. The only way for more features to appear is for people to volunteer to make them and work with the community and existing developers to incorporate them. Until then, the existing programmers will continue to work on things they think are best, the things they have the time and energy for - and even now, they do so much for the game and community. It takes a long time to understand the code enough to contribute.

So while I understand the desire to have an easier way, or for public servers to exist; it's just not currently practical.

Although I do have on my to-do list figuring out how to do this as I want to host a game or two; although I suspect I may not be a great game host, as my time/interest is more long-term and slow than I think many network players would be. lol. And really, I'd like to develop a map and be the public player, building highways and such that others then use for their transportation networks..... Maybe one day. :)

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 17764
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Easier on Creation Simutrans Servers
« Reply #12 on: November 16, 2017, 09:38:49 AM »
...
Although I do have on my to-do list figuring out how to do this as I want to host a game or two; although I suspect I may not be a great game host, as my time/interest is more long-term and slow than I think many network players would be. lol. And really, I'd like to develop a map and be the public player, building highways and such that others then use for their transportation networks..... Maybe one day. :)

You would be welcome to act as public player in the next Simutrans-Extended public server game, which I anticipate starting shortly after the forthcoming version with the passenger and mail classes feature is launched.

Offline ROCAMBOLER529

  • *
  • Posts: 91
  • Languages: ES EN
Re: Easier on Creation Simutrans Servers
« Reply #13 on: November 16, 2017, 09:02:40 PM »
As far as the difficulty on setting up a server: Well, I'm sympathetic to that, but at the same time, for many years, Simutrans didn't have an installer. Now it does. And now it's on Steam, which makes it even easier for more players to get it installed. So it's not like there hasn't been any progress over the years. But please realize that the community is small, and all volunteer. It might be one thing if the game was for sale - and even many games for sale have terrible support. The only way for more features to appear is for people to volunteer to make them and work with the community and existing developers to incorporate them. Until then, the existing programmers will continue to work on things they think are best, the things they have the time and energy for - and even now, they do so much for the game and community. It takes a long time to understand the code enough to contribute.

I admired your text but... a lot of game have a easy connections on public & private server, i dont know why this game dont have it?? I can help you to programm it if you want. I dont know if you are agree of that or not but we need to do some several changes in the game about a lot of things (vehicles, routes, goods, passengers, mails, etc) If you want i will thinks some ideas to supports the nexts upgrades.


Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 17764
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Easier on Creation Simutrans Servers
« Reply #14 on: November 16, 2017, 09:10:13 PM »
I expect that Simutrans does not have this feature because it is maintained by amateurs in their spare time and it would take a large amount of time to code such a feature, which I suspect is seen as being of limited utility in comparison to other things.

If you think that so many things need to be changed in order simply to make it easier to set up a server, you might want to reflect on just how absolutely enormous a project that requires changing all of those things would be.

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2524
  • Languages: EN
Re: Easier on Creation Simutrans Servers
« Reply #15 on: November 17, 2017, 12:44:06 AM »
Quote
i dont know why this game dont have it??
It started development long ago before internet usage was wide spread. In fact both IPv6 and Multithreading, critical for modern network usage, are still optional build features! The game did not even support Unicode save file names on Windows until recently, and even now Unicode support is still flawed.
Quote
I can help you to programm it if you want.
These are very bold words to say. The sort which come from someone who has not looked at or fully understood the source code. It took me several hours to understand what the IPv6 build path is doing on Windows, I did not even bother looking at the non-IPv6 legacy build path (intended for pre SP Windows XP and older?) as that really should be removed. When I did this I did find several bugs as well, which were patched.

You still have not answered why it is so difficult to create a short cut and add a command line argument to it to enable a local server? For someone capable of volunteering to program this should be trivial. We all agree it is not optimal, but it could certainly be worse (no multiplayer at all).

Multiplayer currently needs improvements to the syncrhonization model. Specifically the addition of synchronisation signal packets that cause clients to pause when it is no longer safe to continue.

Offline ROCAMBOLER529

  • *
  • Posts: 91
  • Languages: ES EN
Re: Easier on Creation Simutrans Servers
« Reply #16 on: November 17, 2017, 01:53:12 AM »
So... is there a way to create a private server without having to pay?? Please if you want to write the steps, can you write them in details?


Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2524
  • Languages: EN
Re: Easier on Creation Simutrans Servers
« Reply #17 on: November 17, 2017, 04:20:04 AM »
Quote
So... is there a way to create a private server without having to pay?? Please if you want to write the steps, can you write them in details?
James already did...
Quote
Starting a server using Windows is not hard - just add a shortcut to Simutrans with the command line argument "-server". You can then set up the server directly from the normal Simutrans graphical interface. As long as the server remains running, people will be able to connect to it. If the correct settings are configured in simuconf.tab, it will be able to connect to the announce server and be listed publicly for all Simutrans players with the same version and pakset to see and connect to.
If people outside your network can connect to the server is another question, one unrelated to Simutrans. Simutrans server must be able to receive incoming TCP requests on the chosen port.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5368
  • Languages: EN, NO
Re: Easier on Creation Simutrans Servers
« Reply #18 on: November 17, 2017, 06:33:08 AM »
a lot of game have a easy connections on public & private server, i dont know why this game dont have it??

Most games also cost money, to purchase, to play online and/or to buy addictive in-game bonuses. And they are made and run by people who make a living out of making and running them. None of this is the case for Simutrans. There are some free games with a sizable selection of free services, but they have bigger communities than Simutrans. Or maybe they were lucky to have one very dedicated contributor with lots of time to spare.

Offline ROCAMBOLER529

  • *
  • Posts: 91
  • Languages: ES EN
Re: Easier on Creation Simutrans Servers
« Reply #19 on: November 17, 2017, 11:53:23 PM »
James already did.

Srry, DrSuperGood but where did James post a new topic with the steps to create a Simutrans server?


Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2524
  • Languages: EN
Re: Easier on Creation Simutrans Servers
« Reply #20 on: November 18, 2017, 01:35:34 AM »
Quote
Srry, DrSuperGood but where did James post a new topic with the steps to create a Simutrans server?
He did not post a new topic. He posted them above as reply 6...
« Reply #6 on: November 15, 2017, 10:59:12 AM » (UK standard time ~ GMT)

My original reply was not aware of this procedure. Last time I set up a server I used a self-built graphic-less server which needed more command line arguments. Here is an example of such command...
Code: [Select]
"Simutrans Server Release.exe" -log 1 -debug 2 -server 13353 -announce -server_dns 86.131.28.120 -lang en -objects pak/ -noaddons

Offline ROCAMBOLER529

  • *
  • Posts: 91
  • Languages: ES EN
Re: Easier on Creation Simutrans Servers
« Reply #21 on: November 19, 2017, 08:45:20 PM »
Starting a server using Windows is not hard - just add a shortcut to Simutrans with the command line argument "-server". You can then set up the server directly from the normal Simutrans graphical interface. As long as the server remains running, people will be able to connect to it. If the correct settings are configured in simuconf.tab, it will be able to connect to the announce server and be listed publicly for all Simutrans players with the same version and pakset to see and connect to.

Wait where is the command line agument??


Offline Isaac.Eiland-Hall us

  • Benevolent Dictator
  • Administrator
  • *
  • Posts: 3594
  • PanamaCityPC.com/support/
    • Facebook Profile
  • Languages: EN
Re: Easier on Creation Simutrans Servers
« Reply #22 on: November 20, 2017, 02:48:02 AM »
Wait where is the command line agument??

It is there. "-server". With no quotes.

Have you used the commandline before? You will need to learn how to open it and change to the correct directory using the "cd" command.

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2524
  • Languages: EN
Re: Easier on Creation Simutrans Servers
« Reply #23 on: November 20, 2017, 04:01:06 AM »
Quote
Have you used the commandline before? You will need to learn how to open it and change to the correct directory using the "cd" command.
Or on Windows one can create a shortcut to the executable and specify command line arguments there. This is arguably more user friendly as it does not involve running the Command Prompt.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5368
  • Languages: EN, NO
Re: Easier on Creation Simutrans Servers
« Reply #24 on: November 20, 2017, 07:03:42 AM »
You will need to learn how to open it and change to the correct directory using the "cd" command.

Or just go to the right directory and open the command prompt from there. With Windows Explorer, this is done by holding down Shift while right-clicking on the directory or in an empty space inside it. Unfortunately, the newest Windows 10 opens PowerShell, not the old MS-DOS-like shell, which takes many times longer to start up. I think I've seen similar options in other file managers, but I don't remember which or exactly how they work.