← Writing

RuneScape Taught Me to Code

I didn't set out to learn programming. I just wanted to stop clicking.

I was 13 years old, and I was losing my mind.

RuneScape is a game where you spend hours doing the same thing over and over. Mining the same rock. Cutting the same tree. Fishing the same spot. The whole progression system is built on repetition, and if you want to get anywhere, you grind. For a while, I ground. Then I started looking for shortcuts.

The wrong kind of shortcuts

The first shortcuts I found were bad ones. I downloaded every keylogger I could find on the internet. Every suspicious tool in sketchy forums. I was looking for ways to steal gold, or get a bot, or find some edge — and predictably, I got hacked instead. Lost everything.

But in those forums I stumbled into a small community that was doing something different. Someone had built a Java API that sat on top of the RuneScape client and let you write scripts that played the game on your behalf. Not hacking. Automating. You could write code that would walk to the mine, click the ore, walk to the furnace, smelt it, walk back. Whatever you wanted the character to do, you could describe it in code.

I had no idea what Java was. I didn't know what an API was. But I wanted my character to stop standing still, so I started reading.

Stopping playing, starting programming

That's the thing about learning to program when you have a reason: it doesn't feel like studying. I wasn't trying to learn Java. I was trying to get my woodcutting level up while I slept. The language was just the tool.

Within a few weeks I had working scripts. Within a few months I had more scripts than I had characters to run them. I stopped playing the game almost entirely — I was too busy writing code for it. The game had become a way to test whether my programs worked.

At some point I noticed that I cared more about the programs than the gold they were earning. A script that handled an edge case elegantly was more satisfying than watching the gold counter go up.

The first business

I did want the gold, though. Or rather, what the gold could become.

There were markets where people would buy in-game gold for real money. Resellers who'd take bulk quantities and move them. I had a fleet of bots running, grinding gold around the clock, and I wanted to turn that into something real.

One problem: I was under 18, and Western Union — the payment method these resellers used — required ID. So I convinced my brother to help. He'd accept the transfers. I'd give him a cut. Maybe.

This was my first experience selling something I'd built. It was rough around the edges in every way, but it worked.

Going deeper: Liquid Automation

By the time I was in late high school, I'd outgrown the API I started with. I wanted to understand how the whole system worked — not just call functions someone else had written, but understand what was underneath.

RuneScape's client was obfuscated. Jagex scrambled the bytecode every week specifically to break bots. Variable names changed. Class names changed. Any bot that relied on specific names broke on patch day and had to be manually updated.

I built a tool called Liquid Automation to deal with this. The approach: use ObjectWeb ASM to read and modify the bytecode directly, and write an Updater — a piece of code that could analyze the new obfuscated client each week and figure out what had moved where. Instead of hardcoding names, you'd look for patterns. The method that moves the player is always going to have certain characteristics; find those characteristics, and you find the method, regardless of what it's called this week.

This was real reverse engineering. Reading someone else's compiled code, understanding what it does without being able to see how it was written, and building tools on top of it. I was 17 or 18 and had no idea that's what it was called.

Competitive programming changed everything

Toward the end of high school I got introduced to competitive programming — the kind where you're given algorithmic problems and a time limit and you have to write correct, fast solutions. It was completely different from what I'd been doing.

Bots were about persistence and reverse engineering. Competitive programming was about clarity of thought. You had to understand a problem so well you could solve it elegantly, not just hack around it.

Something shifted. The gold farming had been driven by wanting money. Competitive programming was just interesting. I wasn't trying to get anything out of it — I was doing it because the problems were beautiful and working through them with teammates was genuinely fun.

In university, two teammates and I won the regional championship of one of the major international competitions. Twice. It remains one of the better experiences of my life.

What RuneScape actually taught me

The obfuscated client was the first time I had to understand a system I hadn't written and couldn't ask questions about. Reading unfamiliar code, building a mental model from the outside. That's most of what professional engineering is, and I learned it at 17 trying to keep a bot alive.

The scripts also had to actually run. They had to handle the cases where the ore was already taken, where the inventory was full, where the server lagged. Real failures, immediate feedback.

And then there's whatever the Updater built in me. Reverse engineering the client week after week, against an adversary actively trying to break it, with no clear end in sight. That kind of persistence doesn't come from solving clean problems with known solutions.

I didn't set out to become a programmer. I set out to stop clicking. The code was a means to an end, and then gradually it became the end itself.