Upcoming Games

(UTC times)


Full list
Add a game

Upcoming Events

No events to display

'Local' Chaining

You are here: Home > Forum > Wishlist > Features wish list > 'Local' Chaining

Page 1 of 1

'Local' Chaining 24/07/2019 at 15:17 #119592
Splodge
Avatar
720 posts
Online
Would it be possible to make an easier way of chaining two sims together on a single PC rather than through a network? I quite enjoy linking some sims (Stockport and Manchester South for example), but find the method of chaining the two (or more) sims rather frustrating, especially when loading saved games. It's also rather frustrating that only one of the sims can be used to pause the session, as I often use the keyboard for pausing, but this isn't possible if the 'wrong' window is in focus.

I realise it is an unlikely priority, and I certainly don't know how easy it would actually be, but do feel it would be a beneficial feature.

There's the right way, the wrong way and the railway.
Log in to reply
'Local' Chaining 24/07/2019 at 15:53 #119593
Noisynoel
Avatar
989 posts
To chain two sims on one PC use the same method but IP address of 127.0.0.1.
Pausing can only be done on one sim as only 1 sim can be the "master"

Noisynoel
Log in to reply
'Local' Chaining 24/07/2019 at 16:06 #119594
Splodge
Avatar
720 posts
Online
Yeah, I've done it before - it just seems overly complex with the IPs, ports and one being selected as a server - it tends to take me a few attempts and if you get it wrong have to go through the entire sim setup again. So this request is mostly borne from laziness on my part!
There's the right way, the wrong way and the railway.
Log in to reply
'Local' Chaining 24/07/2019 at 18:17 #119596
GeoffM
Avatar
6376 posts
Splodge in post 119594 said:
Yeah, I've done it before - it just seems overly complex with the IPs, ports and one being selected as a server - it tends to take me a few attempts and if you get it wrong have to go through the entire sim setup again. So this request is mostly borne from laziness on my part!
Recently a loader update included the ability to start hosting from a running sim (as well as starting off hosting). Menu: Multiplayer->Network Control.

SimSig Boss
Log in to reply
The following user said thank you: Splodge
'Local' Chaining 24/07/2019 at 20:55 #119598
clive
Avatar
2789 posts
Splodge in post 119592 said:
Would it be possible to make an easier way of chaining two sims together on a single PC rather than through a network?
The two simulations would still need to communicate. I don't know if Windows provides a separate inter-process communication channel other than TCP/IP. Even if it does, adding it would be a significant effort for a very marginal (IMO) gain.

I could imagine a few minor changes, such as a "this machine" button or having the server leave a note of what it is and which port it's on somewhere so they can be autofilled on the client, but I can't see doing much more than that.

Log in to reply
'Local' Chaining 24/07/2019 at 21:05 #119599
Steamer
Avatar
3985 posts
clive in post 119598 said:
Splodge in post 119592 said:
Would it be possible to make an easier way of chaining two sims together on a single PC rather than through a network?
The two simulations would still need to communicate. I don't know if Windows provides a separate inter-process communication channel other than TCP/IP. Even if it does, adding it would be a significant effort for a very marginal (IMO) gain.

I could imagine a few minor changes, such as a "this machine" button or having the server leave a note of what it is and which port it's on somewhere so they can be autofilled on the client, but I can't see doing much more than that.
To address one of the OPs comments, would it be possible to allow any sim to pause if the chain address is the local address?

"Don't stress/ relax/ let life roll off your backs./ Except for death and paying taxes/ everything in life.../ is only for now." (Avenue Q)
Log in to reply
'Local' Chaining 24/07/2019 at 21:15 #119600
alvinhochun
Avatar
249 posts
clive in post 119598 said:
Splodge in post 119592 said:
Would it be possible to make an easier way of chaining two sims together on a single PC rather than through a network?
The two simulations would still need to communicate. I don't know if Windows provides a separate inter-process communication channel other than TCP/IP. Even if it does, adding it would be a significant effort for a very marginal (IMO) gain.

I could imagine a few minor changes, such as a "this machine" button or having the server leave a note of what it is and which port it's on somewhere so they can be autofilled on the client, but I can't see doing much more than that.
There are named pipes (https://docs.microsoft.com/en-us/windows/win32/ipc/named-pipes). Technically they are streams but can be read/written with the ReadFile/WriteFile APIs. I think TCP sockets on Windows can also be used like file handles and read/written in the same way, which means they can effectively use the same code.

However, to avoid over-complicating things I imagine you can just use a local named pipe to automatically negotiate the TCP connections (like choosing port numbers).

Log in to reply
'Local' Chaining 25/07/2019 at 09:10 #119606
Jan
Avatar
906 posts
Steamer in post 119599 said:
To address one of the OPs comments, would it be possible to allow any sim to pause if the chain address is the local address?

If there is a desire to allow keeping the current behaviour for public hosts (only the host can pause the sim), perhaps just make it an option on the server (respectively the master sim for chains) to allow clients/chained neighbours to pause/unpause the sim, respectively prohibit them from doing so?

Two million people attempt to use Birmingham's magnificent rail network every year, with just over a million of them managing to get further than Smethwick.
Log in to reply
The following user said thank you: flabberdacks
'Local' Chaining 25/07/2019 at 16:21 #119607
SamTDS
Avatar
153 posts
alvinhochun in post 119600 said:
clive in post 119598 said:
Splodge in post 119592 said:
Would it be possible to make an easier way of chaining two sims together on a single PC rather than through a network?
The two simulations would still need to communicate. I don't know if Windows provides a separate inter-process communication channel other than TCP/IP. Even if it does, adding it would be a significant effort for a very marginal (IMO) gain.

I could imagine a few minor changes, such as a "this machine" button or having the server leave a note of what it is and which port it's on somewhere so they can be autofilled on the client, but I can't see doing much more than that.
There are named pipes (https://docs.microsoft.com/en-us/windows/win32/ipc/named-pipes). Technically they are streams but can be read/written with the ReadFile/WriteFile APIs. I think TCP sockets on Windows can also be used like file handles and read/written in the same way, which means they can effectively use the same code.

However, to avoid over-complicating things I imagine you can just use a local named pipe to automatically negotiate the TCP connections (like choosing port numbers).
127.0.0.1 and localhost always resolve to the local machine. Windows comes with a built in loop-back adaptor for these connection so it can be done even if you don't have a network card. Another plus is firewall does apply on this loopback adater so you can use whatever ports without and struggle. I do have some python code of running a chat server over TCP.

SamTDS - STDS | My comments are my opinions and interpretations and do not reflect on the wonderfull SimSig team. I am in no way part of the team.
Log in to reply
'Local' Chaining 25/07/2019 at 17:52 #119608
GeoffM
Avatar
6376 posts
While we can certainly look at improving/simplifying local connections and providing switchable controls (ie pause etc), adding a whole new comms system is really not on the cards.

Mantis 26256 and 26257.

SimSig Boss
Log in to reply
The following users said thank you: flabberdacks, Splodge
'Local' Chaining 26/07/2019 at 13:23 #119617
alvinhochun
Avatar
249 posts
SamTDS in post 119607 said:
alvinhochun in post 119600 said:
clive in post 119598 said:
Splodge in post 119592 said:
Would it be possible to make an easier way of chaining two sims together on a single PC rather than through a network?
The two simulations would still need to communicate. I don't know if Windows provides a separate inter-process communication channel other than TCP/IP. Even if it does, adding it would be a significant effort for a very marginal (IMO) gain.

I could imagine a few minor changes, such as a "this machine" button or having the server leave a note of what it is and which port it's on somewhere so they can be autofilled on the client, but I can't see doing much more than that.
There are named pipes (https://docs.microsoft.com/en-us/windows/win32/ipc/named-pipes). Technically they are streams but can be read/written with the ReadFile/WriteFile APIs. I think TCP sockets on Windows can also be used like file handles and read/written in the same way, which means they can effectively use the same code.

However, to avoid over-complicating things I imagine you can just use a local named pipe to automatically negotiate the TCP connections (like choosing port numbers).
127.0.0.1 and localhost always resolve to the local machine. Windows comes with a built in loop-back adaptor for these connection so it can be done even if you don't have a network card. Another plus is firewall does apply on this loopback adater so you can use whatever ports without and struggle. I do have some python code of running a chat server over TCP.
That's true. Come to think about it, there's little reason to do extra work with named pipes since SimSig can just choose a TCP port for local IPC. The only advantage with named pipe is that one can use a unique name (like an UUID) to avoid conflict. Even if the predefined port is being used by another process, SimSig can easily just knock on it to find out that it's not a SimSig instance and, I guess, disable the new features and require manual configuration?

Log in to reply
'Local' Chaining 26/07/2019 at 23:42 #119658
Mattyq
Avatar
259 posts
GeoffM in post 119608 said:
While we can certainly look at improving/simplifying local connections and providing switchable controls (ie pause etc), adding a whole new comms system is really not on the cards.

Mantis 26256 and 26257.
Regarding 26257, having client pause function would be of benefit. On more than one occasion I've been in a multiplayer sim where the host has declared AFK for a short while and, in that time, the excrement has collided with the cooling device.

Not fat ..... fluffy!! (G Iglesias)
Log in to reply
'Local' Chaining 06/08/2019 at 22:49 #119936
TylerE
Avatar
149 posts
Perhaps it would be an enhancement to have a default port per sim, which both client and server understand, so that you could just say "Connect to Sim $foo" and fill in the port based on foo?

So, like, King's Cross is always (or, by default at least), 50501, so if Peterborough is trying to connect to KC it will default to 50501.

This would seem to side-step a lot of tediousness.

Going even farther a local networking mode would always bind to 127.0.0.1 and the default per-sim port, and thus the user can be spared even knowing the settings exist.

Log in to reply
'Local' Chaining 06/08/2019 at 23:21 #119938
GeoffM
Avatar
6376 posts
TylerE in post 119936 said:
Perhaps it would be an enhancement to have a default port per sim, which both client and server understand, so that you could just say "Connect to Sim $foo" and fill in the port based on foo?

So, like, King's Cross is always (or, by default at least), 50501, so if Peterborough is trying to connect to KC it will default to 50501.

This would seem to side-step a lot of tediousness.

Going even farther a local networking mode would always bind to 127.0.0.1 and the default per-sim port, and thus the user can be spared even knowing the settings exist.
That would require allowing those ports past firewalls and port forwarding for most people, and potentially remotely configuring both which is not easy or reliable. Yes, some applications manage it, but it's not supported by all devices and I could see that causing more confusion.

SimSig Boss
Log in to reply