Friday Facts #394 - Assembler flipping and circuit control

Regular reports on Factorio development.
FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2768
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: Friday Facts #394 - Assembler flipping and circuit control

Post by FuryoftheStars »

SupplyDepoo wrote: Thu Jan 25, 2024 9:20 am
FuryoftheStars wrote: Thu Jan 25, 2024 1:02 am And all that 'splaining could've been summed up as a "no, I'd only want/support flipping the entities and track, not the signals themselves so the direction is preserved." ;)
Technically the signals would be flipped across the axis of reflection (the horizontal or vertical line that divides the blueprint in half) along with the rails. I can see why you might think of it as "not flipping the signals" but I am thinking about it in a technical sense (see image below).
Yes, I'm fully aware of that. I'm referring to in relation to the tracks. Obviously if the track is not the axis of flipping, you can't just leave the rail signal where it was, the rail signal has to come over with it.

Regardless, I think the work they'd have to put into double-checking the rail signals for collisions or circuit wires exceeding their maximum reach, or other edge cases we're not thinking of (edit: and yeah, mmmPi is point out some of them), it isn't really worth it. Separating the entities from the track and just flipping the entities around the track and reconnecting those couple of circuit wires is a pretty simple task to do. I mean, I wouldn't be against it, per-se, if the devs wanted to do it, but I'm certainly not going to be for advocating for it, either.
Last edited by FuryoftheStars on Thu Jan 25, 2024 3:25 pm, edited 2 times in total.
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics
mmmPI
Smart Inserter
Smart Inserter
Posts: 3619
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Friday Facts #394 - Assembler flipping and circuit control

Post by mmmPI »

SupplyDepoo wrote: Thu Jan 25, 2024 9:20 am
mmmPI wrote: Thu Jan 25, 2024 5:21 am I maintain that the picture of the junction posted illustrate a situation where there is no way to draw a line for a folding symmetry that would cut the junction in 2 parts which would superpose. The diagonal line would create a missmatch in signals. That's what i observed on the junction, with the FFF in mind.
Perhaps we are talking past each other, because I think we mean the same thing? I just don't think it's accurate to say that it's about symmetry. The junction can be flipped straightforwardly via simple coordinate transform. What you then get is a working junction, albeit with very suboptimal signalling. As I demonstrate in the following image, the chain signals in the interior of the junction, which are circled in white, are correct, with only marginally worse positioning. The entry and exit signals however are swapped in a bad way.

The 36x36 version however, which is topologically the same, only slightly pulled apart to make space in the middle, could be flipped the way I described resulting in perfect signalling.
I fear i'm going to repeat myself there but i disagree with your operations and conclusion about symmetry here, the left most junction in your picture is broken to me, not just "very suboptimal", it will cause 4 train arriving at the same time to deadlock, in any case it's something not working the same as original. And then between the middle and right most version, you made the junction go from LHD to RHD doing more than just flipping.

In one case from original to left version, you multiply every "x" or "y" coordinate by -1, aka you "flip" the blueprint, take its reflexion, the mirror version, but in doing so you "destroy it", "naive" approach is not enough for rails with signal attached unlike the current things we are allowed to flip. ( i mean today, not including refineries and chemplants and boilers when expansion is realeased ).

In one other case from the middle version to the right version, you apply different rules to some chain signals based on your human understanding. the game couldn't tell why you decided to pair some chain signal with some regular signal for a swapping that make sense. You know it's at the entrance and exit, and it's logical to do given what you as human try to do but if you select part of the blueprint, or if your blueprint is not symetrical /properly signalled in the first place, the game couldn't be expected to perform such pairing and swap properly into LHD -RHD "effortlessly". ( imo)

I feel the first case is a problem you can infer from the absence of folding symetry inside the junction similar to hands or foot not having one for most people, even though it was originally used to talk about fluid input/output on entities. The second case is your effort to circumvent and propose alternative ways of handling it for the game, which i salute, i agree with the operation you describe for swapping RHD-LHD. I disagree somehow on the nature/description/name you give them.

To me there is no hope for this being possible for whole junction, because that would mean considering the whole junction can have a mirror version. Is is even possible ? that was like the questionning described in the FFF for a larger blueprint to have a mirror version, it require every single piece to also have one, which wasn't the case with refineries or chemplants, since those only existed accross different rotations but no reflection/folding because there was no symmetry for the input/output. The announced change is that there will be such possibilities in the future because the entities were given a mirror version in game.

Now for "larger blueprint" with "train stop or rail signal attached to the train", it is not the case that there would be a possibility to "create the mirror version", the same thing that is possible to do for refineries and chemplants. As the functinnality are altered using one way to do, and it's not always possible to circumvent.

SupplyDepoo wrote: Thu Jan 25, 2024 9:20 am That's why I'm saying that, after a simple coordinate transform, each signal (and train stop) should be rotated and moved to the opposite side of the rail to which it is attached. This step does not care about symmetry, only about available space (and circuit wire reach).
This step after the simple coordinate transform is necessary because there is no folding symetry in the junction, that's what i got from the FFF, i think this step DOES care about symmetry !

Not sure if i'm just being needlessly insistant on just semantics, or if you actually disagree, or maybe it's just too obvious for you that you don't really care and try to go past that directly. I think it's kind of a simple thing but hard to explain when you don't have the proper wording. "if you see "any" item and you can't draw an imaginary line for a folding symmetry on this item, then it means its mirror version is chiral ". That apply for train junctions incidentally. ( every 5 year old know this about his hands, hardly no-one knows about dihedral groups, "chirality" is an intermediate way to refer to this ).
SupplyDepoo wrote: Thu Jan 25, 2024 9:20 am
mmmPI wrote: Thu Jan 25, 2024 5:21 am Since you cannot draw such line on the junction, in order to "flip it" you would need to draw that line next to the junction, and create an inverted copy when folding. (i imagine wet ink on a book ) But if you do that, you create a junction with broken signals, the regular signals supposed to be at the "exit" would be at the "entrance". That's going to be the case for all junctions. ( if that was not the case, then it would have been possible to find the previously mentionned line , that's what i got from the FFF but i may be misunderstanding that wouldn't be the first time x) ).
Yes, we agree on that, but I think you're misapplying the concepts shown in FFF to this topic. I think the FFF is dealing with prototype definitions, which can impose some limitations, but blueprints are really just an array of entities and their positions and rotations, and they can always be changed independently of each other.

As an absurd example, if I said "every rail signal should be moved 5 tiles north and 6 tiles west, unless the coordinate is a multiple of 8, in which case it should be moved 0 tiles vertically and 1 tile east" then this could still be achieved as long as there happens to be free tiles at all of those positions. So I maintain that it's not about symmetry, although I might be explaining it badly/incorrectly.

But even if I'm wrong about the theoretical analysis of this example junction, I still firmly believe in the practical benefits of being able to flip rail signals and train stops whenever it is possible and desired by the player.
I am not sure the concept is misapplied, although i do agree it's not the exact same application, indeed the FFF is dealing with prototype definitions. Because for larger blueprint including refineries or chemplants, being able to "flip" them, would mean having a mirror version of the entity itself which did not exist. But signals and train stop are always "placed on the right side of the track". There is no mirror here. It act like an unflippable entity if that is a word. It still doesn't exist.
SupplyDepoo wrote: Thu Jan 25, 2024 9:20 am Yes, and my motivation for adding the ability to flip rail stuff in the way I described is because I think there are many situations where you would not encounter that problem and you would benefit from the feature. I don't care that there is a subset of cases where it doesn't work, even if the player might be a bit negatively surprised the first few times because they have not yet developed an accurate intuition about the flipping operation.
I agree with that somehow, but also i have no hope for it too happen because i feel that's like an intermediate solution which has drawbacks, and i think but that's just personnal opinion that if the ability to flip blueprint with train was deemed necessary in the factorio game it would be a full feature with mirrored train stop , or a way to place signals on the left side, or have them collision less with a new visual to make sense or something that wouldn't create negative surprise or unintuitive situations for player that would undoubtedly proopose to go a step further to solve it otherwise.

SupplyDepoo wrote: Thu Jan 25, 2024 9:20 am I think we agree that it would not be technically feasible for the game to enlarge junctions. What is absolutely technically possible is for the game to swap rail signals and train stops, and I would argue that it's almost always what the player wants
I also don' t think it's possible 'techically' to swap rails signals and trains stop, but i do agree that's what the player always almost wants.
SupplyDepoo wrote: Thu Jan 25, 2024 9:20 am I hope you don't misinterpret me as saying that you should not be able to do 32x32 junctions or that they are not cool or whatever, but this is just a little FYI that Factorio 2.0 (or 2.1) will do away with the current rail shapes and the new rail ships won't allow you to construct 32x32 junctions with a circle in the middle anymore, as shown in FFF #377 (you probably know about it, I'm just mentioning it for readers who missed the news). Also, chunk-aligned blueprints provide a mostly esoteric benefit, as even the devs have stated that there is little to no performance benefit or any other significant benefit to it (I can't remember who said it, but it might have been Rseding91).
I meant it as a visual example that could be used for illustration/discussion. the 32x32 was a little challenge in its own, not for performance as ups but for the sake of chunk-aligned blueprint and performance in train per minutes / footprint . There are several ways of fitting a junction inside a single chunk, but some only have enough room for signal with certain traffic direction RHD/LHD and couldn't be mirrored. The new rails in 2.0 will change the rules of the puzzle for the size of the box.

The benefit is not only esoteric, it allowed for different players to start building at the same time in disconnected locations and still end up aligning when joining using the in game grid. There was not always a feature to align the blueprint to the grid or in absolute coordinate but it only expanded the challenge. The other benefit i heard discussed was the way it look and the satisfaction of having a full set of blueprint ready to use, "solving trains forever" with a standardized system which seemed significant enough for the users to spent time attempting to do so :D

SupplyDepoo wrote: Thu Jan 25, 2024 9:20 am See the above image of the 36x36 junction. It's really not that hard. If I selected 3/4 of the junction it would flip all the same. There is nothing for the game to guess, it only has to check signal positions.
See the under image of the top scoring junction from the forum sticky post in show your creation about rails in the non-buffered 2 lane, pardon me but it is not that easy either. You could try to make a LHD version, and submit for scoring, or propose your RHD version of the posted one, those are not in the list yet !
render-8a1a5aa5d35e5998.jpg
render-8a1a5aa5d35e5998.jpg (229.16 KiB) Viewed 2918 times
SupplyDepoo wrote: Thu Jan 25, 2024 9:20 am It seems surprisingly difficult to convey the concept of adjusting rail signals after flipping, but I have tried my best to explain why the objections are wrong, or at least founded on a bad understanding. Please review my illustrations above if it's still unclear to you what I mean, because I'm not sure what else I could do to explain it better (except more pictures/examples, which is a bit time-consuming for me to create).
LOOK AT YOUR PICTURE !
flip-okay-when-no-flip.png
flip-okay-when-no-flip.png (523.1 KiB) Viewed 2918 times
the "G" flip , you don't flip the rails signals and train stop, they literally do not move, you only flip the belt.
the "F" flip is not a flip it's a 180° rotation except for the belt this one is flipped.

i understand the way you describe thing, but it end up not being the same for a single piece and larger piece, in one case you literally do no move the signal at all when flipping, while in another case you expect some LHD RHD swappings, certain signals should be put in the opposite side of the track and the game doesn't have to guess which one it's not that hard and so on...

Maybe the objections are wrong, maybe they are not ... ^^

SupplyDepoo wrote: Thu Jan 25, 2024 9:20 am If you understood the exact flipping mechanics that I am proposing then you might still think it's not practical, and it would be a more subjective discussion.
Either i don't understand your exact flipping mechanics, or if do i think they are not correct/ consistent.
SupplyDepoo wrote: Thu Jan 25, 2024 9:20 am [*]Flip every entity the same way: +x → -x, -x → +x, +y → -y, -y → +y, rotate 0º or 90º or 180º depending on if the rail signal is on a diagonal rail and if it's a horizontal/vertical flip (in this case 0º for a vertical flip and 180º for horizontal)
[*]For each rail signal, chain signal, and train stop, try to move it to the opposite side of the rail (3 tiles offset for rail signals), and rotate 180º
[*]If it's not possible, due to a lack of space or exceeding a circuit wire reach limit, show an error message at the player's cursor and nothing happens to the blueprint in the hand.
[/list]
Sorry but what in this case ?
flip-no-flip.png
flip-no-flip.png (461.05 KiB) Viewed 2918 times


This one maybe makes it more clear what i think your rules can't solve. what i called "inconsistent / not working". I know those takes a lot of time to make, rules , pictures , time to think of it and write the long posts, i'm respecting that, i don't want to downplay your genuine attempt at proposing ideas to solve those problems, when maybe it's just me that is not seeing it. It's the worst case i could think of based on the discussion that i tried to picture, you have explained well enough the good cases. I'm not trying to make a trap, i can understand how it cannot be flipped ( i think), that's why i'm showing it, it's a counter example to me. And why such thing makes me think the flipping as shown in the FFF to be translated to rails would require being able to place signals on the left side too, and having them be directionnal or something so that it could exist mirror version of the attachement of a signal and rail without chirality.
User avatar
SupplyDepoo
Filter Inserter
Filter Inserter
Posts: 305
Joined: Sat Oct 29, 2016 8:42 pm
Contact:

Re: Friday Facts #394 - Assembler flipping and circuit control

Post by SupplyDepoo »

FuryoftheStars wrote: Thu Jan 25, 2024 2:42 pm
SupplyDepoo wrote: Thu Jan 25, 2024 9:20 am Technically the signals would be flipped across the axis of reflection (the horizontal or vertical line that divides the blueprint in half) along with the rails. I can see why you might think of it as "not flipping the signals" but I am thinking about it in a technical sense (see image below).
Yes, I'm fully aware of that. I'm referring to in relation to the tracks. Obviously if the track is not the axis of flipping, you can't just leave the rail signal where it was, the rail signal has to come over with it.

Regardless, I think the work they'd have to put into double-checking the rail signals for collisions or circuit wires exceeding their maximum reach, or other edge cases we're not thinking of, isn't that worth it. Separating the entities from the track and just flipping the entities around the track and reconnecting those couple of circuit wires is a pretty simple task to do. I mean, I wouldn't be against it, per-se, if the devs wanted to do it, but I'm certainly not going to be for advocating for it, either.
Fair enough. But it would definitely be a lot of work to change signals and train stops by hand for a large subfactory like I showed, which is why I would wager that no one has ever been mad enough to attempt to flip a blueprint of such scale. But the community seems to have become resigned to the idea that such blueprints are not meant to be flipped, and I think that can change -- if only we would obtain the power.
mmmPI wrote: Thu Jan 25, 2024 3:05 pm I fear i'm going to repeat myself there but i disagree with your operations and conclusion about symmetry here, the left most junction in your picture is broken to me, not just "very suboptimal", it will cause 4 train arriving at the same time to deadlock, in any case it's something not working the same as original. And then between the middle and right most version, you made the junction go from LHD to RHD doing more than just flipping.
You might be right about the symmetry thing, because to be honest I didn't understand the last part of the FFF and maybe you did, but I would probably need some good illustrations or something for me to understand (I have never played that mod, which I know is a popular mod, so it's possible there is some implicit knowledge about that building's rotation behavior that I am missing).

It is beside my main point though, which is that flipping rail signals and train stops like I showed would be possible and useful in many cases. Maybe less for dual track blueprints, because it would always change LHD to RHD and vice versa, or it would simply not be possible (like your 32x32 junction, and anything 0-spaced and most other tightly spaced which can only be RHD).
mmmPI wrote: Thu Jan 25, 2024 3:05 pm In one case from original to left version, you multiply every "x" or "y" coordinate by -1, aka you "flip" the blueprint, take its reflexion, the mirror version, but in doing so you "destroy it", "naive" approach is not enough for rails with signal attached unlike the current things we are allowed to flip. ( i mean today, not including refineries and chemplants and boilers when expansion is realeased ).
Yep, agreed on that.
mmmPI wrote: Thu Jan 25, 2024 3:05 pm In one other case from the middle version to the right version, you apply different rules to some chain signals based on your human understanding. the game couldn't tell why you decided to pair some chain signal with some regular signal for a swapping that make sense.
Nope, everything was flipped with the exact same logic I described. There is no guess work or complicated algorithm, just "mirror that signal, move it to the other side of rail, rotate it", rinse & repeat.

I made a fancy animation of it:
flip.gif
flip.gif (9.05 MiB) Viewed 2777 times
mmmPI wrote: Thu Jan 25, 2024 3:05 pm You know it's at the entrance and exit, and it's logical to do given what you as human try to do but if you select part of the blueprint, or if your blueprint is not symetrical /properly signalled in the first place, the game couldn't be expected to perform such pairing and swap properly into LHD -RHD "effortlessly". ( imo)
No, the game truly can do it. It is a straightforward algorithm.
mmmPI wrote: Thu Jan 25, 2024 3:05 pm I feel the first case is a problem you can infer from the absence of folding symetry inside the junction similar to hands or foot not having one for most people, even though it was originally used to talk about fluid input/output on entities. The second case is your effort to circumvent and propose alternative ways of handling it for the game, which i salute, i agree with the operation you describe for swapping RHD-LHD. I disagree somehow on the nature/description/name you give them.
Hmm, again I admittedly don't know about the symmetry so I will reserve my opinion on it. I have tried to think of better names but I have not found anything better than "adjust/swap signals" yet. Originally I thought of the word "unflipping signals" but it's not quite accurate I think.
mmmPI wrote: Thu Jan 25, 2024 3:05 pm To me there is no hope for this being possible for whole junction, because that would mean considering the whole junction can have a mirror version. Is is even possible ? that was like the questionning described in the FFF for a larger blueprint to have a mirror version, it require every single piece to also have one, which wasn't the case with refineries or chemplants, since those only existed accross different rotations but no reflection/folding because there was no symmetry for the input/output. The announced change is that there will be such possibilities in the future because the entities were given a mirror version in game.
Not sure, but I would suggest to focus less on the signals as physical entities. Like I said yesterday, I would think of the signals as a setting/"mod" for the rails, just not with any GUI (like splitter, filter inserter, etc). Instead of opening a GUI like this:
Rail

Segment direction:
  • [_] No change
  • [X] Forward
  • [_] Reverse
  • [_] Both
You configure the rail by placing another entity. It applies a direction rule and also splits the block, leaving one block on each side of it. Even though these two things are tied together in the game when you use signals, they are separate concepts. So the GUI could also look like this:
Rail

Split block:
  • [X] Split
  • [_] Dont Split
Segment direction:
  • [_] No change
  • [X] Forward
  • [_] Reverse
"No change" to segment direction would be like not having any signals attached to that rail (direction would be determined by signals elsewhere along the track), or having two paired signals attached. "Forward" and "Reverse" is like the choice of which side of the rail you place a single signal (and choosing the direction you want is a lot clearer with physical rail signals instead of a GUI because "Forward" would depend on the rail's direction, which is impossible to see, and with physical signals the rail's direction doesn't matter, only the relative positioning between the two entities).

A rail that splits the block would allow trains to stop and wait behind each other at that point, but have no effect on path finding.

A rail that sets a specific direction without splitting the block would affect only train path finding/routing, without changing where trains could stop and wait behind each other.

This is very tangential (and not anything I'm proposing, just to be clear), but I hope it might be useful to draw attention away from rail signals as a thing with any importance of its own. It's just a modifier on rails, vaguely like how splitters can filter items and prioritize inputs and outputs. A rail signal on its own is completely non-functional, but rails on their own are useful.

Another way to think about it is that if, in an alternate reality, rail signals simply didn't have any collision with other entities (and in that case they would probably have to be positioned closer to the rail to remain visible), then rails could be flipped like belts with no collision issue (let's forget about circuit connections wire max reach also for this). The intuition about flipping would probably come a lot easier.

I think what I'm trying to say is, that normally it would be bad if the game rearranged things inside your blueprint, because it would break the functionality, but in the case of rail signals it is the opposite because by rearranging them it actually preserves the functionality, which is the directionality.

So maybe the question is less "can we find a symmetry to flip this", and more "can we ignore symmetry and then rearrange signals to restore the functionality"?
mmmPI wrote: Thu Jan 25, 2024 3:05 pm Now for "larger blueprint" with "train stop or rail signal attached to the train", it is not the case that there would be a possibility to "create the mirror version", the same thing that is possible to do for refineries and chemplants. As the functinnality are altered using one way to do, and it's not always possible to circumvent.
I understand. What I'm saying is that the absence of a perfect solution should not be the enemy of a good solution. Being able to flip rail signals and train stops (with the adjustments to preserve directionality) would be useful in many cases even if it would not work in others. Overall nothing would be taken away, and we would have a tool that is more powerful than it was before.

The only valid concerns that I can see would be:
  1. "It would be too difficult for players to know when they can and cannot flip rails." or "It would be too confusing for players to keep in mind flippability when designing rail stuff". My response: there are merely two concerns and they are straightforward to understand: collision of rail signals and wire reach. I have suggested unobtrusive ways to help players keep it in mind (a small graphic on the ground, a highlight-box when placing entities, and additional wire reach indicators).
  2. "I don't want to be able to flip station blueprints or to convert LHD to RHD and vice versa. I want to be able to flip dual track junctions, and this feature won't/can't do it." My response: anything involving dual track is a higher level concept which would require more advanced features like embedded blueprints (books) inside of blueprints. Either that, or a built-in notion of dual track rail infrastructure (some algorithm, possibly AI, to recognize parallel tracks, and to create appropriate junctions automatically, possibly with options for players to customize this). I think that would be neat, but it will surely not come before Factorio 3.0 or something like that, and I am not concerned with this desire. I just want to make the basic blueprint flip a bit more capable.
mmmPI wrote: Thu Jan 25, 2024 3:05 pm
SupplyDepoo wrote: Thu Jan 25, 2024 9:20 am That's why I'm saying that, after a simple coordinate transform, each signal (and train stop) should be rotated and moved to the opposite side of the rail to which it is attached. This step does not care about symmetry, only about available space (and circuit wire reach).
This step after the simple coordinate transform is necessary because there is no folding symetry in the junction, that's what i got from the FFF, i think this step DOES care about symmetry !
Hmm, if I understand you correctly, then it's because rail signals' effect on track direction is inherently tied to the side of the track it's placed on, with signals always having to be on the right side from the perspective of approaching trains?
mmmPI wrote: Thu Jan 25, 2024 3:05 pm Not sure if i'm just being needlessly insistant on just semantics, or if you actually disagree, or maybe it's just too obvious for you that you don't really care and try to go past that directly. I think it's kind of a simple thing but hard to explain when you don't have the proper wording. "if you see "any" item and you can't draw an imaginary line for a folding symmetry on this item, then it means its mirror version is chiral ". That apply for train junctions incidentally. ( every 5 year old know this about his hands, hardly no-one knows about dihedral groups, "chirality" is an intermediate way to refer to this ).
Sorry, I don't follow. Would it make a difference if you consider only the rails? Is there any difference (in terms of the math/geometry you are talking about) between your 32x32 junction WITHOUT signals, and your 32x32 junction WITH signals?

I would like to understand it better, but I don't expect to be able to, and it probably won't affect my stance behind the proposal, so I'm not dwelling on it. But if it's important to you, carry on, and I will listen.
mmmPI wrote: Thu Jan 25, 2024 3:05 pm
SupplyDepoo wrote: Thu Jan 25, 2024 9:20 am Yes, we agree on that, but I think you're misapplying the concepts shown in FFF to this topic. I think the FFF is dealing with prototype definitions, which can impose some limitations, but blueprints are really just an array of entities and their positions and rotations, and they can always be changed independently of each other.
I am not sure the concept is misapplied, although i do agree it's not the exact same application, indeed the FFF is dealing with prototype definitions. Because for larger blueprint including refineries or chemplants, being able to "flip" them, would mean having a mirror version of the entity itself which did not exist. But signals and train stop are always "placed on the right side of the track". There is no mirror here. It act like an unflippable entity if that is a word. It still doesn't exist.
I am more and more getting the sense that you're right, and that I misunderstood because I was ignoring the rail signals? Because to me the positioning of signals is not in-and-of-itself important, only the effect on the track is. I look at the symmetry of exclusively the rails and the rail signals is more of a secondary detail, which is why I'm not fussed about repositioning the signals.
mmmPI wrote: Thu Jan 25, 2024 3:05 pm
SupplyDepoo wrote: Thu Jan 25, 2024 9:20 am Yes, and my motivation for adding the ability to flip rail stuff in the way I described is because I think there are many situations where you would not encounter that problem and you would benefit from the feature. I don't care that there is a subset of cases where it doesn't work, even if the player might be a bit negatively surprised the first few times because they have not yet developed an accurate intuition about the flipping operation.
I agree with that somehow, but also i have no hope for it too happen because i feel that's like an intermediate solution which has drawbacks, and i think but that's just personnal opinion that if the ability to flip blueprint with train was deemed necessary in the factorio game it would be a full feature with mirrored train stop , or a way to place signals on the left side, or have them collision less with a new visual to make sense or something that wouldn't create negative surprise or unintuitive situations for player that would undoubtedly proopose to go a step further to solve it otherwise.
Well, there are two aspects to this. The easier problem is the collideability of rail signals, and you're right that removing that aspect would solve it. I don't know if I personally like that idea, because despite what I said about signals being "secondary", "useless on their own" etc, they are kinda cute things. Generally I prefer to have more puzzle pieces than fewer, which is why I am not a huge fan of the combinator 2.0 changes for example, and I hate the suggestions that some have put forward to encapsulate all of the arithmetic and decider logic within one super-combinator. Also, there's the wire reach problem, but that's even less of an issue. Simply allowing the wires to overextend by ≈3 tiles (for rail signals only) would not be hugely game-breaking or visually problematic.

The much more challenging issue is dual track stuff, because the game has no built-in notion of "dual track highway" the same way it has no notion of "mainbus" or "furnace row". The game only knows about individual entities (and how they interact directly with other entities, like inserter → belt). How they're combined into bigger structures by players is basically AI territory.

As I previously suggested, something along the lines of embeddable blueprints, or a "dual track planner" (with options to make it interesting, otherwise it would just be the game forcing a certain design on players), would be the answer to this. But this can always be added later. I am proposing something more basic, analogous to how transport belts are flipped.

Yes, it won't always work due to collision/wire issues, that's fine. Yes, if one puts dual track junctions and station together in one blueprint, they would not be able to flip it without messing up LHD/RHD at the junction. One can learn to use the tools in the manner in which they are useful. When I make a mainbus I still have to manually tap the belts depending on which side of the bus I'm working on (depending on where iron / copper / etc is). I could make separate blueprints for each variant, or I could always build it the same way. It's up to me to decide that, and the same would be true for blueprints with rail signals and train stops. My goal is to be able to flip stations, just like I can flip an electronic circuit production blueprint. I can then connect the pieces together by hand.
mmmPI wrote: Thu Jan 25, 2024 3:05 pm
SupplyDepoo wrote: Thu Jan 25, 2024 9:20 am I hope you don't misinterpret me as saying that you should not be able to do 32x32 junctions or that they are not cool or whatever, but this is just a little FYI that Factorio 2.0 (or 2.1) will do away with the current rail shapes and the new rail ships won't allow you to construct 32x32 junctions with a circle in the middle anymore, as shown in FFF #377 (you probably know about it, I'm just mentioning it for readers who missed the news). Also, chunk-aligned blueprints provide a mostly esoteric benefit, as even the devs have stated that there is little to no performance benefit or any other significant benefit to it (I can't remember who said it, but it might have been Rseding91).
I meant it as a visual example that could be used for illustration/discussion. the 32x32 was a little challenge in its own, not for performance as ups but for the sake of chunk-aligned blueprint and performance in train per minutes / footprint . There are several ways of fitting a junction inside a single chunk, but some only have enough room for signal with certain traffic direction RHD/LHD and couldn't be mirrored. The new rails in 2.0 will change the rules of the puzzle for the size of the box.

The benefit is not only esoteric, it allowed for different players to start building at the same time in disconnected locations and still end up aligning when joining using the in game grid. There was not always a feature to align the blueprint to the grid or in absolute coordinate but it only expanded the challenge. The other benefit i heard discussed was the way it look and the satisfaction of having a full set of blueprint ready to use, "solving trains forever" with a standardized system which seemed significant enough for the users to spent time attempting to do so :D
I do appreciate the junction's compactness!
mmmPI wrote: Thu Jan 25, 2024 3:05 pm See the under image of the top scoring junction from the forum sticky post in show your creation about rails in the non-buffered 2 lane, pardon me but it is not that easy either. You could try to make a LHD version, and submit for scoring, or propose your RHD version of the posted one, those are not in the list yet !
WHOA! That's something. I will have to check it out.
mmmPI wrote: Thu Jan 25, 2024 3:05 pm
SupplyDepoo wrote: Thu Jan 25, 2024 9:20 am It seems surprisingly difficult to convey the concept of adjusting rail signals after flipping, but I have tried my best to explain why the objections are wrong, or at least founded on a bad understanding. Please review my illustrations above if it's still unclear to you what I mean, because I'm not sure what else I could do to explain it better (except more pictures/examples, which is a bit time-consuming for me to create).
LOOK AT YOUR PICTURE !

the "G" flip , you don't flip the rails signals and train stop, they literally do not move, you only flip the belt.
the "F" flip is not a flip it's a 180° rotation except for the belt this one is flipped.
Yes, and that's the best way to do it. Don't we agree on that? :)
"naive" approach is not enough for rails with signal attached unlike the current things we are allowed to flip
^ This is the non-naive approach.
mmmPI wrote: Thu Jan 25, 2024 3:05 pm i understand the way you describe thing, but it end up not being the same for a single piece and larger piece, in one case you literally do no move the signal at all when flipping, while in another case you expect some LHD RHD swappings, certain signals should be put in the opposite side of the track and the game doesn't have to guess which one it's not that hard and so on...
It's counterintuitive, but trust me, it's the same procedure for flipping the signals, and it gives the most sensible result. It looks wrong when it's a small example like that, but just remember that huge subfactory I showed a screenshot of in map view. It can be flipped, which could be useful sometimes. All that needs to be done is to connect the IN and OUT rails to the mainline, either by hand or with separate blueprints.

Swapping LHD with RHD might be less useful (but I personally would still find it useful in multiplayer), but it would be optional anyway. Right now we don't have the option.
mmmPI wrote: Thu Jan 25, 2024 3:05 pm Sorry but what in this case ?

This one maybe makes it more clear what i think your rules can't solve. what i called "inconsistent / not working". I know those takes a lot of time to make, rules , pictures , time to think of it and write the long posts, i'm respecting that, i don't want to downplay your genuine attempt at proposing ideas to solve those problems, when maybe it's just me that is not seeing it. It's the worst case i could think of based on the discussion that i tried to picture, you have explained well enough the good cases. I'm not trying to make a trap, i can understand how it cannot be flipped ( i think), that's why i'm showing it, it's a counter example to me. And why such thing makes me think the flipping as shown in the FFF to be translated to rails would require being able to place signals on the left side too, and having them be directionnal or something so that it could exist mirror version of the attachement of a signal and rail without chirality.
It's not flippable because of the lack of space in the center. That's the only reason. Everything else (signals and train stops) would swap places.

I am working on a mod that performs the operation I want, and I hope to publish it very soon*, so everyone can see exactly how it works! Just need to fix some rough edges with it first.

* There has been a delay with my mod, because I decided that, instead of releasing an MVP, I want to polish it, and that has turned out to be quite time-consuming! Aiming to have it finished some day in March April.
Last edited by SupplyDepoo on Fri Mar 22, 2024 11:03 am, edited 2 times in total.
FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2768
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: Friday Facts #394 - Assembler flipping and circuit control

Post by FuryoftheStars »

SupplyDepoo wrote: Fri Jan 26, 2024 3:26 pm
FuryoftheStars wrote: Thu Jan 25, 2024 2:42 pm
SupplyDepoo wrote: Thu Jan 25, 2024 9:20 am Technically the signals would be flipped across the axis of reflection (the horizontal or vertical line that divides the blueprint in half) along with the rails. I can see why you might think of it as "not flipping the signals" but I am thinking about it in a technical sense (see image below).
Yes, I'm fully aware of that. I'm referring to in relation to the tracks. Obviously if the track is not the axis of flipping, you can't just leave the rail signal where it was, the rail signal has to come over with it.

Regardless, I think the work they'd have to put into double-checking the rail signals for collisions or circuit wires exceeding their maximum reach, or other edge cases we're not thinking of, isn't that worth it. Separating the entities from the track and just flipping the entities around the track and reconnecting those couple of circuit wires is a pretty simple task to do. I mean, I wouldn't be against it, per-se, if the devs wanted to do it, but I'm certainly not going to be for advocating for it, either.
Fair enough. But it would definitely be a lot of work to change signals and train stops by hand for a large subfactory like I showed, which is why I would wager that no one has ever been mad enough to attempt to flip a blueprint of such scale. But the community seems to have become resigned to the idea that such blueprints are not meant to be flipped, and I think that can change -- if only we would obtain the power.
Well, to be honest, the blueprint system does not seem like it was designed for large scale blueprinting, anyway. But that's a whole 'nother ball. :D
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics
Qon
Smart Inserter
Smart Inserter
Posts: 2164
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: Friday Facts #394 - Assembler flipping and circuit control

Post by Qon »

The splitters are configured with a GUI, and when flipped the GUI configuration for left/right input/output priority and filters swap the left/right configuration. If rail signals (and chain, stops) were changed to GUI configurations on rail pieces and then the entities were changed to just graphical renderings to show the configuration, then everything would basically be the same in functionality. But it would be obvious that flipping should work on signaled rails, just like splitters. And it would be obvious that SupplyDepoo's suggested flipping behavior would be the correct one, no one would consider anything else.

But now signals (etc) are individually placed entities even when placed next to rails and they can possibly collide when swapped to the other side. But this is a distraction! I was first thinking that I would just prefer to have a "always working" pure positional swap so I don't have to get "this blueprint can't be flipped" message and then fix the signaling behavior myself after. But what is even the point of flipping if it's just a pure positional swap? It would flip the design to it's chiral opposite, but also flip direction of rails to the opposite. And rail signals tells you some thing about the space "after" (and stops about the rail section before), so even if you want a pure positional flip including swapping rail direction, the signals would have to be moved forwards and backwards along the rail to avoid having trains stopping inside junctions instead of right after or before. And trains on the pure positional flip will stop right before (what was "after" in the unflipped original) the rail section with inserters for unloading and loading, never actually "connecting". So SupplyDepoo's flip operation makes way more sense for that reason as well.

But maybe pure positional flip can be preserved and rail/chain/stop side jumping can be another separate operation. We don't have to combine them. The reason to keep them separated would be to basically never fail when pressing "F" key to flip, and give the player then the option to do signal side swapping with another button after or to shift the signals along the rail to preserve handedness if they prefer that.
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
mmmPI
Smart Inserter
Smart Inserter
Posts: 3619
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Friday Facts #394 - Assembler flipping and circuit control

Post by mmmPI »

First of all your fancy animation is awesome ! It shows how to make the LHD-RHD conversion better than any words x). And if you play it backward it shows RHD-LHD. Could really be used for tutorials. Showing how to do the signals after a little rail layout adjustment if needed to fit them.
SupplyDepoo wrote: Fri Jan 26, 2024 3:26 pm Sorry, I don't follow. Would it make a difference if you consider only the rails? Is there any difference (in terms of the math/geometry you are talking about) between your 32x32 junction WITHOUT signals, and your 32x32 junction WITH signals?

I would like to understand it better, but I don't expect to be able to, and it probably won't affect my stance behind the proposal, so I'm not dwelling on it. But if it's important to you, carry on, and I will listen.
Yes it would make a difference in terms of the math/geometry if there are signals or if there are no signals. This i knew before reading the FFF, i realized when making conversion LHD-RHD as i didn't know what to do at first and i had to figure out what your animation shows. When playing nullius i learned about the concept of "chirality" that's the name of the researchs which allows for example mirror refineries output. When reading the FFF i realized it was related and then you started mentionning flipping train blueprint and going that route too, i don't know if attempting to share my level of understanding would be helpful or change your stance behind the proposal, i'm not sure which is your exact proposal or if it's more a line of wishes to make possible more flipping interaction for train and signal construction.

Here's what i made using the decon planner to remove all signals to illustrate :
ifredlineexistthenflipisrotation.png
ifredlineexistthenflipisrotation.png (441.28 KiB) Viewed 2711 times
On the left part, there is a junction without signals, on the right part its mirrored version. This is possible to do in game currently.

It is possible to see that the mirror version of the non signaled-version is just a 90° rotation of the non-mirror.

the wikipedia page about chirality in mathematics says :
In mathematics, a figure is chiral (and said to have chirality) if it cannot be mapped to its mirror image by rotations and translations alone. For example, a right shoe is different from a left shoe, and clockwise is different from anticlockwise.
Therefore, a junction without signals is not chiral. It is not like a left or right shoe.

However refineries are chirals, fliping one is creating a different version of the refinerie, like a left or a right refinery that cannot be obtained by rotations only:

Image

In the FFF it is written :
every building only needs one line of symmetry to be mirrored, and can then be rotated to suit.
This is the red line i added on the above picture. I read the sentence and thought "eh ? really ? let's try to see on a junction" .

Such red line cannot be drawn on the refinery, nor on junction WITH signals. Only in junction WITHOUT signals.

When the junction is filled with signals. If you were to try and fold the junction along the red line to try and superpose one half over the other, some signals would not properly superpose.
SupplyDepoo wrote: Fri Jan 26, 2024 3:26 pm Hmm, if I understand you correctly, then it's because rail signals' effect on track direction is inherently tied to the side of the track it's placed on, with signals always having to be on the right side from the perspective of approaching trains?
Yes, it took quite some time to think about your formulation, if instead of "signals-inherently-tied-to-the-side-of-the-track-it's-placed-on" it was something like you describe as "non-collidable" that was placed say above the track in the middle, and there was a gui to define an arrow for the rail direction. Then it would be different.

It would work like the combo belt and inserter where you can change the direction of the belt without having to also change the side of the inserter when you flip a belt and an inserter along an axis perpendicular to the direction of the belt.

There would always be "enough room to place the signal".

And there would be a rule to reverse the direction of the signal when it is pointing a direction that interesect the axis of mirroring. like belts.

Currently the game doesn't allow flipping a blueprint with signals ,you can manually do it like in your animation if we cut before the end :
mirror breaking.png
mirror breaking.png (467.05 KiB) Viewed 2711 times
From left to right is a mirroring, plain simple, no swapping signal on the other side of the track. What's on the right side is broken, you need to pair some regular signal with some chain signal and swap them, not accross the track, but accross the higher level concept of entrance and exit lane. Like on this following picture where the right version is updated:
sorrynoanimation.png
sorrynoanimation.png (461.79 KiB) Viewed 2711 times
But doing so you "cancel" the previous operation, considering chirality, you can have the left and the right version like shoes, by doing a flip you go from a left shoe to a right shoe, but by swapping again the signals, it make a left shoe back. The two junction shown just above are the same just rotated. It is a necessary operation to have a functionnal junction after a flip contrary to just flipping "naively" which destroy the functionnality.

If you consider the red line mentionned earlier, it can still not be drawn even if we consider signal as non-collidable thing that would be over the rail and giving direction with a gui. Imagine instead of the regular signal it is an arrow pointing outward with EXIT written on it not located on the side of the track but in the middle of it, trying to superpose alongside the red line in diagonal would still mean attempting to superpose an arrow pointing outward and an chain signal. This would not change. I was a bit puzzled but it is actually the explanation => Since this red line doesn't exist, then there is a need for inverting the direction of circulation on the rail when doing the flipping, similar to how belts+inserter combo behave. ( either same orientation than the mirror axis or not cause it to flip or not ).
SupplyDepoo wrote: Fri Jan 26, 2024 3:26 pm No, the game truly can do it. It is a straightforward algorithm.
Actually yes, you are correct. Such things would allow the game to generate a right shoe from a left shoe when doing a flipping of a junction. Similar to how in the FFF the left refineries where made from the right refineries so that the game could flip blueprint containing refineries. Then yes a flipping would convert RHD LHD "effortlessly".

I'm not arguing about proposal of how it could or should do in game, more thinking those math are much more interesting when thinking in factorio term than in highschool math class term. That's related to the FFF to me x). But it goes beyond, junctions, trains stop, those are extras, i think those math explain to me why it's not possible in the game to flip certain things.The junction is similar to the "big boss" entity from space exploration with only diagonal symmetry. Except worse, because it's not an real proper diagonal symmetry, only when there is no signal it is one. In order to mirror a junction, the same reasonning that was applied to mirror the fluidbox of entity to create its mirror version in case it's inside a larger blueprint, also apply. It was trying to draw this red symmetry line on the entity itself. Because if you can, then there is no need to create a mirror version, one can use only rotations. Unlike in junction with signals, those are chirals like shoe or hands and require more complicated rules. They are inherently different in geometry.
SupplyDepoo wrote: Fri Jan 26, 2024 3:26 pm Yes, and that's the best way to do it. Don't we agree on that? :)
After reading today's FFF and reading that the previous limit system and disable station was considered SOMETIMES JANKY, by Klonan who wrote the FFF, i'm even more tempted to confirm my previous thought that i think your proposition may makes sense , or even be the best i've heard of but i still have no hope of seeing it in the game in that it wouldn't be working well all the time, such drawbacks of potentially not preserving functionnality or sometimes possibly not working because no room. It wouldn't mean it's the best way to do, just the best i heard of :)

Sometimes it's just yes/no . Would i use it if it existed ? Yes , Would i think a mod allowing this would be used if it was available on the portal ? Yes, by many players ? no

Also i don't think it's a proper flipping as of the mathematical concept which i think would be the kind of quality the devs are willing to put on the game and no less. something (re)thought and(re)made to work all the time natively, not piling things a little shaky over things a little shaky. That's what i do as hobbyist :| i expect the pros to do better :).
User avatar
SupplyDepoo
Filter Inserter
Filter Inserter
Posts: 305
Joined: Sat Oct 29, 2016 8:42 pm
Contact:

Re: Friday Facts #394 - Assembler flipping and circuit control

Post by SupplyDepoo »

FuryoftheStars wrote: Fri Jan 26, 2024 3:57 pm Well, to be honest, the blueprint system does not seem like it was designed for large scale blueprinting, anyway. But that's a whole 'nother ball. :D
This might change in 2.0, let's wait and see.
Qon wrote: Fri Jan 26, 2024 7:13 pm The splitters are configured with a GUI, and when flipped the GUI configuration for left/right input/output priority and filters swap the left/right configuration. If rail signals (and chain, stops) were changed to GUI configurations on rail pieces and then the entities were changed to just graphical renderings to show the configuration, then everything would basically be the same in functionality. But it would be obvious that flipping should work on signaled rails, just like splitters. And it would be obvious that SupplyDepoo's suggested flipping behavior would be the correct one, no one would consider anything else.
Thank you! That is a succinct way to put it.
Qon wrote: Fri Jan 26, 2024 7:13 pm But now signals (etc) are individually placed entities even when placed next to rails and they can possibly collide when swapped to the other side. But this is a distraction! I was first thinking that I would just prefer to have a "always working" pure positional swap so I don't have to get "this blueprint can't be flipped" message and then fix the signaling behavior myself after. But what is even the point of flipping if it's just a pure positional swap?
It could work if there are only rail signals (or only chain signals), which excludes most junctions. So it could be useful for straight rail / connections between junctions, but then the same can usually be achieved by just 180º rotation.
Qon wrote: Fri Jan 26, 2024 7:13 pm But maybe pure positional flip can be preserved and rail/chain/stop side jumping can be another separate operation. We don't have to combine them. The reason to keep them separated would be to basically never fail when pressing "F" key to flip, and give the player then the option to do signal side swapping with another button after or to shift the signals along the rail to preserve handedness if they prefer that.
Yeah, it could be part of a specialized tool along the lines of Rail Signal Planner.
mmmPI wrote: Fri Jan 26, 2024 11:04 pm First of all your fancy animation is awesome ! It shows how to make the LHD-RHD conversion better than any words x). And if you play it backward it shows RHD-LHD. Could really be used for tutorials. Showing how to do the signals after a little rail layout adjustment if needed to fit them.
Thanks!
mmmPI wrote: Fri Jan 26, 2024 11:04 pm
SupplyDepoo wrote: Fri Jan 26, 2024 3:26 pm Sorry, I don't follow. Would it make a difference if you consider only the rails? Is there any difference (in terms of the math/geometry you are talking about) between your 32x32 junction WITHOUT signals, and your 32x32 junction WITH signals?
Yes it would make a difference in terms of the math/geometry if there are signals or if there are no signals. This i knew before reading the FFF, i realized when making conversion LHD-RHD as i didn't know what to do at first and i had to figure out what your animation shows. When playing nullius i learned about the concept of "chirality" that's the name of the researchs which allows for example mirror refineries output. When reading the FFF i realized it was related and then you started mentionning flipping train blueprint and going that route too, i don't know if attempting to share my level of understanding would be helpful or change your stance behind the proposal, i'm not sure which is your exact proposal or if it's more a line of wishes to make possible more flipping interaction for train and signal construction.

Here's what i made using the decon planner to remove all signals to illustrate :

ifredlineexistthenflipisrotation.png

On the left part, there is a junction without signals, on the right part its mirrored version. This is possible to do in game currently.

It is possible to see that the mirror version of the non signaled-version is just a 90° rotation of the non-mirror.

the wikipedia page about chirality in mathematics says :
In mathematics, a figure is chiral (and said to have chirality) if it cannot be mapped to its mirror image by rotations and translations alone. For example, a right shoe is different from a left shoe, and clockwise is different from anticlockwise.
Therefore, a junction without signals is not chiral. It is not like a left or right shoe.

However refineries are chirals, fliping one is creating a different version of the refinerie, like a left or a right refinery that cannot be obtained by rotations only:

Image

In the FFF it is written :
every building only needs one line of symmetry to be mirrored, and can then be rotated to suit.
This is the red line i added on the above picture. I read the sentence and thought "eh ? really ? let's try to see on a junction" .

Such red line cannot be drawn on the refinery, nor on junction WITH signals. Only in junction WITHOUT signals.

When the junction is filled with signals. If you were to try and fold the junction along the red line to try and superpose one half over the other, some signals would not properly superpose.
This is a great explanation. Now I get it.
mmmPI wrote: Fri Jan 26, 2024 11:04 pm
SupplyDepoo wrote: Fri Jan 26, 2024 3:26 pm Hmm, if I understand you correctly, then it's because rail signals' effect on track direction is inherently tied to the side of the track it's placed on, with signals always having to be on the right side from the perspective of approaching trains?
Yes, it took quite some time to think about your formulation, if instead of "signals-inherently-tied-to-the-side-of-the-track-it's-placed-on" it was something like you describe as "non-collidable" that was placed say above the track in the middle, and there was a gui to define an arrow for the rail direction. Then it would be different.

It would work like the combo belt and inserter where you can change the direction of the belt without having to also change the side of the inserter when you flip a belt and an inserter along an axis perpendicular to the direction of the belt.

There would always be "enough room to place the signal".

And there would be a rule to reverse the direction of the signal when it is pointing a direction that interesect the axis of mirroring. like belts.

Currently the game doesn't allow flipping a blueprint with signals ,you can manually do it like in your animation if we cut before the end :
mirror breaking.png

From left to right is a mirroring, plain simple, no swapping signal on the other side of the track. What's on the right side is broken, you need to pair some regular signal with some chain signal and swap them, not accross the track, but accross the higher level concept of entrance and exit lane. Like on this following picture where the right version is updated:

sorrynoanimation.png

But doing so you "cancel" the previous operation, considering chirality, you can have the left and the right version like shoes, by doing a flip you go from a left shoe to a right shoe, but by swapping again the signals, it make a left shoe back. The two junction shown just above are the same just rotated. It is a necessary operation to have a functionnal junction after a flip contrary to just flipping "naively" which destroy the functionnality.

If you consider the red line mentionned earlier, it can still not be drawn even if we consider signal as non-collidable thing that would be over the rail and giving direction with a gui. Imagine instead of the regular signal it is an arrow pointing outward with EXIT written on it not located on the side of the track but in the middle of it, trying to superpose alongside the red line in diagonal would still mean attempting to superpose an arrow pointing outward and an chain signal. This would not change. I was a bit puzzled but it is actually the explanation => Since this red line doesn't exist, then there is a need for inverting the direction of circulation on the rail when doing the flipping, similar to how belts+inserter combo behave. ( either same orientation than the mirror axis or not cause it to flip or not ).
Yeah, and we think of junctions and dual track as a whole as one thing. It would be cool to have higher level railway construction tools. like the embedded blueprints I suggested, but that idea seems a bit unwieldy. I would like a way to define rules for generating rails and signals, but it's tricky to strike the right balance between flexibility and avoiding a tedious programming-like experience.

And it would take a lot of dev effort to implement such a thing, and if the only benefit would be slightly easier blueprinting of the usual few junctions and connecting lines, then it's probably not worth it.

There would need to be new challenges and constraints added to make it more interesting. Like some geographical areas where too much train traffic could cause vibrations that cause boulders to fall from cliffs and onto trains. Or speed restrictions on tight turns / possibility to derail. More variability in train speeds and lengths.

I'm afraid most of these ideas do not really fit into the game though.
mmmPI wrote: Fri Jan 26, 2024 11:04 pm I'm not arguing about proposal of how it could or should do in game, more thinking those math are much more interesting when thinking in factorio term than in highschool math class term. That's related to the FFF to me x). But it goes beyond, junctions, trains stop, those are extras, i think those math explain to me why it's not possible in the game to flip certain things.The junction is similar to the "big boss" entity from space exploration with only diagonal symmetry. Except worse, because it's not an real proper diagonal symmetry, only when there is no signal it is one. In order to mirror a junction, the same reasonning that was applied to mirror the fluidbox of entity to create its mirror version in case it's inside a larger blueprint, also apply. It was trying to draw this red symmetry line on the entity itself. Because if you can, then there is no need to create a mirror version, one can use only rotations. Unlike in junction with signals, those are chirals like shoe or hands and require more complicated rules. They are inherently different in geometry.
Honestly, I still don't get the "final boss" thing. How is it different from refineries? Isn't it also just a case of swapping the fluid ports?
mmmPI wrote: Fri Jan 26, 2024 11:04 pm After reading today's FFF and reading that the previous limit system and disable station was considered SOMETIMES JANKY, by Klonan who wrote the FFF, i'm even more tempted to confirm my previous thought that i think your proposition may makes sense , or even be the best i've heard of but i still have no hope of seeing it in the game in that it wouldn't be working well all the time, such drawbacks of potentially not preserving functionnality or sometimes possibly not working because no room. It wouldn't mean it's the best way to do, just the best i heard of :)

Sometimes it's just yes/no . Would i use it if it existed ? Yes , Would i think a mod allowing this would be used if it was available on the portal ? Yes, by many players ? no

Also i don't think it's a proper flipping as of the mathematical concept which i think would be the kind of quality the devs are willing to put on the game and no less. something (re)thought and(re)made to work all the time natively, not piling things a little shaky over things a little shaky. That's what i do as hobbyist :| i expect the pros to do better :).
Fair enough. I kind of agree with that.
mmmPI
Smart Inserter
Smart Inserter
Posts: 3619
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Friday Facts #394 - Assembler flipping and circuit control

Post by mmmPI »

SupplyDepoo wrote: Sat Jan 27, 2024 10:58 am Honestly, I still don't get the "final boss" thing. How is it different from refineries? Isn't it also just a case of swapping the fluid ports?
To me refineries are "easier" because there are 3 and 2 boxes on opposite side. So if there was an axial symmetry it could only be in 1 place, and that would mean the 2 input are the same and the ouput can either be all the same or arranged like A B A . Still there is logic required to create the mirror version afterward when the blueprint is flipped and rotate it 180° depending on if the original orientation is perpendicular or is parralel to the flip axis.

The "final boss" from the FFF can have a diagonal symmetry axis, unlike refineries due to the 12 boxes potentially similar on each side. In the picture shown, only 1 input prevent such symmetry axis to be drawn. It's more logic to check in the first place if you need the mirror version or not, then to make it because more permutation cases exists, then to orientate properly given that the flip axis are not perpendicular or parralel to the hypothetical symmetry axis but 45° clock wise or counter clockwise.

Regarding the tedious programming exercice, as player we can avoid that exercise :)
SupplyDepoo wrote: Sat Jan 27, 2024 10:58 am
Yeah, and we think of junctions and dual track as a whole as one thing. It would be cool to have higher level railway construction tools. like the embedded blueprints I suggested, but that idea seems a bit unwieldy. I would like a way to define rules for generating rails and signals, but it's tricky to strike the right balance between flexibility and avoiding a tedious programming-like experience.

And it would take a lot of dev effort to implement such a thing, and if the only benefit would be slightly easier blueprinting of the usual few junctions and connecting lines, then it's probably not worth it.

There would need to be new challenges and constraints added to make it more interesting. Like some geographical areas where too much train traffic could cause vibrations that cause boulders to fall from cliffs and onto trains. Or speed restrictions on tight turns / possibility to derail. More variability in train speeds and lengths.

I'm afraid most of these ideas do not really fit into the game though.
So i tried once to use the recursive blueprint mod to try and place signals, instead of the obviously more functionnal method of placing whole blueprints. The idea was to try and make a combinator contraption so i could give as parameter a distance like 7 or 12 or 21 tiles and it would make a loop, or at least a straight track with the specified distance between signals.

That's much more work than it sound, because you have to also place the roboports, and the substations which can collide with the loop, hence the straight track "easier". But then rails have 2x2 grid which you need to make sure to handle properly. That means the total distance will always be an even number of tile which can be like 4 tile and the specified distance between signal could be 3 or 7 which would make little sense.

It's not done as of now it sit unfinished in the save folder like other too ambitious project for my attention span or dedication or 'ideas of fun'. Maybe it is the source of some feeling of "dead end" from me regarding your proposition that affect unfairly and negatively my judgment. It feels related and "too complicated for it to be fun" to me.
Not only making the machine, but figuring out what would be a useful machine/functionnal in that it avoid me mathing/rethinking the same things out later, how to embed the reflexion into the contraption so it's easy to use and prevent wrong parameter messing up.

But considering the date of release of factorio, and the expansion, from a very astact point of view, one can wonder what's the way of taking advantage of the hardware evolution. From the hypothesis that the "minimum spec" are to be roughly the same, not too much increase. It make sense to consider players will be on average able to make way larger factory, because better hardware, and more optimised game. As such giving some "higher level" tools for construction also make sense in a way i feel. As some sort of management tools for the gigantic thing people can create on such stable game. Scaling is one challenge/constraint that makes such tool feel required. But maybe it would trivialize some aspects that have some gameplay value, some things that are fun to do and figure out and feel like a choice to make and an accomplishment when after some thinking and attempts one can make more informed choice. If it was "too simple" to do that it would lose some feel from the game "not really fit" into it. But if every player on average makes a larger factory it make sense to give some tools to cut on the "tedious" or "repetitive"that more players would experience than when the game was new and players inexperimented, on less optimized game and old hardware ^^.

Now regarding the geographical areas, boulders and vibrations, on some previous FFF it was mentionned that there would be a case we'd be presented that highlight the use case for the interrupt trains if i remember correctly and not taking risks in the wordings. Now i could be wrong be maybe there would be something like a cold planet where water can freeze and melt maybe during daytime and nightime or some other thing. I know other players mentionned tides, that could also act as some additionnal challenge to make some logic puzzle. I think varying speed depending on load or in curves was ruled out for vanilla factorio but maybe modders can take advantage of the new weight given to item for rocket launch to create some interactions. Considering, yes it adds overhead in computing, but not all players would enjoy the "scaling things to the max of the computer as a fun challenge" and the similar observations on hardware improvement and average player skill at the game are still valid.

That's an impression i'm getting from reading those FFFs that one could see things with an horizontal and vertical dimension, where one is the scaling, the other one is the dense complexity/logic puzzle. I think some ideas you mentionned fit the general theme of the changes announced in both dimensions. Such "tools" are things that can help new players handle more easily the more things that there is to handle when starting a new game in 2024 compared to 2014 or so , and would likely help veterans players expand further and with more quality of life. fit in the game , not fit in the game ? i don't know :)
TheRaph
Fast Inserter
Fast Inserter
Posts: 232
Joined: Sun Sep 24, 2017 6:31 pm
Contact:

Re: Friday Facts #394 - Assembler flipping and circuit control

Post by TheRaph »

Dear devs.
Two questions:

First:
Now everyone could use circuits to configure assembly machines, how to deal with fluid input rotation?
Is there any indicator in which direction an assembly machine will connect prior to selecting actual a recipe with fluid input?

Second:
In case of flipping asymmetrical buildings, why did you prohibit it instead of just mirror building graphic and boxes etc.?
Or would it not be a better way to extend the prototype to accept a second set of graphics for a flipped version? So a designer may choose a different visual representation for a building in flipped mode and the players may have more different buildings available for his pleasure.

Thanks for the good work.
Casegard
Manual Inserter
Manual Inserter
Posts: 1
Joined: Tue May 10, 2016 9:56 pm
Contact:

Re: Friday Facts #394 - Assembler flipping and circuit control

Post by Casegard »

Oh boy ... the assembler flipping will be so awesome. Years ago we only could hope for it [nano factory - push automata][viewtopic.php?f=193&t=42964&p=554875&hi ... ry#p554875]

Form my experience the biggest issue with recipes flipping, are the inserters. It happened very frequently that the inserter grabbed an item - meanwhile the recipes changed and the item was not longer needed (or possible to insert in the factory). This made the inserter stack with the item and mostly lead to stall the whole process (incase the chest with the stacked inserter holds another needed item for the new recipes).

Idk if the new system can manage this use case - maybe worth a thought. A one assembler factory at max speed with multiple input chest with all sorts of ingredients should pretty fast show if it is working :)

Anyway, I thought I never see the day :) .. thanks for this look into the future and good luck.
User avatar
MeduSalem
Smart Inserter
Smart Inserter
Posts: 1685
Joined: Sun Jun 08, 2014 8:13 pm
Contact:

Re: Friday Facts #394 - Assembler flipping and circuit control

Post by MeduSalem »

For the setting recipes & read recipe ingredients on the assembler I hope we get to pick which wire color to read that from or write it to.

Because otherwise that will be a mess if it goes to the same wire. Wouldn't that create a nasty feedback loop? Anyway it forces you to filter and makes it more complicated than it needs to be.

I hope those options are not mutually exclusive. ^^

Qon wrote: Fri Jan 19, 2024 2:49 pm[...] But with this I can't find recipes that produce a specific output or uses it as an ingredient and tells me which building should be used. Like a "Recipe Book" combinator. The mod has this functionality in the "Recipe combinator", would be sad if I still needed the mod after the update is released...

It could be bruteforced with combinators that loops through all recipes and try them on all buildings, but that seems like a slow and really ugly "solution" which would need some manual setup to configure all recipe signals and wire in all types of crafting buildings.
I agree. It would be nice if something like the Recipe Combinator would be in the base game. Would definitely allow for some interesting builds. At least it would make initializing some circuits easier, and make them hardened to any recipe rebalancing that the devs or modders sometimes do.

Teura wrote: Fri Jan 19, 2024 1:03 pm So now we're only missing reactor circuit control to get the temperature directly, instead of doing some detection logic based on steam and output of used fuel cells. But I guess that's coming as well in due time.
For me it would already be enough if the nuclear reactor would output a simple constant signal saying whether it is active or not active. ^^

Because that would be enough to make a decision of whether you want to input another fuel cell or not... because the nuclear reactor itself would act as the "memory".


At least currently it is a bit annoying to have to "catch" the moment whenever the inserter pulls the empty cell out to use it as a "reset"-signal for the "memory" that there is a fresh cell inside. I mean it works, but it is just not pretty and for some people difficult to understand how & why it works and that is why they rather copy&paste the blueprint without understanding it or just leaving their power plant running without any fuel saving.
wizcreations
Inserter
Inserter
Posts: 32
Joined: Fri Aug 30, 2019 6:19 pm
Contact:

Re: Friday Facts #394 - Assembler flipping and circuit control

Post by wizcreations »

That is a lot of combinator logic connections to make the “generic” assemblers. Seems like it would be far easier to have multiple assemblers
User avatar
MeduSalem
Smart Inserter
Smart Inserter
Posts: 1685
Joined: Sun Jun 08, 2014 8:13 pm
Contact:

Re: Friday Facts #394 - Assembler flipping and circuit control

Post by MeduSalem »

wizcreations wrote: Sun Mar 03, 2024 10:40 pmThat is a lot of combinator logic connections to make the “generic” assemblers. Seems like it would be far easier to have multiple assemblers
It is definitely more a "proof of concept" example to show what can be done; and only a few people will use it exactly in this fashion because they set themselves the rule of a "tiny factory".


In practice it will be easier to have multiple assemblers instead.


That said there will be a couple uses for me personally. But I won't need anywhere as many combinators as the example they have shown. ^^
User avatar
dragon-architect
Burner Inserter
Burner Inserter
Posts: 15
Joined: Sun Dec 17, 2023 7:41 pm
Contact:

Re: Friday Facts #394 - Assembler flipping and circuit control

Post by dragon-architect »

Oh HECK YES!! Getting more circuit control behavior on more entities is a BONUS!! :D

I have a request along those lines, now that we can see the gates are opened for expanding vanilla circuit control behaviors:

Can we also get storage containers able to report some more useful statistics? I have a few station designs that I would like to be able to more generically simplify by having the buffer storage report some extra statistics for me, notably:
  • Container fill level (given as a number in the range [0,100] indicating a percentage of how many slots have stuff in them, ignoring whether the slots contain full stacks
  • Container size in slots
  • Number of empty slots in the container
For those latter two points, there already exist methods in the LUA API. Notably, in ContainerPrototype, there is ContainerPrototype.inventory_size and in LuaInventory there is LuaInventory.count_empty_stacks(), so these are already built-in to the game as of 1.1. I don't think it would be a tremendous stretch to add the output values of these two API methods to the circuit output of storage containers.

As for the container fill level, that one easily makes use of the two API methods as follows:

Code: Select all

(ContainerPrototype.inventory_size - LuaInventory.count_empty_stacks())*100/ContainerPrototype.inventory_size
Fluid tanks have slightly different available methods already in the LUA API. Notably: LuaFluidBox.get_capacity() and (I don't think this is the right method, but...) LuaFluidBox.get_fluid_system_contents() but I'm not 100% confident on this second one.



As for flipping, I have an additional request specifically regarding train stops!

Would it be feasible to have "other-hand" train stops? I.E. instead of train stops always being on the train's right-hand side, would it be possible to have mirrored versions of train stops that can be on the train's left-hand side instead?
Last edited by dragon-architect on Wed Mar 20, 2024 9:09 pm, edited 1 time in total.
User avatar
NightOps
Burner Inserter
Burner Inserter
Posts: 7
Joined: Tue May 12, 2015 4:47 pm
Contact:

Re: Friday Facts #394 - Assembler flipping and circuit control

Post by NightOps »

Might need to add a togglable(checkbox) feature to requester chests so that they can dump non-requested items back into logistics network. Otherwise you risk overflowing it should you make some complicated setup with one assembler for many different productions.
Post Reply

Return to “News”