News:

Congratulations!
 You've won the News Item Lottery! Your prize? Reading this news item! :)

Creating double train lines

Started by Nathan Samson, August 12, 2008, 06:17:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Nathan Samson

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

prissi

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.

Nathan Samson

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.

Combuijs

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



prissi

As said, there is the preview modus, which should help you in building nonoverlapping tracks.

Nathan Samson

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)

isidoro

Quote from: Nathan Samson on August 12, 2008, 10:10:57 PM
[...]
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.

Nathan Samson

Quote from: isidoro on August 13, 2008, 05:48:08 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 ;)

yoshi

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.  ;)

Nathan Samson

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.

INB681

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.

Combuijs

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



Nathan Samson

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.

Kristian

Maybe you should change the gnome settings. I mean, gnome will always override the program-specific shortcuts, won't it?

Nathan Samson

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

Kristian

I wonder if that is already possible in the menu config file. Many keybindings are defined there..

prissi

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 ...

benjad

== 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 ==

prissi

AI can already make duoble track, since building as AI avoids rail connection at all cost (if the AI sets this flag, that is).