Artifacts MMO - Learn how to code with REST APIs by playing a game

Artifacts is a Sandbox MMORPG where you can use any programming language to control your characters with our API.
I first heard about it from this Reddit post on r/programming from the sole developer Muigetsu, and immediately dedicated my lazy Sunday to figuring out how to play this game that is inherently just grinding by automating the grinding so I don't have to do the grinding myself. Yeah, you don't play this game by playing the game. You play this game by writing code to automate playing the game so you don't have to play the game. It's genius.
For some, this game presents a really fun way to learn programming, or practice working with REST APIs, or try out a new language or framework. But as soon as I hopped in the Discord and checked the announcements, there was only one goal I had in mind. The Lich Race. Kill the big bad endgame Lich boss enough times, get the crazy-low-drop-rate Life Crystal before anyone else, win the season.
When I start a new project, there's typically 2 diametrically opposed approaches I'll take. The first, I'd call the "production approach", where I try to meticulously plan out as much as I can in advance, consider all the use cases in scope, all the different systems or endpoints or whatever it is I need to work with, all the parameters I need to accept, and design a plan to implement to that spec. You know, the boring approach. Then there's the "if it works, it works" approach, which is way more fun. Load up VSCode, create a new .ps1 file, and just throw shit at the wall until it sticks. I don't care about writing code that's good, it just needs to work. As I repeated way too many times in the Discord, we got a lich to kill.
WARNING (pretend these are those stupid siren emojis). I wrote this thing a year ago. I decided not to publish it because I didn’t feel like sharing my code at the time. That was a bad decision. My disgusting, horrific spaghetti code is now available along with this post for your viewing pleasure. I highly recommend having a strong drink and an empty stomach if you decide to delve into its depths. Also it’s been a year of changes to the reference API so…I can guarantee it will not work at all in any way whatsoever.
The Alpha Experience
Being a part of this open alpha test from the beginning felt, even at the time, like a small moment in history. Not that it's necessarily anything monumental, just the feeling of I was there, live, when Muigetsu implemented an unannounced rate limit change that broke everyone's code, man what a fun time
. It's an inviting community of higher skilled (than me) but equally degenerate developers building crazy GUIs, TUIs, & VSCUIs (my term for "VS Code User Interface". You're welcome for that nightmare.), writing complex combat simulations to generate the optimal equipment loadout for different enemies, tracking the General Exchange over time to speculate on the market and try to crash the economy, developing tiny micro-optimizations so their bots perform 2% faster on average than others, and building crazy AI algorithms to automate the entire process of grinding up a team of 5 characters to take on the lich while they sit back in an armchair smoking a pipe and wearing a robe, or something like that.
And then there's this idiot using Windows Powershell (the older, uglier Powershell 5.1, not the hip cool Powershell 7) spamming who needs OpenAPI codegen, we got a lich to kill
.
But, if it works, it works
. And so it did for a while. I was at the top of the leaderboards, contending with a few others that were obsessively focused on getting the first Life Crystal drop, grinding away by not grinding away. And then the "alpha" part of the alpha test started to creep in.
Take a sole developer with a day job running an open alpha test on a game that skyrocketed way beyond what they expected, and a bunch of idiots like me slamming their API with shoddy code, and you get outages, crashes, bugs, unplanned production changes, and a whole lot of messy fun with it.
So, if you decide to dig through the dumpster fire that is my code and you ask yourself what the hell was this idiot thinking?
, I'm right there with you. And there was certainly a reason I wrote it that way at the time -- it got the job done, quickly, and I had a lich to kill.
What the hell this idiot was thinking
It was actually pretty simple - figure out what I need my characters to do next to work towards the lich, write some code to hit that endpoint on a loop, and let it run. Rinse and repeat as the tasks got more varied and complex, as new API changes were announced (or just done haphazardly, followed by a delightful whoops
from Muigetsu in Discord), as downtime and outages during the night broke my loops, and that's how I ended up here.
The best part is, I didn't even win the Lich Race. No, the actual best part is, Artifacts works on a wipe system, where every season ends with the entire server being wiped so everyone can start fresh on a new set of challenges. And while others were diligently writing good code, which might require a few tweaks or additions to adapt for the changes in each season, the thought of updating my monstrosity is less appealing than just starting from scratch with the tried-and-true "production approach". Although it may be a back alley dumpster fire smoldering away behind an abandoned Waffle House, I had a damn fun time making it, and a lot more fun getting picked on by all the smarter, ACTUAL devs in the Discord using things like async and the OpenAPI spec and AI systems that aren't just me highlighting a few lines of code and pressing F8 in 5 different terminals to tell my characters what to do.
But who needs all that stuff. We got a lich to kill
.
Join The Cult (or, kill it I guess?)
When I originally wrote this article, I was announcing the release of Season 2. Well, my bad Muigetsu. It is now to hype up SEASON 6, planned for early October 2025. Although I certainly don't have the time to commit to this season like I did the first, I'll be back around poking at the API, taking shots at Rosenstjerne (the winner of the Lich Race, what a nerd), and luring people to the #powershell
channel in Discord with a siren song of sunshine and rainbows.
I hope to see you there.
Oh, yeah I published the code
Honestly, I don’t remember how half of it works, outside of the fact I would just highlight + f8 some stuff in Artifacts_Tasks.ps1
and run it in multiple Powershell terminals, and that uses functions defined in Artifacts.ps1
, and equips armor/weapons defined in Loadouts.ps1
. Oh well, I have fun getting made fun of, here you go.
Subscribe to my newsletter
Read articles from AJ Lindner directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
