Monsters

Aug 14, 2019

I was fascinated by Amit's Monsters experiment and asked for an explanation on the simulation. This is his response:

From: Amit Patel
Date: July 2011
Subject: monsters.swf - what's going on here?

Ah! Yes, that's another experiment I did. One of the things I don't like in Realm is that there's no structure in the monster distribution. There are 25,000 monsters and they just wander around. As I explored the map I wanted to find lots of elves in one area, lots of ents in another area, etc.

This experiment simulates a structured society, in which there are many "tribes" that contain several types of monsters. Having complex logic in 25,000 monsters was too expensive, and players probably wouldn't be able to understand what's going on. I wanted to instead divide those monsters into tribes so that they could have very simple frequent logic at the monster level, but complex infrequent logic at the tribe level. Players could then track the tribe movements without having to know exactly what's going with the individual monsters.

On the left are the positions of the monsters. Each color is a tribe. In each tribe, there's a leader (large yellow square), some henchmen that surround the leader (large colored square), minions (small colored square), and pets of minions (small colored square). The leaders try to stay protected; the minions are happy to scout around farther from the center. The tribes interact weakly — they usually but not always stay away from each other. The tribe structure is static. Unlike Realm, where killing all cubes (for example) means cubes go extinct, I wanted cubes to come back and repopulate the tribe structure. As much as I like the idea of a monster species going extinct, I think it's the wrong thing for a long-lived MMO.

The hope was that there'd be some structure in what you saw as you walked around, but it'd have lots of variety and unpredictability as you walked around. If you saw a minion, you knew there was a tribe nearby. You'd have to scout around and figure out where the henchmen were, take them out, and then go after the boss. You couldn't say that a certain spot always had the boss; you had to discover it each time.

On the right side is the monster density. The green areas have lots of monsters and the red areas have only a few. There are some busy areas with lots of monsters and some quiet areas where you can rest. No one spot remains busy or quiet all the time. The right side is calculated as a summary of the left side. (If it runs long enough you'll see that there's a bias towards moving west and north. That's a bug: there's a loop looking at each of the four directions, but the loop always looks west before east and north before south. To fix this I need to randomize the order in which directions are considered.)

It's hard to know how well this would work in an actual game without trying it. :)

Rob and Alex agreed that having 25,000 monsters doing their own thing wasn't as interesting as they had hoped, but didn't find this particular experiment compelling enough to rewrite all their monster code (they have so many other higher priority things to work on). The game has evolved to be much less about exploration and much more a “teleport somewhere random and fight,” so this experiment didn't really fit what they wanted. They did later add some structure to the monsters, so you can find groups of elves or orcs wandering around. They also added “quest” monsters. Instead of scouting around and trying to find the boss on your own, there's a big arrow that tells you where to go. So I'd like to think this experiment had some influence on the game.

If I write a game that can use this, I'll definitely try it out. I think it's potentially interesting and needs more exploration.