I originally planned to give a tour of my base here, but in the last few weeks I’ve had half a dozen bases. I’ve been hopping from one game to another, trying different things and exploring bits of the game that I normally overlook. So I don’t have a single game to show off. So instead let’s talk about the level generation system and the biter aliens.
The Level Generator
The Factorio level generator offers a ridiculous number of options. This isn’t like Minecraft where you just pick a seed and take whatever the algorithm gives you. The game gives you a lot of sliders for determining how the world is generated.
For example, the options for iron deposits are:
- Frequency: How often does this feature show up? Set the frequency high, and you’ll find an iron deposit every few meters. Set it low and you might go a few kilometers between iron deposits. The latter is really good for making maps that encourage you to use trains.
- Size: When a deposit does finally show up, how large is it? Keep in mind that the size of the deposit is functionally a limiter on throughput. If you’re looking to maximize your base and output stuff as fast as possible, then you want to cover a resource deposit with as many mining drills as possible. If the deposit is small, then you’ll only get two or three drills on it and you’ll need countless different deposits to support your base. I have no idea why you’d want this, but the option is there.
- Richness: How much does the deposit contain? How long can your mining drill work on it before the deposit runs out? If you make this low then deposits will run dry quickly and you’ll have to constantly relocate your mining equipment to fresh nodes. If you make it high then a given mining outpost can run for many hours without you needing to worry about it. I don’t think it’s particularly interesting to keep moving my drills around, so I actually use a mod that sets the deposit richness to “infinite”. This is closer to how Satisfactory does it, where a single node can give you resources forever.
You get these three options for every resource in the game: iron, copper, coal, stone, uranium, and oil.
Another thing you can control is the presence and density of the biters. (The alien monsters.) At the start of the game, they leave you alone unless you get too close to their nests. As the game goes on you’ll inevitably create pollution. The biters are driven wild by pollution. It causes them to mass in groups and assault your base. Also, the more pollution you release, the more the biters evolve. If you pollute carelessly, then you’ll find yourself fighting larger and stronger biters with more complex unit compositions.
To be honest, I’ve never been crazy about the biters. I’ve played a normal game with them in it. I’ve even used the “death world” preset which makes them evolve and attack like crazy. It sounds like an interesting idea on paper, but in the long run I find them to be an annoyance rather than a challenge.
Back in the days when I worked for Activeworlds, the phones were set up so that whenever someone called the company, it would ring every phone in the office. Everyone had a phone on their desk, and it was “everyone’s” job to answer the phone. That might sound crazy, but remember that we were a tiny company with about half a dozen people. The company didn’t have extra funds to spend on luxuries like receptionists and operators.
So my work would go something like this….
Where was I? Oh right, we’re getting this weird glitch where users jitter around while flying. Their character looks fine on their own machine, but other people watching them fly will sometimes see them appear elsewhere for a few frames. I’ve never seen it happen myself. Maybe it only applies to large crowds? Or to people on dial-up?
So, here’s a structure that holds the user’s positional data. Because we’re working in vanilla C, this block of memory gets raw copied on the spot and the copy is given to the network code to send over the internet to other users. I don’t see how that data could ever be changed, though. So why is the user’s apparent position changing only for remote observers?
Oh! now that I’m looking at the network code I see that…
Oh damn it. I hope someone else gets that. Anyway, I was looking at the network-
This is stupid. What kind of lunatic sets up their office so the programming staff has their phones ring all day. Don’t they understand that…
FUCK! FINE. I’LL GET IT.
(I answer the phone and spend three minutes trying to figure out who this is and what they want and where I should send them. Finally through the thick accent and rambling story I’ll realize they have a billing question, so I’ll route them over to Tom.
So where was I? Oh right. This weird glitch. Only happens for remote users. Let’s see, I looked through the movement code, found this copy operation, and… what was that for? Oh right, that gets sent off to the networking code. But so what? That code isn’t supposed to touch the data. Just broadcast it. Right? Let me check. Oh right. I read this a few minutes ago before the distraction when I noticed that… What? I remember sitting right here, looking at this block of code, and I realized something. Maybe it was…
Oh come on. The problem was right here. Or if not the problem, a clue. What does this block do, anyway? I see that it has…
Arg. Come on. Someone pick up. I see that it doesn’t just shunt this whole memory block over the internet like I expected. But then what was that memory allocation and copy for? Was that to-
Fuck this job. I’m going back to McDonald’s.
Anyway. Interruptions are bad for programmers. This is a known problem. Sure, sometimes you’ll see naysayers claiming that programmers aren’t anything special and we’re just being babies about this. I can tell you those people are 100% wrong. I’ve done other jobs. I’ve written code, I’ve written books, and music, I’ve made 3D models, I’ve made texture maps. I’ve made hamburgers and tacos. There’s no comparison. While it’s always annoying to get interrupted no matter what your job is, nothing comes close to the annoyance and cost of losing your train of thought while coding.
These distractions don’t just cost me time. They also push my anger button really hard.
Getting Back to Factorio…
While the biter attacks aren’t as annoying or frustrating as being interrupted while coding, it’s still not a ton of fun. The biters will assault my defenses. I’ll rush down to make sure the wall holds. Then I’ll hike all the way back to whatever I was working on. And just about the time I remember what I was doing, the biters will assault my other flank. I’ll spend most of my time bouncing back and forth between hotspots and never really get anything built.
It might be cool if the biters used some sort of brute-force “tower defense” style AI where a good defense could lead them through a death maze. But the biters would rather attack a wall than go around it, and so they’re constantly tearing down fortifications that need to be rebuilt. You can’t just build something good and then forget about it. Defense requires constant upkeep.
It feels like the game needs to be either all creative building or all siege defense, because splitting your attention between the two doesn’t really work.
So I tend to turn biters down until they’re an occasional problem. Often I just remove them from the game entirely.
Here’s an interesting case where making slight changes to level generation can have an enormous impact on the game.
Aside from all of the other options, you can also decide how many “cliffs” you want. Cliffs make the land look more interesting, at the expense of making the game more of a chore. A cliff is effectively a wall for the player. If the landscape is covered in cliffs, then getting around can be a pain in the ass. Worse, your normal collection of blueprints won’t work. “Oh, this is the perfect spot for my green circuit board blueprint, except there’s a few squares of cliff intruding right in the middle. So instead of stamping down this blueprint and moving on, I need to manually engineer around this blockade. Boo.”
You eventually get specialized dynamite that will let you remove cliff walls, but that doesn’t show up until halfway through the game. But that point you’ve already built some weird mutant base designed to work around the obstacles. Unless you want to rebuild the entire core of your base, those bent conveyors and oddly-shaped delivery systems are there to stay.
So like a lot of people, I turn cliffs off.
But if you turn off the cliffs, this changes the whole balance of the game. Specifically, the game will suddenly strongly favor solar panels.
There are three ways to make electricity in the game: Steam engines, solar panels, and nuclear power. Steam engines scale poorly and pollute like crazy. Nuke power is great, but it has an insane setup time and is really complicated.
But then you have solar, which is easier to set up than either of the other two. It’s cheaper and lower in the tech tree than nuke power. It’s the simplest and most straightforward form of power to use. And best of all, it creates no pollution.
The only cost to solar panelsEr. Not the ONLY cost. You still have to build them. Still, they don’t really take any exotic resources like you’d expect for “pollution-free-energy”. is that they take up a lot of space. That’s a slight inconvenience, but it’s nowhere near enough to balance out all of its advantages.
Yes, cliffs make it a little harder to build everything, but the extra-large footprint of solar means it will be most impacted by cliffs.
So if you don’t want the distractions of biters or the annoyance of cliffs, then you also need to refuse to use solar panels or you’ll trivialize the entire electricity production aspect of the game.
(Personally, I think it would make a lot of sense to have solar panels deliver like 1/4 the power they do now. That might bring it in line with the other systems so that solar panels don’t feel like an exploit.)
I find this really interesting, and a good illustration at how complex it can be to balance a complicated game like this. Turning off cliffs will trivialize power production, which makes it easy to make pollution-free energy, which in turn trivializes the biters, which means you can skip building huge fortifications, which means you can skip a lot of expensive military research, which makes the overall progression on the rest of the game that much easier.
All you wanted to do was play the game without annoying walls all over the place, and you’ve accidentally activated “easy mode”.
 Er. Not the ONLY cost. You still have to build them. Still, they don’t really take any exotic resources like you’d expect for “pollution-free-energy”.
Crash Dot Com
Back in 1999, I rode the dot-com bubble. Got rich. Worked hard. Went crazy. Turned poor. It was fun.
Final Fantasy X
A game about the ghost of an underwater football player who travels through time to save the world from a tick that controls kaiju satan. Really.
Batman v. Superman Wasn't All Bad
It's not a good movie, but it was made with good intentions and if you look closely you can find a few interesting ideas.
The Best of 2013
My picks for what was important, awesome, or worth talking about in 2013.
PC Hardware is Toast
This is why shopping for graphics cards is so stupid and miserable.