February 21st, 2023 Livestream Q&A: Could you explain the technical issues behind the flow rate in Mk.2 Pipes?

February 21st, 2023 Livestream

Q&A: Could you explain the technical issues behind the flow rate in Mk.2 Pipes?

00:00 Intro
01:30 More computer-sciencey talk
03:53 Q&A: New video about Pipe inaccuracy?

https://youtu.be/4BOuWtw1xoc

This question has a related video
Suggested Wiki Reference Code <ref name="yt-4BOuWtw1xoc">[https://youtu.be/4BOuWtw1xoc YouTube - February 21st, 2023 Livestream - Q&A: Could you explain the technical issues behind the flow rate in Mk.2 Pipes?]</ref>

Topics

Transcript

you've talked about this before but you could explain the technical issues behind the flow rate in Mark II pipes there's nothing that I would love to talk about more about than the issue behind the flow rate in the Mark II pipes one issue for me though is that I'm explaining sort of the explanation that I've received from the programmer who made the martial pipes so but as far as I know the main reason for that is because of floating Point issues with the, the values that we're using for for doing calculations, I could spend the entire stream talking about floating Point issues which is an issue in Computing in general if you want to learn more about that I suggest Googling it and learning what a floating point value is but but tldr it's like the you know the if you when you have a decimal number in in computers like that where the decimal is placed that is like moving depending on like the size like the value that you're putting it that that's what refers to as being floating Point, so like depending on what the decimal value is you'll have like different, amount of values within the decimal there's a really shitty way to explain that but essentially essentially tldr is it's a Precision issue with like how many decimals and values when we're doing calculations when you're doing many calculations big calculations on top of each other that Precision within each other is wrong so like for instance if you're doing calculations on like smaller, decimal values then they add up eventually and they won't add up to like the the correct number that you're you're you want to achieve and and and and and not only that it's I my understanding is all right they go back to college, but my understanding is it's not even necessarily a smaller decimal places that don't work it's yeah specific value numbers just cannot be represented their specific values cannot be represented and I think 0.1 is one of them like the the data cannot represent that it can just represent something very close to it and and so then there's like little inaccuracies in whatever numbers, you're dealing with and then those inaccuracies add up and that's what the Precision issue is and now when it comes to, the flow rate with the the pipes it seems that like with the speed and the numbers that we're dealing with, the speed of the pipes and the numbers that we're dealing with, it seems like that that, in position is I think a good example of that is when you do it's like 0.1 for instance is impossible to to to represent in floating point right it becomes like 0.1 point something something it becomes like a weird value so like if you want to do like 0.1 plus 0.1 plus 0.1 plus 0 1 over and over again like at some point you're going to reach a point where the value is like nowhere near what it's supposed to be, because you've you've made inaccurate like, additions on top of each other constantly so it's something like that roughly I don't know the specific algorithm for pipes so like it's kind of hard for me to explain like exactly why that's a Precision issue for pipes but it's something to do like Jay said it's something to do with speed and and that on top of like the you do multiple calculations at a time because it but the intention from the team that I've heard is that they do want to actually solve that issues right so we've talked about different ways to solve the pipe issue, which is one is scaling the numbers to be, smaller evenly so it's like all the ratios are the same but it's just smaller numbers and so the the Precision hopefully the Precision issues that we have, won't compound so much to the point that it's an issue, but it seems like that they may have some ideas of how to actually just fix it, and it looks like that's the intention right now no idea what the outcome will be yeah that's what they're doing so we'll see what happens yep yep new video for piping accuracy yeah we could I wonder it might be like a random little five minute video but it might be interesting some people might find it interesting I don't know if we I don't know if we've ever put out information exactly how the algorithm works because like I think the factorio devs did like a full, blog post with like this is how the pipes Mechanics Work in our game I don't know if we've ever done anything like that or if like there's any information on the wiki or anything like that how how exactly like the it works yeah someone else wants to ride it we can do it, I'm certainly interested in making like a more digestible short video that like because I like teaching people about Game Dev because like there's a lot of people who aren't game devs that you all have like no idea what the process is like at all and I think some people if I could explain it in like a really easy way to understand it might be really interesting to some people be like oh I have to deal with this kind of stuff that's interesting could be cool