Author Topic: Creating double train lines  (Read 12577 times)

0 Members and 1 Guest are viewing this topic.

Offline Nathan Samson

Creating double train lines
« on: August 12, 2008, 06:17:11 PM »
Hi

When a user wants to create (for his trains) a double line (one track to the destination, one track back). He needs  to lay 2 tracks, but he needs to be carefull with the second track and lay it in short steps, otherwise it will interfere with the first one. Also he needs to manually add one-way signals.

My solution is is to create an interface (I dont really have an idea now how it would look without clutter) where he can say to lay 2 tracks, simutrans will then find the best way to build the double track so the 2 lines stay together;

Greetings,
Nathan

Online prissi

  • Developer
  • Administrator
  • *
  • Posts: 8798
  • Total likes: 319
  • Helpful: 229
  • Languages: De,EN,JP
Re: Creating double train lines
« Reply #1 on: August 12, 2008, 06:28:58 PM »
Was suggested many times before. Doable, but I consider building of suitable lines one of the main tasks of the player. Moreover, in reality double line tracks are not always close together. Epsecially when building seperately they often also are seperated in river valleys or mountainous regions.

But simutrans is open source and if somebody does some patch, it may be included.

Offline Nathan Samson

Re: Creating double train lines
« Reply #2 on: August 12, 2008, 06:39:40 PM »
Well I don't say the should be always next to each other, but only when possible.

Well, then make it easier to create lines so they don't interfere. In one direction you can create a line with some clicks, (click on the start location, move to the end location, click on the end location).
For the second direction you have to lay your line in small pieces so that it reuse the other line - which can be usefull in some cases, but not always like in this situation.

Offline Combuijs

  • Web Team
  • Devotee
  • *
  • Posts: 1387
  • Total likes: 22
  • Helpful: 53
  • Maintainer of maps.simutrans.com
    • Combuijs
  • Languages: EN, NL
Re: Creating double train lines
« Reply #3 on: August 12, 2008, 06:48:54 PM »
In one of the nightly builds before the 100.0 version, there was a possibility to get a preview of the result while dragging the second track. If you use the Ctrl-button while dragging, you could easily control your double track. I don't know if this feature made it to the 100.0 version, but I thought that was very useful.
Bob Marley: No woman, no cry

Programmer: No user, no bugs



Online prissi

  • Developer
  • Administrator
  • *
  • Posts: 8798
  • Total likes: 319
  • Helpful: 229
  • Languages: De,EN,JP
Re: Creating double train lines
« Reply #4 on: August 12, 2008, 07:07:23 PM »
As said, there is the preview modus, which should help you in building nonoverlapping tracks.

Offline Nathan Samson

Re: Creating double train lines
« Reply #5 on: August 12, 2008, 10:10:57 PM »
Well, the preview mode (as I know it) only helps to prevent you from building overlapping tracks. (I only see a preview when I drag the track from the starting point to the end point what Combuis said about the ctrl doesn't seem to work here)
The preview mode doesn't really help when you create a long track, you have to build the second track in small pieces (or place it at a long distant from the first one, but that isn't always an option)

Offline isidoro

Re: Creating double train lines
« Reply #6 on: August 13, 2008, 05:48:08 AM »
[...]
The preview mode doesn't really help when you create a long track, you have to build the second track in small pieces (or place it at a long distant from the first one, but that isn't always an option)
[...]

If you want to control exactly at what points the first track passes, you have to build that first track in small pieces too.  The main problem for beginners is building non-merging diagonal tracks.  But turning the grid on, if you realize that on each square there can only be one piece of track, it is easier.  A diagonal track is like a stair: one tile up, one to the left, one up, one to the left and so on.  If you can fit two such "stairs" without overlapping, no merging will happen.

Offline Nathan Samson

Re: Creating double train lines
« Reply #7 on: August 13, 2008, 10:09:41 AM »
If you want to control exactly at what points the first track passes, you have to build that first track in small pieces too. 

That is exactly what I don't want, most of the time I let simutrans choose the route of the track - since it is quite good, and later on I do some (small fixes).

Quote
The main problem for beginners is building non-merging diagonal tracks.  But turning the grid on, if you realize that on each square there can only be one piece of track, it is easier.  A diagonal track is like a stair: one tile up, one to the left, one up, one to the left and so on.  If you can fit two such "stairs" without overlapping, no merging will happen.
Well, I know that, so I don't really have problems - anymore - with building diagonal tracks. Only that I HAVE to do that manually - current behavior can stay (as default). Imagine you have a diagonal track from A to B that is 50 tiles long, you have to build the second track tiles per tile, and that for 50 tiles (and probably more if you have a really long track). I'm wonderign why no-one sued the simutrans developers yet for creating RSI ;)

Offline yoshi

  • Devotee
  • *
  • Posts: 133
  • Total likes: 2
  • Helpful: 0
  • PAK128.Japan Maintainer
    • pak128.Japan
  • Languages: JA
Re: Creating double train lines
« Reply #8 on: August 13, 2008, 10:24:43 AM »
I can build tracks exactly where I want, using Ctrl key and preview mode...

Maybe you need to get a bit more famillier with the way Simutrans works.  ;)

Offline Nathan Samson

Re: Creating double train lines
« Reply #9 on: August 13, 2008, 10:43:02 AM »
Well 2 things

1. How works that ctrl key (it doesn't seem to do here anything), I can get a preview if I drag-n-drop the track.
2. I also can (more or less) build tracks exactly how I want them - What I cannot is creating a long double track in some clicks, I have to go by the whole route to build the track.

Offline TPIBAW

Re: Creating double train lines
« Reply #10 on: August 13, 2008, 06:26:47 PM »
Hold the ctrl key while building your second track, that will override using your first and lay it straight. That also works with other waytypes.

Offline Combuijs

  • Web Team
  • Devotee
  • *
  • Posts: 1387
  • Total likes: 22
  • Helpful: 53
  • Maintainer of maps.simutrans.com
    • Combuijs
  • Languages: EN, NL
Re: Creating double train lines
« Reply #11 on: August 13, 2008, 09:17:24 PM »
Holding the Ctrl-key really does the trick. In preview mode feedback might be a little bit slow, fiddling with the mouse doe3s help sometimes, but in the end you really get a preview.
Bob Marley: No woman, no cry

Programmer: No user, no bugs



Offline Nathan Samson

Re: Creating double train lines
« Reply #12 on: August 13, 2008, 11:07:27 PM »
Well, it seemed that ctrl didn't work here because gnome takes it over (I enabled the setting ctrl shows the location of the mouse) - Maybe I should post a bug report in another thread.

Thanks for your help.

Offline Kristian

Re: Creating double train lines
« Reply #13 on: August 14, 2008, 06:50:31 AM »
Maybe you should change the gnome settings. I mean, gnome will always override the program-specific shortcuts, won't it?

Offline Nathan Samson

Re: Creating double train lines
« Reply #14 on: August 14, 2008, 10:21:02 AM »
The problem is that I can't change the gnome setting (or I have to turn that feature off, but I don't want that)

What simutrans could do is make the keybindings configurable so that I can choose to use shift (or alt or whatever) instead of ctrl

Offline Kristian

Re: Creating double train lines
« Reply #15 on: August 14, 2008, 10:31:36 AM »
I wonder if that is already possible in the menu config file. Many keybindings are defined there..

Online prissi

  • Developer
  • Administrator
  • *
  • Posts: 8798
  • Total likes: 319
  • Helpful: 229
  • Languages: De,EN,JP
Re: Creating double train lines
« Reply #16 on: August 14, 2008, 12:13:31 PM »
CNTRL is nearly the only non-configurable key (other are keypad number, DEL, ESC and Backspace).

Making gnome catch cntrl is also not good, because in a terminal control key is often needed too ...

Offline benjad

Re: Creating double train lines
« Reply #17 on: August 16, 2008, 01:32:55 AM »
== out of hibernation ==

This might be a useful feature, but as mentioned, not for the player.

Would this be a useful function for the AI players to be able to use, to make terminal stations with one way tracks leading two and from?

I agree that building your network is part of your job.

== returns to hibernation ==

Online prissi

  • Developer
  • Administrator
  • *
  • Posts: 8798
  • Total likes: 319
  • Helpful: 229
  • Languages: De,EN,JP
Re: Creating double train lines
« Reply #18 on: August 16, 2008, 11:09:37 AM »
AI can already make duoble track, since building as AI avoids rail connection at all cost (if the AI sets this flag, that is).