{"id":52224,"date":"2021-05-06T06:01:26","date_gmt":"2021-05-06T10:01:26","guid":{"rendered":"https:\/\/www.shamusyoung.com\/twentysidedtale\/?p=52224"},"modified":"2021-05-06T08:28:30","modified_gmt":"2021-05-06T12:28:30","slug":"factorio-part-3-biters-and-solar-power","status":"publish","type":"post","link":"https:\/\/www.shamusyoung.com\/twentysidedtale\/?p=52224","title":{"rendered":"Factorio Part 3: Biters and Solar Power"},"content":{"rendered":"<p>I originally planned to give a tour of my base here, but in the last few weeks I&#8217;ve had half a dozen bases. I&#8217;ve been hopping from one game to another, trying different things and exploring bits of the game that I normally overlook. So I don&#8217;t have a single game to show off. So instead let&#8217;s talk about the level generation system and the biter aliens.<\/p>\n<h3>The Level Generator<\/h3>\n<p><div class='imagefull'><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/factorio_procgen1.jpg' width=100% alt='' title=''\/><\/div><div class='mouseover-alt'><\/div><br \/>\nThe Factorio level generator offers a ridiculous number of options. This isn&#8217;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.<\/p>\n<p><!--more--><\/p>\n<p>For example, the options for iron deposits are:<\/p>\n<ul>\n<li aria-level=\"1\"><b>Frequency:<\/b> How often does this feature show up? Set the frequency high, and you&#8217;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.<\/li>\n<li aria-level=\"1\"><b>Size:<\/b> 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&#8217;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&#8217;ll only get two or three drills on it and you&#8217;ll need countless different deposits to support your base. I have no idea why you&#8217;d want this, but the option is there.\u00a0<\/li>\n<li aria-level=\"1\"><b>Richness:<\/b> 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&#8217;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&#8217;t think it&#8217;s particularly interesting to keep moving my drills around, so I actually use a mod that sets the deposit richness to &#8220;infinite&#8221;. This is closer to how Satisfactory does it, where a single node can give you resources forever.<\/li>\n<\/ul>\n<p>You get these three options for every resource in the game: iron, copper, coal, stone, uranium, and oil.\u00a0<\/p>\n<h3>The Biters<\/h3>\n<p><div class='imagefull'><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/factorio_biters1.jpg' width=100% alt='This is a biter nest. This is not a good place to go.' title='This is a biter nest. This is not a good place to go.'\/><\/div><div class='mouseover-alt'>This is a biter nest. This is not a good place to go.<\/div><\/p>\n<p>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&#8217;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&#8217;ll find yourself fighting larger and stronger biters with more complex unit compositions.\u00a0<\/p>\n<p>To be honest, I&#8217;ve never been crazy about the biters. I&#8217;ve played a normal game with them in it. I&#8217;ve even used the &#8220;death world&#8221; 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.<\/p>\n<p>Back in the days <a href=\"?p=35194\">when I worked for Activeworlds<\/a>, 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 &#8220;everyone&#8217;s&#8221; 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&#8217;t have extra funds to spend on luxuries like receptionists and operators.<\/p>\n<p>So my work would go something like this&#8230;.<\/p>\n<p><em>Where was I? Oh right, we&#8217;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&#8217;ve never seen it happen myself. Maybe it only applies to large crowds? Or to people on dial-up?\u00a0<\/em><\/p>\n<p><em>So, here&#8217;s a structure that holds the user&#8217;s positional data. Because we&#8217;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&#8217;t see how that data could ever be changed, though. So why is the user&#8217;s apparent position changing only for remote observers?<\/em><\/p>\n<p><em>Oh! now that I&#8217;m looking at the network code I see that&#8230;<\/em><\/p>\n<p>RING RING!<\/p>\n<p><em>Oh damn it. I hope someone else gets that. Anyway, I was looking at the network-<\/em><\/p>\n<p>RING RING!<\/p>\n<p><em>This is stupid. What kind of lunatic sets up their office so the programming\u00a0 staff has their phones ring all day. Don&#8217;t they understand that&#8230;<\/em><\/p>\n<p>RING RING!<\/p>\n<p><em>FUCK! FINE. I&#8217;LL GET IT.<\/em><\/p>\n<p>(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&#8217;ll realize they have a billing question, so I&#8217;ll route them over to Tom.<\/p>\n<p><em>So where was I? Oh right. This weird glitch. Only happens for remote users. Let&#8217;s see, I looked through the movement code, found this copy operation, and&#8230; what was that for? Oh right, that gets sent off to the networking code. But so what? That code isn&#8217;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&#8230; What? I remember sitting right here, looking at this block of code, and I realized something. Maybe it was&#8230;<\/em><\/p>\n<p>RING RING!<\/p>\n<p><em>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&#8230;<\/em><\/p>\n<p>RING RING!<\/p>\n<p><em>Arg. Come on. Someone pick up. I see that it doesn&#8217;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-<\/em><\/p>\n<p>RING RING!<\/p>\n<p><em>Fuck this job. I&#8217;m going <a href=\"?p=13684\">back to McDonald&#8217;s<\/a>.\u00a0<\/em><\/p>\n<p>Anyway. Interruptions are bad for programmers. This is a <a href=\"https:\/\/heeris.id.au\/2013\/this-is-why-you-shouldnt-interrupt-a-programmer\/\">known<\/a> <a href=\"https:\/\/www.gamasutra.com\/view\/feature\/190891\/programmer_interrupted.php?print=1\">problem<\/a>. Sure, sometimes you&#8217;ll see <a href=\"https:\/\/dev.to\/_bigblind\/are-interruptions-really-worse-for-programmers-than-for-other-knowledge-workers-2ij9\">naysayers claiming that programmers aren&#8217;t anything special<\/a> and we&#8217;re just being babies about this. I can tell you those people are 100% wrong. I&#8217;ve done other jobs. I&#8217;ve written code, I&#8217;ve written <a href=\"?p=45351\">books<\/a>, and <a href=\"?p=24042\">music<\/a>, I&#8217;ve made 3D models, I&#8217;ve made texture maps. I&#8217;ve made hamburgers and <a href=\"?p=13695\">tacos<\/a>. There&#8217;s no comparison. While it&#8217;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.\u00a0<\/p>\n<p>These distractions don&#8217;t just cost me time. They also push my <a href=\"?p=49908\">anger button<\/a> really hard.\u00a0<\/p>\n<h3>Getting Back to Factorio&#8230;<\/h3>\n<p><div class='imagefull'><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/factorio_biters2.jpg' width=100% alt='These defenses seem pretty tight, but occasionally you&apos;ll get a larger attack that punches through. If you&apos;re not there to deal with it, then the biters will pour through and break everything. At that point you&apos;ll need to restore to some twenty-minute old save. Either that, or babysit everything all the time. Either way, it&apos;s not super-interesting.' title='These defenses seem pretty tight, but occasionally you&apos;ll get a larger attack that punches through. If you&apos;re not there to deal with it, then the biters will pour through and break everything. At that point you&apos;ll need to restore to some twenty-minute old save. Either that, or babysit everything all the time. Either way, it&apos;s not super-interesting.'\/><\/div><div class='mouseover-alt'>These defenses seem pretty tight, but occasionally you&apos;ll get a larger attack that punches through. If you&apos;re not there to deal with it, then the biters will pour through and break everything. At that point you&apos;ll need to restore to some twenty-minute old save. Either that, or babysit everything all the time. Either way, it&apos;s not super-interesting.<\/div><\/p>\n<p>While the biter attacks aren&#8217;t as annoying or frustrating as being interrupted while coding, it&#8217;s still not a ton of fun. The biters will assault my defenses. I&#8217;ll rush down to make sure the wall holds. Then I&#8217;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.\u00a0 I&#8217;ll spend most of my time bouncing back and forth between hotspots and never really get anything built.\u00a0<\/p>\n<p>It might be cool if the biters used some sort of brute-force &#8220;tower defense&#8221; 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&#8217;re constantly tearing down fortifications that need to be rebuilt. You can&#8217;t just build something good and then forget about it. Defense requires constant upkeep.<\/p>\n<p>It feels like the game needs to be either all creative building or all siege defense, because splitting your attention between the two doesn&#8217;t really work.<\/p>\n<p>So I tend to turn biters down until they&#8217;re an occasional problem. Often I just remove them from the game entirely.\u00a0<\/p>\n<h3>Solar Panels<\/h3>\n<p>Here&#8217;s an interesting case where making slight changes to level generation can have an enormous impact on the game.\u00a0<\/p>\n<p>Aside from all of the other options, you can also decide how many &#8220;cliffs&#8221; 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&#8217;t work. &#8220;Oh, this is the perfect spot for my green circuit board blueprint, except there&#8217;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.&#8221;<\/p>\n<p>You eventually get specialized dynamite that will let you remove cliff walls, but that doesn&#8217;t show up until halfway through the game. But that point you&#8217;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.<\/p>\n<p>So like a lot of people, I turn cliffs off.<\/p>\n<h3>Side-Effects<\/h3>\n<p><div class='imagefull'><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/factorio_cliffs1.jpg' width=100% alt='These cliffs don&apos;t seem like a big deal, but trust me: It&apos;s going to be a huge PITA to build ANYTHING in this area.' title='These cliffs don&apos;t seem like a big deal, but trust me: It&apos;s going to be a huge PITA to build ANYTHING in this area.'\/><\/div><div class='mouseover-alt'>These cliffs don&apos;t seem like a big deal, but trust me: It&apos;s going to be a huge PITA to build ANYTHING in this area.<\/div><\/p>\n<p>But if you turn off the cliffs, this changes the whole balance of the game. Specifically, the game will suddenly strongly favor solar panels.<\/p>\n<p>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.\u00a0<\/p>\n<p>But then you have solar, which is easier to set up than either of the other two. It&#8217;s cheaper and lower in the tech tree than nuke power. It&#8217;s the simplest and most straightforward form of power to use. And best of all, it creates no pollution.<\/p>\n<p>The only cost to solar panels<span class='snote' title='1'>Er. Not the ONLY cost. You still have to build them. Still, they don&#8217;t really take any exotic resources like you&#8217;d expect for &#8220;pollution-free-energy&#8221;.<\/span> is that they take up a lot of space. That&#8217;s a slight inconvenience, but it&#8217;s nowhere near enough to balance out all of its advantages.\u00a0<\/p>\n<p>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.<\/p>\n<p>So if you don&#8217;t want the distractions of biters or the annoyance of cliffs, then you also need to refuse to use solar panels or you&#8217;ll trivialize the entire electricity production aspect of the game.<\/p>\n<p>(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&#8217;t feel like an exploit.)<\/p>\n<p>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.\u00a0<\/p>\n<p>All you wanted to do was play the game without annoying walls all over the place, and you&#8217;ve accidentally activated &#8220;easy mode&#8221;. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>I originally planned to give a tour of my base here, but in the last few weeks I&#8217;ve had half a dozen bases. I&#8217;ve been hopping from one game to another, trying different things and exploring bits of the game that I normally overlook. So I don&#8217;t have a single game to show off. So [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[612],"tags":[],"class_list":["post-52224","post","type-post","status-publish","format-standard","hentry","category-retrospectives"],"_links":{"self":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts\/52224","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=52224"}],"version-history":[{"count":12,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts\/52224\/revisions"}],"predecessor-version":[{"id":52236,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts\/52224\/revisions\/52236"}],"wp:attachment":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=52224"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=52224"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=52224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}