I spent four and a half hours yesterday making a Docker container. I needed to consult with multiple friends for help, and it ended up being six lines of Dockerfile. I hate devops so much.
I like to play Archipelago. I also like to play Factorio. Luckily, there's an implementation so I can use Factorio as a slot in an Archipelago multiworld. Unfortunately, the implementation is cursed. I also want to play on this slot with friends, which makes things harder.
For the previous seed, I ran the setup for this on my server. It ended up being a horrible script calling into old versions of software that I had to manually restart quite often. In short, it was massively painful. My goal was to make a Docker image for the configuration so it would Just Work next time.
First, let's go over how you normally set this up. The Archipelago server needs to connect to the modded Factorio instance to run the game. For most games, this is fairly easy, but because modding Factorio is weird, you can't just spin up an internet connection within the game. Instead, you need a dedicated server and an external program to interface with it. I'll collectively call these two the container ship to avoid confusion.
Because of file locking issues, the Factorio instance within the container ship and the one you play on must be distinct. Additionally, on Windows, the non-portable standalone installation and the Steam installation cannot coexist. This is a constant source of frustration for new people running Factorio in an Archipelago seed.
The container ship's Factorio instance must then be started by the Archipelago Factorio Client (the other half of the container ship). This client connects to the Archipelago server, and drives the container ship so the game functions as expected. Finally, you can run Factorio and connect to localhost to play the game. Yay!
The Archipelago half of the container ship really wants control over the Factorio half. It's what starts the Factorio process, and usually also what kills it. It does this so it can use the RCON connection to send and receive commands. This is mostly fine, but it lead me to some problems.
Running the Archipelago client headlessly within the container ship is a right pain. If the method to do so is documented anywhere, I wasn't able to find it. To make it worse, the most recent release of Archipelago removed it as a separate executable. In a graphical environment, you'd run the launcher, which then opens the client window. Instead, I had to dig through Archipelago's source code to divine how to run the client via the launcher from the cli headlessly. And then, as a cherry on top, if a config file is broken, it'll try to open a file picker anyways.
Internally, my container uses a preexisting Factorio server as a base to construct the full container ship out of. This base image was highly annoying to work with. First, the entry point into the container is a script. That's normal, but it meant I had to modify the script to call the Archipelago side of things instead of Factorio directly (remember that Archipelago wants total control of Factorio, so it starts it itself).
The base container also does some wacky things with users and permissions. The attached volume for saves and configuration is owned by user 845, which means that putting stuff in there requires elevated privileges. This isn't the end of the world, and ideally I'll have at least the Archipelago mod updated automatically from within the container, but it is a pain.
Anyways, I got the thing made. It only takes a touch of configuration to run, which I provide a sample of in the project's README. Maybe next I'll cook up a runner for Balatest tests. That one seems like it'll be a whole pile of nightmares, though. We'll see.
Until next time,
- BakersDozenBagels
This weekend has been wild. I'm glad all the craziness is done today (Saturday), or I'd be in a bad spot from the anxiety. I'm glad I have tomorrow to relax.
For the past couple of weeks, I've been procrastinating on my English assignment. It's not something gigantic, but it is a solid chunk of work that I hadn't been doing. It was due yesterday, and the anxiety from it was creeping into everything else I was doing. Of course, anxiety doesn't override executive dysfunction, so I kept putting it off until I had maybe six hours left before the deadline.
I did end up getting it done, but that means I skipped dinner yesterday as well as the weekly game night. Neither is a gigantic deal, but they're both good sources of spoons. I already feel like I'm running on empty half the time. I really need to be more proactive about my work to avoid some of this in the future.
This morning, I went to the No Kings protest. It was really cool to see how many people turned out. I'm living in a relatively small city, so I was surprised when about a thousand people were there.
A not great thing was the amount of young people there. It was only a ten minute drive from my university, but a vast majority of the protesters were at least twice my age. I feel like I could be the catalyst for change here, but I'm already so low on spoons from everything else. I'll try to make a difference where I can going forward.
Immediately after the protest, I played with my school's band. It wasn't the best performance ever, but it was pretty good. I joined the band on a whim a couple months ago, not really expecting a whole lot out of it. I guess I forgot how good it feels to play music.
I used to play the trombone in high school, so that's what I'm playing now. It's amazing how quickly it came back to me. I haven't even been practicing that much, only two hours a week. The hardest part by far has been remembering how to read the pitches on my sheet music.
So, I might have lied about the weekend being over for me. I do still have a project/exam to do for my graphic design class. I'm not worried about it, though. My plan is to get it done tonight and have nothing for tomorrow.
This graphic design class is totally useless for me, by the way. All it is is making charts in Excel. More specifically, which buttons to click to get a particular chart, or sometimes a closely related chart because the professor doesn't know the difference. Maybe she just doesn't care, or maybe she wants to make the class easier on us. I can't really tell.
I do want to highlight one specific thing from lecture. When demonstrating one of the formulas (which must have been COUNTIF because we don't use anything else in this class), the professor mistyped something. There are several ways in Excel to fix this. For example, pressing esc will revert the input. You could also confirm the input (tab or enter) and undo (with mouse or ctrl+z). Neither of these is what the professor did. Instead, I watched in horror as she closed Excel and reopened it. For the record, I'm not mad that someone doesn't know how to use a program. I'm mad that someone who's been using it for years and is teaching a class on it doesn't know about the existence of undo.
That's about all I have to say for now. I will add one more short-term plan I have: I want to add GoatCounter (or my own version of it) to this website. I'm more than a little bit curious where, if anywhere, I get traffic. I don't want a whole lot of data, just pageviews. I'll send an update here if and when I get around to it.
Until next time,
- BakersDozenBagels
So I've made a new blog page. I already had one (it's still there), but the format there is very restrictive (turns out writing on a narrow topic about a game you hate isn't fun), and I haven't felt the impulse to add to it in a while. This page is "Blog2" only to keep links to that page where they are.
Speaking of this page's URL, it might look a bit weird. It's like that to allow me to add pagination later if I want to, something I can't do for the old blog without changing links. I don't know if or when it will matter, but I want to keep myself open for the future.
Mostly I've been busy with university for the past few months. The workload has been a lot, and I've been struggling to find a good way to escape. There are a few highlights, though:
A few weeks ago I did my school's game jam. The theme was "The Elements", and mine was one of two(!) submissions. I had a lot of fun making this game. My roommate did the music, but I did everything else: the code, the art, the gameplay, etc.
The game is an hour-long incremental with way too many currencies (one per element). You combine simple ones to get the more complex ones. It's live if you'd like to play it. Send me an email if you do play it, it'll make my day ☻
There are a couple of things that I want to fix in a post-jam version of the game when time permits. Primarily, I want to make the layout mobile-friendly, but there are a few other quality-of-life changes I want to implement before calling it done. When I get around to making that version, I'll post about it.
I set up SSL for my nginx server. That's what runs cdn.gdane.net, and it's primarily where I host files too big to send through Discord. Some other stuff lives on that server, too, though. One day I should post about the behind-the-scenes architecture of this site, since it's kind of nutty.
I went home to see my family. We played games, and I got to see my one-year-old nephew. I deeply hate the drive (two hours each way), but I enjoy the company.
I've started actually using an RSS aggregator day-to-day. I'm self-hosting Miniflux, and following a few blogs, mostly the remnants of who I was following on Cohost. I'm trying to replace the time I would be spending on YouTube with reading. So far, it's going quite well, although I'm looking for a bit more to read. Actually reading blogs is a big part of the reason I want to try writing a blog again.
Here's a highly disorganized list of things I want to do in the near future:
Finish Bakery 3.0
Update Increlemental
Containerize a Factorio Archipelago server
Write about my server architecture
Fix up my latest Quaver chart and push it for rank
I hope to put more here soon, although I'm a bit anxious I won't keep up with it. If I don't it's not a huge deal; the stakes are low. Thanks for reading what I have to write.
Until next time,
- BakersDozenBagels
Questions? Comments? Email me at business@gdane.net. I'd love to hear from you!