Learning Hex Editing Through Reverse Engineering Games

X-COM was the first system opaque enough to force it.



Note: This is about single-player games in the 1990s. I’ve never used cheats, hacks, or trainers in online games or competitive multiplayer. That’s a different thing entirely.

X-COM: UFO Defense didn’t just have a better setting. it accidentally taught me hex editing. Not because I wanted to understand the game’s systems. Because I wanted to cheat. The first game that actually forced me to learn hex editing is X-Com, I posted an article about why X-Com is the best game I played.

Let’s be honest about that.

I Wanted to Cheat. That’s How I Learned.

In 1994, there was no Steam Workshop. No developer console. No GameFAQs with cheat codes. If you wanted god-mode soldiers and unlimited cash, you had to figure it out yourself.

So I opened a hex editor and started guessing.

I used XVI32 and EDX. I don’t even remember where I got them. this was Windows 3.1 era, and getting copies of software tools was hard. No easy downloads, no software repositories. Maybe a BBS. Maybe a magazine cover disk. Maybe copied from someone at school. You just scrounged for tools wherever you could find them.

These weren’t game-specific tools. they were generic hex editors, programmer utilities for inspecting and modifying any binary file. I didn’t know what I was doing. I was looking for values that might correspond to cash or soldier stats. I’d change something, boot the game, see if it worked. Most of the time it didn’t. Sometimes the game crashed. Sometimes it corrupted the save entirely.

But sometimes it worked.

That’s how I learned hex editing. Not through tutorials. Not through computer science classes. Through wanting infinite money in a video game. I didn’t have the language for it at the time. At 14, it was hacking. By my 20s, it felt like engineering. Only much later did I realize what I’d actually been doing had a name: reverse engineering.

What I Actually Did (And What Broke)

I started by editing the game files directly. Soldier stats, cash reserves, resource stockpiles. You’d open the binary in a hex editor, find values that looked promising, change them, and see what happened.

But here’s what I learned: the soldier values weren’t written the way you saw them on screen.

If a soldier had a firing accuracy of 63, you couldn’t just search for “63” in the hex editor. You had to convert it to hexadecimal first: 63 decimal = 3F hex.

I had a calculator beside me and a chart I’d written for conversions. Every single stat required this translation. Which I copied from my Dad’s thick BASIC Handbook, the brown one. I also had the UNIX System V Bible.

Decimal: 63
Hexadecimal: 3F

Once I figured that out, I discovered something useful: in X-COM, soldier stats were stored in blocks. Find one stat, and you’d find the whole group right next to it. The order was consistent:

  • Time Units
  • Stamina
  • Health
  • Bravery
  • Reactions
  • Firing Accuracy
  • Throwing Accuracy
  • Strength

To make it quick and less error-prone, I’d take the first three values (TU, Stamina, HP), convert them to hex to confirm I’d found the right soldier’s data block, then edit all 8 values to 255 (FF in hex). Easy.

The funniest thing? Back then, most programs maxed out at 255. It wasn’t arbitrary. it was the limit of an 8-bit unsigned integer. FF was the ceiling. Everything topped out there.

That same era also had the millennium bug. Y2K. where everyone discovered most software wouldn’t go past the year 1999 and would revert to 0000. Different problem, same root cause: programmers making assumptions about limits that seemed safe at the time.

One wrong edit and you’d corrupt your game.

That’s when I figured out editing savegames was much easier. Any mistake? Just load an earlier save or start a new game. The risk-reward calculation shifted completely.

With game file editing, you moved cautiously. You documented offsets. You made backups. You treated it like archaeology.

With savegame editing, you could experiment freely. Trial and error became practical. You went from archaeology to laboratory science.

What I Could Edit (And What I Couldn’t)

The game was surprisingly accommodating. I could boost soldier stats. accuracy, strength, reactions. I could inflate cash, stockpile equipment. My soldiers looked unstoppable on paper.

But they still died.

Time Units are your soldier’s movement and actions per turn. how many steps they can take, whether they can shoot after moving, if they can go prone. I couldn’t directly modify them. Time Units were tied to rank and survival. how many missions your soldier had completed, how many times they’d leveled up through experience. You couldn’t just hex-edit someone into a veteran with more actions per turn.

That mattered because the entire point of X-COM was leveling up your squad. Building veterans who could move farther, shoot more, survive longer. Rookies were disposable. Veterans were your investment. Hex editing couldn’t shortcut that progression.

Bravery was even worse. It was fixed at generation, and I couldn’t find where it lived in the save file. Worse, bravery degraded during missions. when your soldier was the last one standing, when they were wounded but still fighting, the longer the battle dragged on. If bravery hit zero, your Time Units disappeared entirely. Your soldier panicked, couldn’t move, couldn’t shoot. That panic could cascade through your squad and kill everyone.

Government Funding remained completely untouchable. Even with cheated soldiers and unlimited gear, the funding system still dictated pace. Nations still withdrew support. The strategic layer still mattered.

So even my modified “super soldiers” weren’t god-mode. They had better aim and hit harder, but they still panicked under pressure. When panic hit, they lost all their Time Units. couldn’t move, couldn’t act. They still died.

Here’s the thing: I started hex editing to break the game. But what I actually learned was how the game worked. Which stats were cosmetic and which were structural. Which systems carried the weight. What the designers considered non-negotiable.

The game’s difficulty didn’t come from stat scarcity. It came from systems you couldn’t cheat past. action economy (Time Units), morale mechanics (bravery degradation), geopolitical collapse (funding).

I wanted to cheat. I accidentally learned system design.

Hex Editors Were Programming Tools, Not Cheat Tools

Here’s what people forget: back then, hex editors weren’t “cheat programs.” They were programming and inspection tools, because everything you touched was compiled.

A hex editor was a universal lens into how software actually worked:

  • Binary → how the machine stores data
  • Octal → legacy UNIX and permission systems
  • Hexadecimal → human-readable machine state
  • Decimal → human logic

When you edited a value in hex, you weren’t “breaking rules.” You were interacting at the level the CPU understood.

That’s programming.

I was 12 years old. I didn’t know any of this. I had to study octal and hexadecimal just to make sense of what I was looking at. I read math books. Not because I wanted to learn computer science. Because I wanted to cheat at a video game and couldn’t understand the hex editor without it.

That’s how learning used to happen by accident.

From Hex Editors to Cheat Engine: What Changed

As games evolved:

  • Binaries grew larger
  • Engines became layered
  • Data got abstracted behind APIs
  • File formats became proprietary and encrypted

Hex editing stopped being practical. not because players lost interest, but because games stopped exposing their internals.

At the same time, developers realized players wanted to understand systems. So they provided a new interface.

What Cheat Engine Actually Is

Cheat Engine isn’t a hex editor replacement. It’s a runtime introspection tool.

Where hex editing worked on files (statically, before execution, blind), Cheat Engine works on live memory (running processes, changing values in real-time).

Instead of asking “which byte controls this?”, you ask “what value changes when this happens?”

That’s a fundamental shift. You’re no longer editing a file. You’re interrogating a system while it’s alive.

Hex editing taught you: structure, permanence, constraints
Cheat Engine teaches you: flow, state, causality

And honestly? For what I was trying to do back then. just cheat. trainers and Cheat Engine are vastly better. They can modify Time Units on the fly. They can adjust bravery in real-time. They can give you the god-mode I couldn’t achieve with a hex editor.

But there’s a trade-off. With Cheat Engine and trainers, systems are observable but often intentionally obfuscated and frequently protected. You’re allowed to tweak, but you learn less about how the machine actually works. The barrier to entry is lower. The accidental education is shallower.

Why This Mattered (And Why It’s Gone)

X-COM didn’t just feel like a good game. It felt like a real system. one that operated by consistent internal rules you could prove through inspection.

Hex editing wasn’t about cheating. It was how players learned that:

  • Morale had thresholds
  • Reaction fire had math
  • Accuracy wasn’t faked
  • The game wasn’t rigged. just harsh

That discovery reinforced the setting. The world wasn’t unfair. It was indifferent.

Modern games:

  • Expose knobs
  • Explain outcomes
  • Narrate intent
  • Provide curated modding interfaces

Which makes them easier to customize and harder to investigate.

You’re allowed to tune parameters, but you’re discouraged from understanding the whole.

What We Lost

This isn’t nostalgia for difficulty. It’s recognition that a certain kind of computing literacy used to emerge accidentally from wanting to cheat at video games.

You learned:

  • File structures
  • Data types
  • Memory addressing
  • How compilation worked
  • The difference between static data and runtime state

Not because you wanted to be a programmer. Because you wanted infinite cash and god-mode soldiers.

That pathway is mostly gone now. Not because games got worse, but because software architecture changed. Systems became more complex, more layered, more abstracted. And frankly, because cheating got easier. trainers, console commands, built-in difficulty sliders.

You can still learn these things, but games don’t teach them by accident anymore. You don’t need to understand file structures to get infinite resources. You just press tilde and type a command.

The Takeaway

I wanted to cheat at X-COM. What I got was an education in how software worked. and why the game was actually hard.

The game’s setting felt real because it operated on consistent internal rules. Hex editing. even with selfish motives. forced you to discover those rules. You learned what was editable (stats, resources) and what wasn’t (time units, bravery, funding). What was cosmetic (soldier strength) and what was structural (morale mechanics, mission time pressure).

My cheated soldiers still died. Not because their stats were bad, but because the systems that actually mattered. panic, time units draining under stress, geopolitical collapse. couldn’t be edited away.

That’s design integrity, revealed through breaking and entering.

And that’s why, even decades later, people still boot up the original. Not just for nostalgia. For the feeling of operating inside a system that doesn’t coddle you. one that punishes you through mechanics you can’t negotiate with, even if you’re trying to break it.

Some links in this post point to books or tools I actually used. If you end up buying through them, HobbyEngineered earns a small cut. It doesn’t change the price, and the links aren’t here unless they belong here.

Fund another hobby or help me keep the lights on if you’d rather skip affiliates.
Jaren Cudilla – Chaos Engineer
Jaren Cudilla / Chaos Engineer
Learned systems the dumb way first: open the file, change the byte, reboot, and deal with whatever breaks. Still prefers hobbies that punish guessing and reward understanding.

Runs HobbyEngineered, where games and gear get judged by constraints, feedback loops, and what refuses to be “fixed” with shortcuts.
Also writes about QA systems at QA Journey and cuts through AI hype at Engineered AI.
Same mindset. Different sandbox.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top