FuryoftheStars wrote: ↑Mon Jan 22, 2024 3:55 pm
Something to consider: does the player want to just flip the signals, only the other entities around the tracks, or both? I can see use cases for all 3, but this would require additional modes to handle, which, to me, just further bloats an already fairly bloated set of keybinds.
*shrug*
That is overcomplicating it. Think of tracks like transport belts. If you have a blueprint with belts running north, then west, then north again, and you flip it horizontally, then the result will be north, east, north. Overall, items would still be moved from south to north, but diverted east instead of west in the middle.
- belt-flip.png (733.91 KiB) Viewed 1306 times
For tracks, it should be the same: the track direction should be preserved. Northbound should stay northbound, southbound should stay southbound, and bidirectional should stay bidirectional. In the case of northwest-bound track, it would become northeast-bound after a horizontal flip.
- rail-flip.png (1.15 MiB) Viewed 1306 times
The only difference to belts is that rail pieces have no directionality built into them. It's a "feature" you add to them by attaching rail signals and train stops. If belts didn't have built-in directionality, but required a motor to be attached on the side that could apply torque in only one direction (so direction would be determined by which side of the belt you attached it to), then we would have the same problem. But the semantics of flipping such belts would be the same as the belts we have in the actual game.
- engine-powered-belt.png (669.14 KiB) Viewed 1306 times
The other notion of flipping that you're thinking of would be analogous to
reversing belt lines. This could be a more specialized tool for rail signals, or a mode of some sort of "rail planner", but it is not something that a
general flipping operation should do. The F/G flipping shortcuts are general flipping shortcuts so I want to focus on that. There is always room to add other tools or shortcuts, but I am more interested in expanding the existing flipping feature in a way that makes the most sense.
Another thing is that we all know about elevated rails in the expansion, and in the case of elevated rails the collision issue of rail signals goes away completely, because there are no other entities that can be attached to rails or that can collide with rail signals on that layer. So should we be unable to flip elevated rails when there is nothing preventing signals from being adjusted to preserve directionality?
Actually, there is still the potential for circuit network connections to exceed the maximum wire reach after a signal is adjusted, but how often would that happen?
This is the issue of universality: just because not every scenario can be handled, should we forgo tools when they could be useful in many or even a majority of other scenarios? We already have blueprint flipping even though some entities cannot be flipped, meaning that the game checks each blueprint for the presence of such entities and, if it finds any, prevents you from flipping the blueprint.
So we have the ability to flip blueprints when it is useful, and we don't when it isn't. I suggest that this logic be extended to rails by adjusting rail signals and train stops whenever possible, taking into account the two considerations: collisions and wire reach limits (for rail signals and train stops). If a safe flip is not possible, a floating text would appear saying "Cannot flip blueprint. At least one rail signal cannot be adjusted."
It might be a lot more work to check these things, but there are surely ways to optimize it (and it only really would need to be done once for each blueprint, some time between setup and the first attempt to flip it, which would pretty much always be at least several ticks, during which the game could complete this task, in small chunks at a time, so that it doesn't cause noticeable UPS dips for extremely large blueprints).
FuryoftheStars wrote: ↑Mon Jan 22, 2024 3:55 pm
Edit: And I would think that flipping signals would only be a MP issue? I mean, I suppose I can't speak for everyone, but I only use 1 style because that's my preferred and it'd make it confusing as all get out if I was alternating between the two between different playthroughs, let alone on the same one.
Flipping can still be useful for other blueprints, like stations, where the LHD <> RHD swapping isn't an issue.
- flippable-station.png (1.42 MiB) Viewed 1306 times
FuryoftheStars wrote: ↑Mon Jan 22, 2024 3:55 pm
I also think it'd probably be good form if MP servers hosted their respective LHT/RHT track blueprints knowing this, then players can just have trackless blueprints for their desired setups.
Good idea, but some blueprints have circuit network logic hooked up to the train stops or rail signals, so they work better as a single blueprint.
FuryoftheStars wrote: ↑Mon Jan 22, 2024 3:55 pm
I suppose another thing that would be of use considering is that everyone has different spacing preferences between tracks, so it'd be kind of hard to have all the correct LHT/RHT blueprints, anyway.
True, but 2- and 3-spacing is so common that I have found having a few mainline blueprints just for that is enough usually.
mmmPI wrote: ↑Tue Jan 23, 2024 8:50 am
Currently in the game you can flip blueprint containing rails , but not blueprint containing train signals or train stops and i think it make sense because sometimes it would be impossible due to tile not being free whereas rails can always be built on top of each other.
Why limit a general feature because of specific problem cases? It is up to the player to decide how to design things and which considerations to prioritize or ignore. If you don't care about being able to have a LHD variant of your intersection, why should everyone else be limited? Nothing would force you to flip your rail blueprints, and if you pressed the shortcut by accident, you just press it again to unflip it.
You can make certain inserter and belt configurations that cannot be flipped properly. This is not a reason to make all blueprints containing inserters facing belts unflippable. The game doesn't even prevent you from flipping such arrangements and doesn't alert you to it when you do. It's okay to trust players to figure these things out.
- inserter-dropoff-bias.png (244.43 KiB) Viewed 1306 times
Also, putting mainline junctions and stations in a single blueprint and criticizing the fact that flipping would screw up the junction (because LHD <> RHD is flipped) is like putting a subfactory and a mainbus tap in a single blueprint (which might become more common practice with super force build in 2.0 maybe?) and criticizing the fact that flipping does not pull the correct items from the bus to where they need to go. It's up to the player to be aware of the semantics of flipping a blueprint. Either 1) don't do it, 2) fix the junctions, or 3) make separate blueprints for different chirality.
- mainbus-vs-mainline-junctions.png (2.32 MiB) Viewed 1306 times
Analogous situation -- apply the same reasoning.
mmmPI wrote: ↑Tue Jan 23, 2024 8:50 am
This is one example of junction that cannot be made RHD given the rail layout, considering it's a 32x32 junction that fit 1 chunk
And there are many more possible junctions that
can, like this one:
- flippable-celtic.png (977.89 KiB) Viewed 1306 times
mmmPI wrote: ↑Tue Jan 23, 2024 8:50 am
From reading the FFF and trying to apply the same reasonning as Josh did, it can be seen that this junction cannot be flipped because it is impossible to find a single line for a folding symetry, even diagonals do not works due to signal missmatch, maybe it's easier to say it's only 180°x2 rotationnal symetry and not 90°x4 but i'm not sure that's the proper mathematical way of saying
That's a bit wrong. There's nothing about symmetry that prevents that design from being flipped. All rail entities, including signals and train stops, work in every orientation. FFF #394 is dealing with symmetry in entity prototypes, and there is no such problem with the rail/signal/train stop prototypes. Flipping is simply inverting all of the x-coordinates or y-coordinates and the rotations.
Here is the same junction, but modified to be slightly bigger (the smallest possible in 2.0 with the new rail shapes), which can now have enough space in the middle for chunk-aligned big electric poles, and for the rail signals to be swapped to the opposite side when flipping.
- modified-junction-flippable.png (1.42 MiB) Viewed 1306 times
Really the only thing that breaks this for rails is that if rail signals are adjusted (as they should be, if my arguments above were persuasive enough) there can be situations where the opposite side of the track is not free, or circuit wire would stretch further than permitted. So this design is unflippable only because of the tight spacing in the center.
If all signals can be "flipped" to the opposite side of the track in order to maintain directionality then the whole design is flippable.
(and if you flip the design naively by only negating the coordinates then you get something that works, but all of the entry chain signals become normal rail signals, and the exits become chain signals, which would be just bad)