"Every gamer is already an object-oriented thinker. They just don't know the name for what they're doing."
What Happens When You See a New Enemy
You're exploring a swamp. A creature lunges at you. You've never seen it before.
But you don't panic. In the first half-second, your brain does this:
- "Bipedal, humanoid shape — probably melee, watch for swings"
- "It's in a swamp — could have poison, movement might be different"
- "Glowing patches on its skin — status effect, definitely poison or rot"
- "Slower than the open-field version I fought earlier — swamp is reducing its speed too"
You didn't read a bestiary. You didn't look up a wiki. You inherited from every similar enemy you've fought before, noted the polymorphism (swamp variant, poison trait), and encapsulated whatever you don't know yet ("I'll figure out its attack pattern by dodging the first few swings").
That's OO. You've been doing it every time you pick up a controller. You just never had a name for it.
The Mob Hierarchy
Every game with enemies has an inheritance tree. Most players feel it instinctively. Let's make it visible.
The Base Class: Ground Mob
The most basic enemy in any game. Walks on land. Has HP. Has one or two attacks. Dies when HP reaches zero. This is the ancestor of almost everything you'll fight.
Properties inherited by default: HP pool, Movement speed, Basic attack(s), Aggro range, Drop table (loot).
Variants: Override One Thing at a Time
| Variant | What's overridden | What's inherited as-is |
|---|---|---|
| Flying variant | Movement (airborne), attack pattern (dive/swoop) | HP, aggro range, drop table |
| Aquatic variant | Movement (swimming), terrain rules | Base attack, HP, drops |
| Armored variant | Defense (damage reduction), movement (slower) | Attack pattern, aggro range |
| Poison variant | Attack (adds DoT status effect) | Movement, HP, aggro |
| Swamp variant | Movement (slowed), possibly adds poison | Base shape, attack, HP |
Notice the pattern: each variant overrides one or two things and inherits everything else from the parent. That's why you can read a new enemy in half a second — 80% is inherited from something you've already fought.
The Boss: Multiple Inheritance + Overriding
A level boss isn't just "a stronger mob." It multiply inherits from several branches and overrides key behaviors.
A typical boss might inherit from the ground mob tree (basic shape, movement logic), from the armored tree (damage reduction, stagger resistance), from the magic tree (ranged attacks, area denial), plus its own overrides (unique phase transitions, special mechanics, arena interactions).
That's multiple inheritance. And the boss's unique mechanics — the things you've never seen before — are the polymorphism that makes this boss different from every other boss, even though 60-70% of its behavior was inherited from classes you already know.
The Weapon System
Weapons are the clearest polymorphism demo in gaming.
The Interface: attack()
Every weapon has an attack() method. Press the button, something happens. Same input, different output.
| Weapon class | attack() implementation | Speed | Damage type |
|---|---|---|---|
| Dagger | Quick thrust, short range | Fast | Pierce |
| Longsword | Horizontal slash, medium range | Medium | Slash |
| Greatsword | Slow overhead slam, wide arc | Slow | Strike + stagger |
| Spear | Forward thrust, long range | Medium | Pierce + reach |
| Staff | Projectile spell, ranged | Varies | Magic |
| Fist | Rapid combo, very short range | Very fast | Strike |
One button. Six completely different behaviors. That's polymorphism. The interface is identical (press R1), but the implementation depends on which class is equipped.
The Map: Environment as Inherited Modifier
Maps aren't just backdrops. They're classes too.
| Environment | What's overridden from Open Field |
|---|---|
| Forest | Visibility reduced, vertical cover added |
| Swamp | Movement speed reduced, possible poison zones |
| Poison swamp | Swamp + constant DoT to player. Double override. |
| Volcanic | Floor damage zones, heat shimmer (visibility), fire-resistant enemies |
| Scarlet Rot zone | Swamp + poison + fear + lore horror. Multiple inheritance from swamp, poison, and a unique rot mechanic that doesn't exist anywhere else |
Scarlet Rot (Elden Ring's Caelid) is a masterclass in multiple inheritance. It takes swamp's movement penalty, poison's status buildup, its own unique rot mechanic (faster, harder to cure), environmental storytelling (everything is visually decayed), and enemy variants that are specifically rot-adapted — and produces something that feels completely different from a regular poison swamp, even though it inherited 60% of its mechanics from one. The 40% override is so aggressive that it transforms the experience. That's polymorphism powerful enough to disguise its own inheritance.
The Build: Your Character as Multiple Inheritance
When you build a character, you're doing multiple inheritance.
Paladin build: Inherits from Warrior (melee combat, heavy armor, HP pool) + Faith caster (healing, buffs, holy damage) + Tank (shield mechanics, aggro management).
Spellblade build: Inherits from Swordsman (melee moveset) + Mage (spell scaling, mana pool). Overrides weapon damage to scale with Intelligence instead of Strength.
Glass Cannon: Inherits from Mage (spell power, range). Overrides defense to near-zero (encapsulates durability entirely). Maximizes a single axis: damage output.
Every build is a composition of inherited traits from multiple parent classes, with selective overrides to create something that fits your playstyle. You've been doing multiple inheritance every time you allocate stat points.
Malenia: When 知彼 Fails
This is Dad's story. And it's the most important lesson in this track.
Dad entered Malenia's boss fight at level 120+. Overleveled. Good build. Spirit summon ready. By every normal metric, this should have been manageable.
His mental model (parent class):
"She's a hard boss. But with enough level, stats, and a spirit summon, I can tank through her damage and out-DPS her. That's how boss fights work."
That model — "tough boss, but fundamentally the same combat economy" — had worked for every other boss in the game. It was a parent class with a 100% success rate.
What Malenia actually is:
Malenia has lifesteal. When she hits you, she heals. Not a little. A lot.
This isn't "a stronger boss." This is a boss that overrides the fundamental combat economy. In every other fight, trading hits is viable — you take damage, the boss takes damage, net HP goes down. With Malenia, trading hits can result in net zero or even net negative for you. You get weaker. She gets stronger. The longer the fight goes, the harder it gets.
The parent class was wrong.
Dad's preparation was perfect for the class he thought he was fighting. High HP, strong weapon, spirit summon to share aggro. But all of that is designed for a "normal hard boss" — a class that Malenia isn't in.
Malenia is a singleton that overrides the combat economy itself. She requires a completely different approach: don't get hit is more important than "do enough damage." Aggression is punished, not rewarded. The spirit summon, which normally helps by splitting the boss's attention, actually feeds her HP by giving her something to hit freely.
知己 was fine — Dad knew his own build, his stats, his capabilities. 知彼 failed — he read the wrong parent class. And no amount of 知己 compensates for wrong 知彼.
Tool Unlock
| Tool | What you just saw |
|---|---|
| Inheritance hierarchy | Base mob → flying/aquatic/poison variants. Each overrides 1-2 things. |
| Polymorphism | Same attack() button, six different weapon behaviors |
| Multiple inheritance | Character builds = composing traits from multiple parent classes |
| Overriding | Scarlet Rot = swamp + poison + unique rot, aggressively overridden |
| Singleton | Legendary unique weapons, Malenia — objects that break normal classification |
| Encapsulation | Damage formulas are private — you play without knowing the math |
| Parent class trap | Malenia punishes the player who reads the wrong class (preview of Track 9) |
Mold Hunt
Game designers didn't invent these patterns. They discovered them — because OO is the most natural way to build a world with consistent rules and infinite variety. The inheritance tree isn't a coding convenience. It's how worlds are structured, virtual or otherwise.
And you, the player, navigated these trees instinctively. Every time you saw a new enemy and thought "that looks like the swamp version of the thing I fought in the forest" — you were tracing inheritance. Every time you tried a new weapon class and immediately understood the tradeoff between speed and damage — you were reading polymorphism. Every time you built a character by mixing and matching stat allocations — you were doing multiple inheritance.
You've been an object-oriented thinker for as long as you've been a gamer. The mold was always there. Now you can see it.
Pippa's Confession
Quest Prompt — Talk With Your AI
Pick your favorite game. Then try this:
"In [your game], take one enemy type and trace its inheritance tree. Start from the most basic version you encountered, then show me every variant — what did each one inherit from the base, and what did it override? Don't use programming terms unless I bring them up first. Just describe the family tree of this enemy."
Then try weapons:
"Now pick two weapons from completely different classes in [your game]. They both have an attack function — pressing the same button. Show me how the same input produces completely different behavior, and what tradeoffs come with each implementation."
If your AI starts with "In object-oriented programming, inheritance means..." — stop it. Redirect:
"I'm not asking about programming. I'm asking about how this game world is structured. Trace the family tree. Show me what's inherited and what's new. Talk about the game, not about code."
You'll be surprised how much OO your AI can see in games when you force it out of the programming box. And you'll realize you've been seeing it too — you just didn't have the words. Now you do.