Page 1 of 2

Another idea for rail curves

Posted: Sat Dec 31, 2016 6:30 pm
by Gergely
Factorio-train-idea.png
Factorio-train-idea.png (28.97 KiB) Viewed 4977 times
The individual pieces are connected at the blue dots. Note that the width shown (inner and outer curves) is just the width of two tiles for reference. Actual width would be less than two tiles.
Entities:
  • 0° straight track (1 track)
  • 0° to 26,57° turn (2 tracks)
  • 26,57° straight track (2 tracks )
  • 26,57° to 45° turn (1 or 2 tracks, see below)
  • 45° straight (1 track)
Pros:
  • Backwards compatible with the current layout.
  • S bends are possible
  • Does not rely on tracks automatically joining together

Re: Another idea for train layout

Posted: Mon Nov 19, 2018 12:36 pm
by ssilk
Added to viewtopic.php?f=80&t=19953 New types of rails (curves, s-curves ...)

... hm, you added it yourself. :)

Re: Another idea for rail curves

Posted: Mon Nov 19, 2018 1:38 pm
by Hannu
I agree, except I hope that new curves would be addition to current ones and have much larger radius. 50 units or 100 units for example. They would look so much better than current unrealistically tight curves in rail worlds.

Re: Another idea for rail curves

Posted: Mon Nov 19, 2018 2:13 pm
by Darinth
I think the main reason I like this is actually simply that (unless I'm mistaken) it allows for a s-curve that would only shift two tiles (one set of rail tiles) or any other arbitrary number of shifts by adding the 2x1 angled track in-between.

Re: Another idea for rail curves

Posted: Mon Nov 19, 2018 6:40 pm
by Sad_Brother
I like it, but some notes:

1.It would be nice to show current rail curves for comparison.
2.It would be nice to show possible signal positions.
3.It would be nice to explain transition between old and suggested curves.

Yes,I see how old this suggestion is.

Re: Another idea for rail curves

Posted: Mon Nov 19, 2018 6:59 pm
by darkfrei
The best solution is free-vector bezier procedural rails, that need some amount of rails for every segment. The maximum speed will be also for every radius calculated.

Re: Another idea for rail curves

Posted: Mon Nov 19, 2018 7:38 pm
by Sad_Brother
darkfrei wrote:
Mon Nov 19, 2018 6:59 pm
The best solution is free-vector bezier procedural rails, that need some amount of rails for every segment. The maximum speed will be also for every radius calculated.
You want to draw procedural sprites?

Re: Another idea for rail curves

Posted: Mon Nov 19, 2018 8:12 pm
by darkfrei
Sad_Brother wrote:
Mon Nov 19, 2018 7:38 pm
darkfrei wrote:
Mon Nov 19, 2018 6:59 pm
The best solution is free-vector bezier procedural rails, that need some amount of rails for every segment. The maximum speed will be also for every radius calculated.
You want to draw procedural sprites?
No, just short lines, that can be placed out-of-grid and connected together.

Re: Another idea for rail curves

Posted: Tue Nov 20, 2018 11:55 am
by ratchetfreak
darkfrei wrote:
Mon Nov 19, 2018 8:12 pm

No, just short lines, that can be placed out-of-grid and connected together.
what about the ties and gravel bedding. those are not as simple as bezier

Re: Another idea for rail curves

Posted: Tue Nov 20, 2018 1:31 pm
by Hannu
Sad_Brother wrote:
Mon Nov 19, 2018 7:38 pm
You want to draw procedural sprites?
Procedural means that computer draws bitmaps. 1 dimensional rail is very simple and fast to render. Noise algorithm which produce terrain and ore distributions would be easy to modify to produce good looking gravel and ties and rails are trivial. There could be special straight platform rails aligned with grid for loading and unloading.

That would probably not be very large work to do. Probably it would be as easy as tile based system if it was made now from scratch. but I think devs do not want to do it at this phase of development. The problem is that it would not give much for actual playing. Just more aesthetic rail lines for small number of railway enthusiasts. I think that at least 90 % never see problems with unrealistic curves, train physics, controls etc. In my opinion it would fit well in logistics game, but probably we have to wait someone programs nerdy rail simulator (I can help to program physics but I am not able to make better than box graphics).

Re: Another idea for rail curves

Posted: Tue Nov 20, 2018 3:21 pm
by Darinth
In the end, while I recognize that trains doing a 90 degree turn in what is probably all of like 50 feet at 150 mph (or more) is completely unrealistic, any normal train would fly off it's track, crash, and burn... I choose to believe that the trains are utilizing coupling of some kind in the interest of keeping the game-play on this aspect a little simpler. I mean... as long as the rails themselves are sturdy enough all it really takes is a coupling system attaching wheels to a secondary track underneath the main rail. Whenever the train begins to experience sufficient g-forces, the train utilizes those secondary wheels to clamp itself down to the track.

Completely unrealistic by any reasonable modern standards. But we have automated systems that are capable of putting together engines one moment and are then able to be instantly reconfigurable to make batteries. I think some sort of mechanic coupling system is well within the range of things that it's reasonable to assume that the trains can do.

Re: Another idea for rail curves

Posted: Tue Nov 20, 2018 3:37 pm
by Hannu
Darinth wrote:
Tue Nov 20, 2018 3:21 pm
Completely unrealistic by any reasonable modern standards. But we have automated systems that are capable of putting together engines one moment and are then able to be instantly reconfigurable to make batteries. I think some sort of mechanic coupling system is well within the range of things that it's reasonable to assume that the trains can do.
There is a problem. No existing material could hold such forces. In my opinion it is better not think everything technically. It is incredibly difficult to make a story or game physics, which has alternative natural laws, but not significant contradictions. Fantasy games solve it with magic but engineering games just do not talk and hope that no one notices. :)

Re: Another idea for rail curves

Posted: Tue Nov 20, 2018 3:57 pm
by Darinth
Hannu wrote:
Tue Nov 20, 2018 3:37 pm
There is a problem. No existing material could hold such forces. In my opinion it is better not think everything technically. It is incredibly difficult to make a story or game physics, which has alternative natural laws, but not significant contradictions. Fantasy games solve it with magic but engineering games just do not talk and hope that no one notices. :)
Shhh.... point (which I think we agree on) is that it's not worth worrying about the technicality that the trains moving as the speeds they do on the curves they do is unrealistic. Assume that there's space magic of some kind and move on.

Original suggestion resolves a major game pain of moving over one or two rail segments. The only thing that concerns me about it is additional stress placed on the pathfinding algorithm of the rail planner (this is a lot more possibilities for the rail planner to potentially take into account). There's probably not a good reason at this stage to do something more drastic like free-form splines.

Re: Another idea for rail curves

Posted: Tue Nov 20, 2018 3:57 pm
by eradicator
Darinth wrote:
Tue Nov 20, 2018 3:21 pm
But we have automated systems that are capable of putting together engines one moment and are then able to be instantly reconfigurable to make batteries.
Chemplants don't make engines :p. [/nitpick]
Hannu wrote:
Tue Nov 20, 2018 3:37 pm
Darinth wrote:
Tue Nov 20, 2018 3:21 pm
Completely unrealistic by any reasonable modern standards.
Fantasy games solve it with magic but engineering games just do not talk and hope that no one notices. :)
Any society with FTL captable drives should have access to some sort of inertia negation device. Scifi games solve it with magitech. ;).

Personally i think free-form rails are a two edged sword. Sure you can make some nice things, but it's also infinetly more annoying to build a perfectly neat grid aligned rail system. So a simple s-curve type element would suffice in my book. (As i don't dare to hope for the full 16-segment circle from the original thread.)

Re: Another idea for rail curves

Posted: Tue Nov 20, 2018 4:01 pm
by Darinth
eradicator wrote:
Tue Nov 20, 2018 3:57 pm
Darinth wrote:
Tue Nov 20, 2018 3:21 pm
But we have automated systems that are capable of putting together engines one moment and are then able to be instantly reconfigurable to make batteries.
Chemplants don't make engines :p. [/nitpick]
Ohh yeah! Those are made at the chemplant. Oops. *shrug*

Re: Another idea for rail curves

Posted: Tue Nov 20, 2018 4:04 pm
by Koub
Darinth wrote:
Tue Nov 20, 2018 3:21 pm
In the end, while I recognize that trains doing a 90 degree turn in what is probably all of like 50 feet at 150 mph (or more) is completely unrealistic, any normal train would fly off it's track, crash, and burn
viewtopic.php?f=5&t=52911

Re: Another idea for rail curves

Posted: Tue Nov 20, 2018 5:16 pm
by Darinth
Koub wrote:
Tue Nov 20, 2018 4:04 pm
Darinth wrote:
Tue Nov 20, 2018 3:21 pm
In the end, while I recognize that trains doing a 90 degree turn in what is probably all of like 50 feet at 150 mph (or more) is completely unrealistic, any normal train would fly off it's track, crash, and burn
viewtopic.php?f=5&t=52911
You didn't need that kidney... you have a second one... oops... make that had...

Re: Another idea for rail curves

Posted: Thu Nov 22, 2018 9:09 am
by Gergely
I just discovered a minor flaw in my design. Updated the topic header about it.

Re: Another idea for rail curves

Posted: Thu Nov 22, 2018 7:35 pm
by Sad_Brother
Gergely wrote:
Thu Nov 22, 2018 9:09 am
I just discovered a minor flaw in my design. Updated the topic header about it.
Wander, what is it?
Gergely wrote:
Sat Dec 31, 2016 6:30 pm
Cons:
  • The 26,57° to 45° turn is a bit cheesy. If this really has to be backwards compatible with the current system, said turn can only cost 1 track item (because 0° to 45° costs 3 tracks). However, it is possible to build tracks in a way that exploit this. If it were to cost 2 track items, it wouldn't be completely backwards compatible. But that's only because 0° to 45° turns would cost 4 tracks meaning that a full 90° turn would cost 9 tracks instead of 7. This problem can be solved by keeping the old 0° to 45° turn and just adding the new ones.
0° to 45° turns cost 4 to me. And full circle cost 36. Was it less really?

Also let me try to answer myself:
Sad_Brother wrote:
Mon Nov 19, 2018 6:40 pm
1.It would be nice to show current rail curves for comparison.
2.It would be nice to show possible signal positions.
3.It would be nice to explain transition between old and suggested curves.
1. As far as I understood here you suggest splitting curved track on halves and insert sloped 2/1 piece between them.
2. If it so signals would have more positions to be placed.
3. It seems 4 track curved part substituted by two new 2 track curved parts and that is all.

If I understood right, would you want to allow old smaller circles or would you force player to lay new larger versions?

Re: Another idea for rail curves

Posted: Thu Nov 22, 2018 11:04 pm
by Gergely
Sad_Brother wrote:
Thu Nov 22, 2018 7:35 pm
1. As far as I understood here you suggest splitting curved track on halves and insert sloped 2/1 piece between them.
That's right.
Sad_Brother wrote:
Thu Nov 22, 2018 7:35 pm
If I understood right, would you want to allow old smaller circles or would you force player to lay new larger versions?
I wouldn't want to allow the old 0° to 45° curves. Instead, they could be replaced with the two new turns during migration.

The only problem here is that it would increase the cost of a full 90° turn from 7 to 9 items, but nothing is perfect.