Two's Complement - Factorio
Episode Date: December 6, 2025Ben's new TCP backpressure explanation: conveyor belts full. Matt zooms out and mistakes his factory for a Pentium 2. Ben plans to switch to Linux gaming; Matt's start bar keeps popping up and he's ha...d it.
Transcript
Discussion (0)
I'm Matt Godbolt.
And I'm Ben Radie.
And this is To's Compliment, a programming podcast.
Hey, Ben.
How on earth are you?
I'm doing good.
How are you?
I'm doing really good.
Now we've made a thing out of that.
so we actually i'm going to stick move back a bit from the mic um we don't have much time because
i got to go and pick kids up from school so this is going to be a turbo edition but you said
you had an idea and i'm all ears have we talked about factorial on this podcast yet i don't
think we have no it seems like this podcast is the intersection of games and programming
and if there's anything that is the intersection and
of games and programming, it is the game, Factorio.
I think you're right, you know.
I mean, so if our listener doesn't know what Factorio is, how would you, no, I know
there's the pithy description, but that kind of buries the lead a little bit.
But what is Factorio, Ben?
Tell me what Factorio is.
So Factorio is a game, the premise of the game, it's a video game.
It's on many platforms.
it's a fairly popular game.
So if you have not played this game already,
it is very likely that you will be able to reach within arms reach of where you are right now
and pick up a device that would allow you to play this game.
But it's a game.
And the premise of the game is that you are crash-landed on a planet,
and you are a, you know, sort of technician or engineer that has access
to these sort of amazing tools for crafting and building things.
And your goal, at least in a vanilla game, is to escape the planet.
It's basically like, I crash landed here, my ship is destroyed.
I don't want to be here.
So I'm just going to build a rocket ship and leave.
And so you go from, you know, mining coal with a pickax to launching yourself into space
in a rocket.
And, you know, like a typical playthrough, I think like the Speed Run playthrough,
are pretty fast or like eight hours as i could yes pretty well that's not fast for speed run but yeah right right right
there's a lot to do um but the the the typical playtime i think for mortal humans is like 24 hours right
and one of the things i actually sort of like about that is you can imagine like you know you're
traveling through space alarms start going off you're entering the atmosphere of a planet you go oh crap
and then you land and you got 24 hours to get off the the planet and then you sort of like
bunch yourself back into space and sort of like exhausted fall asleep.
All right, fine.
Right, but this is 24 hours of somewhat accelerated time with the magical ability to mine
and build things.
Yeah.
I mean, in game time and real time are the same time.
Okay.
Like, if you're moving the character around and you're, you know, like I said,
you know, mining for coal or whatever, like there's no time speed up in the game.
Right.
Right.
Like, so if you're playing for 24 hours, you can, you could think of that as this person.
and being on this planet for 24 hours.
But it's like top-down.
So far it sounds a little bit like Minecraft.
It's like crafting and building and stuff.
And it's a little bit like that.
But it's a very different look.
It's a top-down game.
When I just see it, it reminds me of like Starcraft
and that kind of sort of look and feel a little bit
and the planet as well as a bit sort of alien.
Yeah, yeah.
But I think like some real-time strategy aspects to it.
It's got some sort of like tower defense aspects to it.
Right.
There are like aliens on the planet that you have to kind of fend off while you're doing this.
Right.
But really the key of it is you can't do this by yourself, right?
One person with a pickax can't possibly build a rocket ship and launch it.
You need to do something.
And so there's kind of this sort of progression of like, well, now the first thing I craft
is something to help me craft faster and so on.
So how does that progression look?
And why are we talking about this on a programming podcast?
Yeah, yeah, yeah.
Well, so as you go through, you're building essentially automation, right?
Automation to gather the resources, automation to turn the raw resources into refined resources,
automation to build actual useful products out of those refined resources,
and then automation to tell the useful products, you know, how to assemble them into eventually.
what becomes a rocket.
And, you know, there's all kinds of amazing things in this game.
There's robots that you can control, and there are, you know, circuitry systems that
you can set up and essentially program to do various things.
But the sort of fundamental aspects of the game revolve around, you know, sort of like
gathering resources, refining those resources, and then, you know, using them or moving
them somewhere else.
Distributing them, yes.
And it turns out that Factorio is actually just a huge, you know, distributed computing architecture simulator.
Right.
Because each of these little like conveyor belts that you build are actually just kind of like a message queue.
And each of like the, you know, like little factories that you build that turn like the raw iron into, you know, iron plates or steel are kind of like services that, you know, take inputs and produce outputs.
The bus, which you've built yourself a bus of like eight lanes of conveyor belt that then have different things.
You sort your, it's quite, I mean, it's a crossover between, as you say, distributed computing, but also sort of silicon simulator.
You know, like if you zoom out far enough out of your established factorial map, it's very difficult to tell the difference between the die plan of a Pentium 2 and your factorial map.
Yes, yes, it is.
It's very, very hard.
You're like, hey, there's a blurry picture of that and you will not be able to tell the difference.
Or even that blurry, really.
Not even that blurry.
Yeah, you just have to be.
It's quite something.
And I think, yeah, it's very appealing because there is this satisfaction of laying things out.
And like, there's a kind of, I haven't played, I don't think, as much as you have.
But the satisfaction I get from working out the right latency of like this robot arm that can pick things off the convey about has like a three second cadence where it can pick something off and put it into the factory.
pick it up and put it into the factory. So now I want to lay my robot arms and factories out so that
like a continuous stream of items coming down the conveyor belt are all efficiently plucked and
used and none of them fall off the end of the conveyor belt or go back round again in a loop and
all those kinds of things. And I am sure this gets gamified and spreadsheeted to death to like really
optimize it beyond that. But there is a satisfaction in it. Although it, what I find I get very quickly
overwhelmed by the size of my own map and the fact that something stops working and now I'm
debugging like where where is it I'm going back up the all the conveyor belts to like oh I've
run out of this this thing's been destroyed by aliens and I didn't notice it and now now I have to
kind of get everything back online again and so there's kind of a yeah it feels like it feels like
work at some level which is not selling it right to to people but it's working it's the best
parts of the things that I like about my job, the sort of micro optimization and the sort of
big picture stuff. And yeah, often I'll turn off the aliens actually because I don't want
them to come in and annoy me. But you know, I know that's not. Yeah. So I just sort of somewhat
side note here, if you don't want to deal with the aliens in factorial, there's another style
of play that you can use, which is to go completely green because the thing that triggers the aliens is
pollution.
Yes.
And so you can just, and I have done this, you can do a play-through with,
you literally never have any kind of combat with an alien at all.
And now the whole problem is, how do I launch a rocket without creating pollution, right?
And so that just changes the problem in a new and interesting way.
I've forgotten about, I forgot about that aspect of it.
That's pretty cool.
Yeah, it's great.
And then there's a sort of meta part to this whole thing, which is like,
factorio the game runs pretty quickly on my PC even my old PC my non-gaming PC and the amount of
complexity that it's simulating oh I know it's amazing isn't they've got quite an engine underneath there
doing the the simulation and you know moving things around as well as then just displaying I mean there's one thing displaying but there's the other thing it's like no you've got this huge huge sprawling map
filled with actors that are doing things all the time.
So, I mean, it's quite a testament to the engine skill.
And I'd be intrigued to know.
I think I've heard another podcast somewhere where it was an interview with one of the developers.
I think they use all sorts of data-oriented design tricks to be able to make things cash-friendly
and, like, rate lists of the same kinds of objects so that they can, like, stream through it with SIMD.
There's some cool things behind the scenes.
But we don't need to know about that.
We can actually just enjoy it from the point of view.
of a player.
Yeah.
So I've never actually got to the point of launching a ship.
I always get caught in the middle and then I do have a great time, but then I eventually
lose interest in the race for it, either because I've been too pollutey and the aliens
have come in and smashed up stuff or more likely I've been distracted long enough that
I come back to it.
And I'm like, I can't.
I don't remember.
It's like coming back to a code base after six months.
You're like, I don't remember any of this.
There's no comments.
And there's no kind of, I mean, I was going to say there's no funk.
and naming of things.
But you know, you can do with the more sophisticated like robot automation,
you can like put programs of sorts in them, I think.
And then you can duplicate those.
And I think there was it templates that you can make.
Blueprints is what they call them.
Yes, they are exactly that.
And then you can sort of stamp out.
This is my thing that creates this kind of resource.
And I have, you know, these two factories and these type of conveyabouts around.
You can just like click it down and stamp it out.
But when you stamp it out, it's not like a UI help.
thing it's no it's you're telling the robot to go and build it all and it goes off and builds it
you still need all the resources to have that in place to build it so yeah it's a it's a it's a cool game
yeah i'm a fan and there's an expansion for it too right no i'm on which yeah go on tell me about this
they released this year the expansion is space age and the whole idea is okay well you've launched
the rocket what if you just kept going right um and now you're in a whole solar system and there's lots of
planets in the solar system, not just the one with the aliens on it, and you can go to those
other planets, and they are very different, and they have their own things. And you can set up
essentially spacecraft that move between the planets and use the rockets to relay materials
from one planet to another. Oh, my gosh. But presumably with a much longer latency and, you know,
the resources of launching a rocket are non-trivial. But you could now,
ship ore from one planet to another.
That's so cool.
Exactly.
And then one of the super fun things about this, I really kind of dig is like, so you go to a new planet,
you launch yourself up into space, you take one of your space platforms is what they call them,
but basically it's a big ship and you fly to the new planet, you land on the new planet,
and now you have no way to get off.
You have to build another rocket to get off, right?
Oh, why?
And so while you're on that new planet, you have to remotely control the setup that you had on the previous planet.
Your original planet, yes, which means you have to have set up like some robots and a few other things.
And you can like, you know, sort of remotely you can zoom out in the map essentially and like go over to the other planet and like click on things.
But like you can't just like go, you know, if the bugs go destroy your deal, you can't just walk over there and fix it, right?
Like you have to be able to fix it remotely or you have to have to have.
the automation in place where the robots just
automatically fix it, right?
Whoa.
So I really liked what they did with the expansion
and just the way the space platforms work
and the different planets.
And I think it was, it's just, it's been a really
fantastic game. But my new
sort of way to explain TCP back pressure to people now
as I say, have you played Factorio?
And they're like, yes. They're like conveyor belts.
That's what's happening.
Your conveyor belts are full.
And they're like, oh, okay.
And I don't have to say anything else.
Yeah, they immediately get it.
It's good enough, right?
I mean, I don't know if you, yeah, TCP back pressure is, yeah.
Yeah.
I mean, you can go down many levels from there, but it's like, what is happening here?
Why do I, why do I rate to the socket and it just blocks?
Yeah.
Right?
What's happening?
Yeah.
Yeah.
Yeah.
That makes it.
The other cool thing about, uh, fact,
is that it's multiplayer like you can get someone to come and join you in the map and then that
means that certainly if you have kids of an age that are interested in this kind of thing you can do
a next or I guess you could have friends as well friends are an option but you know we're two dads
and so we've been through this with kids it's like hey you want to come and like shoot aliens and
build build stuff and and it works pretty pretty well with that at least yeah and and certainly
the division of labor things is useful where you can kind of like be one person and stay back
the main base and just kind of keep the admin going where the other person goes off and
sort of like finds more resources and builds a sort of secondary base and then you start with
flies to a new planet or flies to a new planet yeah and sets up the train network i got as far as
trains and then i was very cool and then i was like okay now man if you are into model trains
factorial is the game for you right because it's it's just got all of the things that make that
fun and interesting yeah it's a great game now now i want to
play it again. And I haven't got time, Ben. I haven't got all this time in my, I know I've got like
all this time off, which I think by the time this episode goes out, I might actually be working
again. Oh my goodness. I know how horrible, how awful for me. No, I'm looking forward to the
rhythm of working again. But and ironically, maybe I'll have more time then because at a moment,
I could just keep saying yes to everything because I'm like, my default, don't have a reason.
But as soon as I, oh, I've got a new job, I can't be doing this. But then I might have my
evenings back. Who knows? So, yeah, Factorio could be in my future. Yeah, yeah. Well, I would say
if you are a programmer and you are in a place in your life where you're okay falling into a
black hole for a few hours, being like, what just happened? How is it one in the morning?
You could consider trying out Factorio. We are not sponsored by whoever makes Factorio. I can't
even remember it is, but we're not. This is my own personal opinion on what games are fun.
Purely a fun, a fun game. Yeah. What are the games are you playing at the moment while we're here?
I had been doing Baldersgate 3 because, you know, it's just a fantastic game.
Yeah. I actually, this is probably going to wind up being another episode for us at some point in the future,
but I have already decided that I am not going to upgrade to Windows 11 on
my gaming PC. Oh. And I am going to install Ubuntu and probably Ubuntu. I haven't necessarily
picked a distribution yet. But some flavor of Linux. Some flavor of Linux. And I am going to
start using Linux for my gaming PC. And I expect that most of the games that I want to play
will work. There might be a little bit of troubleshooting here and there. My son has also done this. He in fact
sort of led the way on this and I was initially I was very skeptical I'm like really and he's had some
good luck with it and I'm like you know what that is better so I'm I'm switching to and if that means
that there you know is some game at some point in the future that I really want to play that I can't
get to work on Linux well then I will decide at that point in time whether it's worth my time to
interesting but we'll definitely look forward to you giving us a trip report from that point of
you. I predominantly have used Linux and I gained all of my experience on
Factorio was in fact on Linux. So that has worked for me. But then when my kids
started playing Overwatch 2 and Marvel Rivals, that's when I finally acquiesced and
in order to join them, I would need to use Windows. So I install Windows. And then I've been
using it for video editing, which is another thing that I have been unable to get Linux to be
as good, even though I have a package that works on Linux. It works as well on Linux as you'd
imagine, where they, anything they say, well, you're not on a supported particular variant of
Linux. I'm like, well, what is supported? And they named a distribution of Linux that I have
literally never, ever heard of. And it turns out it's just a distribution that's just for running
this package. So I'm like, okay, no, I'm not using your bespoke package version of Linux. I'm using
like a normal one. Thank you. Yeah. So, you know, I get it. It's a more, you know, it's a difficult
support burden and there are things to do with, you know, codex and there's things to do with,
you know, proprietary, close source stuff that's harder to get on Linux, whatever. But,
yeah, I, by and large, live in the Linux world. And I don't know how people can use Windows.
I know this is not what this episode is about, but oh my golly, I was, I just, everything
about Windows has been frustrating
the heck out of me
like the unhideable
non-configurable
start bar that keeps popping up
every time I dare put my mouse
anywhere near the bottom of the screen
as I've got an auto-hide to try
and get the screen real estate back
to being upsold various
Microsoft related things like
logging into their Microsoft
Cloud, whatever it is.
Hey, you're not backing anything up.
I'm like, yes, I know.
There is literally nothing on this computer
that I care about. I don't want to back
anything.
up oh but you haven't backed up in this long i again with the stop telling me i don't care and then
every now and then i'll reboot and for reasons that i don't understand i go through some part of
the you know beginning setup again and the only thing i've got to not sign into something is to
skip for now and i'm like no skip forever go away yep and it's not everything about it feels
utterly frustrating it's pretty it's pretty gross and especially considering that i'm literally
only using it as a gaming platform i really don't know any of that i don't i don't need a single bit
of it yeah so um i am planning on making the switch probably over thanksgiving when i'll have a few
days off and i can just kind of wipe the machine now and now people will be able to work out
when we're recording oh no now that now people know that yeah that we don't we don't do these
live we i've thought about that we could do a live one sometime that might be fun or a
live-ish.
You should do a live one.
Now I'm all up with the video editing.
We could even do a video editing one, but then that would mean that, you know, actually,
I'm looking at your backdrop right now and you'd be fine.
You've got a great sort of, quote, Zoom background, whereas it's a catastrophe, but I've
just gone with it.
I think yours works pretty long.
So we could try that sometime.
I guess.
I'll be down for that.
Yeah.
All right.
We can certainly think, think about doing that sometime.
But yeah, we're recording us actually on Halloween, which is one of the reasons why I've got to go
pick the kids up because I'm then got to get back in time to hand out.
candy to people or maybe not.
Just throw it at them.
Well, there's been a lot of political activity in this area.
I've been wondering whether I should be carrying my green card with me, which is a very
weird feeling.
And I don't want to go politics on this, but it's like, oh, maybe I'll have to.
Yeah.
That's a downer.
Let's talk about something nice in the last few minutes before I have to go.
Well, I am definitely going to report back on my experience.
is switching over to Linux, and I expect it will be mostly smooth.
There are a few games that are, like, natively supported on Linux,
and I think Victoria actually might be one.
I think it is.
Yes, it is, yeah.
But I know that, like, the Steam deck is based on at least some, like,
there's a Linux kernel in there somewhere, if I recall correctly.
I think so.
And so they, you know, Steam kind of has this incentive of making sure that games
are at least remotely compatible with that, and they have this, like, I think it's
Proton is the name of it?
Maybe I'm getting that name.
I think that brings about that.
I think it's either a port
or based on wine at some point.
Yeah, yeah.
And Steam has like,
at least with Steam games anyway,
has like a rating,
if I understand this correctly,
of like how compatible they are with Proton.
And for like, you know,
the platinum or gold games,
they kind of expect it.
It just works.
Yeah.
Right.
So, you know,
if that means that I'm just sticking
to those types of games.
The problem is there's too many games to play anyway, right?
It's the tyranny of choice, right?
I feel like there's like a somewhat famous, like, psychological concept that's just like people are miserable when they have too much choice, right?
Yeah.
Trying to remember that it's probably like the tyranny choice or something like that.
But in any case, like there's too many games.
There's too many games to play.
And if I have to just like select filter what's, you know, platinum gold on proton, okay, these are.
might actually be a boon.
Yeah, I see.
Like, great.
Now, now that'll help me and I won't be sitting there, you know, when the steam sale comes
along going like, there's so many games that I want to buy.
Yeah.
How do I pick, which I'm going to buy?
That's fair.
Yeah, no, so yeah, anything to reduce the number of them might actually work in your favor.
I mean, I wouldn't complain.
If it means it don't have to deal with stupid Windows pop-ups, I gladly welcome it.
Right.
That is definitely, I mean, yeah, worth doing for that reason alone.
Yeah.
Well, it looks like it's going to be quite a short episode today,
which is good for editor Matt in the future.
Right.
So lucky him, although he's gotten very lazy recently.
So apologies for all the ums and urs and dog barks
in all of the last few episodes that have gone out,
but I'd like to think that it's charming.
There's charm.
There's something in it, yeah.
Some amount of charm.
Fabulous, my friend.
Well, I look forward to hearing your trip report about gaming on Linux,
some future episode.
some future episode i've got some ideas up my sleeve as well for some cool things so again you know
we're totally abusing our poor audience um well i guess it's not abuse they they chose to come here
they've chosen to stay to be being here and the kind of things we talk about hopefully are the
things they're interested in we'll find out we will all right i'll see you next time until the next time
take a minute thank you've been listening to tuss compliment a programming podcast by ben rady and matt
find the show transcript and notes at www.2.2's complement.org. Contact us on Mastodon. We are
at twoscomplement at pachyderm.io. Our theme music is by Inverse Phase. Find out more at
inversephase.com.
