|
|
UO’s resource system, part 2June 4th, 2006 |
Last time I wrote about the basic structure of how the resource data worked in the original design for Ultima Online. Now I’ll talk a bit more about applications of that data.
The UO world was a tile-based environment broken up into “chunks” that were 8×8 tiles. The map was static data — there was no way to modify it, and it was built by assembling the tiles, which were fairly small, one at a time in a worldbuilding editor. We had an assortment of tools to ease this process, that allowed us to “paint” grass or trees or even outline buildings quickly and easily, roofs included. We ended up writing an assortment of additional tools in the game’s scripting language as well, to speed up the process.
Static items had some big advantages — they did not need to be streamed down because they were replicated on the client, and they didn’t incur significant server-side storage. However, since the world was static, that meant that each tile and each tree was merely a lookup into an art table. They couldn’t have properties, including any resource data, and they couldn’t run scripts. This meant that we had gone to all that effort to make trees be made out of wood, but then the trees we built the world with couldn’t store that fact.
The solution the programmers came up with was “chunk eggs.” Basically an invisible dynamic object sat in each chunk. When the world came up, this egg analyzed the static art that resided in that chunk, and set itself to produce the resources that this art would have produced were it made of “real” objects and not just set dressing. If there were nothing but grass tiles there, then the chunk egg produced grass to the tune of 64 grass tiles’ worth. If there were trees, then it also produced wood, and so on.
We used this to make every bit of exposed rock in the world produce ORE, which was the first step in refining metal in the crafting system, and to make every bit of water produce WATER, and so on.
The downside to this, of course, was that there weren’t actually five trees in a chunk — there was one invisible one. Trying to harvest wood from any of the trees actually harvested it from the chunk egg. This was why you could harvest a lot of wood from one tree, and find that you had exhausted all the adjacent ones. This later led to “8×8 macroing” and various other clever adaptations to the environment.
Dynamic objects didn’t have all these troubles, and in fact, there were parts of the world which were dynamic objects. Fruit trees, for example, were “real,” and were hand-placed trees with scripts on them. As I recall, this script was bugged pretty much my entire tenure at Origin, and for years after, which is bad because I wrote it. It simply checked when the tree was clicked on; if the tree had sufficient FRUIT resource on it, it would create a fruit of the appropriate type for what tree it was, and move the resources off the tree and onto the new fruit. Thus you could harvest apples from the apple trees in Lord British’s garden. The FRUIT resource on the tree had a regrowth rate, so you could pick all the apples from it, but eventually they would grow back.
This sort of process, of moving resources from one thing to another, is the core strength of the resource system. You could look at an object and treat it abstractly. Not too long after, a very similar system was used in Thief, permitting water arrows or buckets of water or indeed anything that had the WATER property to douse fires.
This sort of thing would have permitted many cool effects that we refrained from putting in. For example, a fireball could easily have caught every wooden or cloth possession on fire. A rust monster could have destroyed all of your metal objects with every hit.
Some of the examples of moving resources from thing to thing were truly nuts. The craziest script was perhaps the “bladed” script. This was attached to everything with a sharp edge on it: axes, knives, swords, whatever. If it was used on wood, it would chop wood away. If it was used on cloth, it would cut it up into strips and then bandages. If it was used on a carcass, you would dress the carcass and get fur and meat. Cut up the meat further and you could get filets.
The most extravagant use of this was when Dan Rubenfield extended the bladed script to work on cutting up corpses into a rather disturbing array of bits, including allowing the harvesting of skulls. This ended up being removed when the game launched in Europe, but not before some of the battle-hardened playerkillers had engaged in cannibalism (MEAT was MEAT after all) and the collecting of their victims’ ears.
I already described the basics of how this system interacted with AI. It began at the first first level, with spawning. UO’s spawning system originally worked based on there being a surplus of resources in the world. If there was a lot of GRASS laying about, then it would select from the list of templates that ate GRASS. If there was then an abundance of MEAT, it would spawn MEAT-eaters. In other words, it worked by the scientifically discredited mechanism of abiogenesis, or “spontaneous generation,” as opposed to being defined by static spawn locations.
To help shape the world, invisible boxes were drawn on it that could each have their own list of what sort of things spawned in it. The list of GRASS-eaters in the jungle could therefore be different from the list of GRASS-eaters in a pine forest. Alas, there was no concept of temperature, humidity, or other such natural variables in the original system, or else climate alone could well have taken care of this.
This “spawn region” system eventually took over all the spawning in the game, ignoring the resource system altogether for reasons I will talk about later. Spawn regions have an advantage of their predecessor system of spawn points, of course, because they can span larger areas and make spawning a little less predictable — yet can be made as small as is neede for replicating the purpose of a spawn point.
Originally, the new objects (for things like resources, wheat and other crops, and the like, were also spawned this way) were actually withdrawn from a “resource bank.” This meant that when the bank was overdrawn of MEAT, nothing that used MEAT could spawn until some of the MEAT in the world was destroyed and therefore returned to the bank. This “closed economy” was famously written about by Zach Simpson, where he rightfully identified it as a core problem with UO’s economic system. In retrospect, should more have kept spawning, it would not have mattered, because the resultant plants and animals would have starved to death without sufficient food anyway.
The famous dragon example that got so much press when UO was in development went something like this:
Nearly everything in the world, from grass to goblins, has a purpose, and not just as cannon fodder either. The “virtual ecology,” as Starr Long, the game’s associate producer calls it, affects nearly every aspect of the game world, from the very small to the very large. If the rabbit population suddenly drops (because some gung-ho adventurer was trying out his new mace) then wolves may have to find different food sources - say, deer. When the deer population drops as a result, the local dragon, unable to find the food he’s accustomed to, may head into a local village and attack. Since all of this happens automatically, it generates numerous adventure possibilities.
Rabbits were GRASS eaters. They spawned, thereby bringing a small amount of MEAT into the world. They ate grass, and meanwhile, also resulted in spawning wolves, which are there to eat their MEAT.
However, players are also after the rabbits, so the wolves end up hungry. Some would die off. But all animals in the original UO design levelled up just like players; a wolf who had been in a lot of scrapes could get tougher. (This led to some truly amusing early alpha experiences whereby players who let bunnies escape would effectively train up Pythonesque killer rabbits; I watched these lay waste to entire packs of wolves — and newbies! — who mistook them for easy prey.)
Normally, a single wolf would not attack a deer, because the deer was too big a hunk of meat for its “bite.” However, put more wolves together and they summed together their “bite,” making them willing to attack fairly large things. So if players harvested the bunnies, the wolves were going to move on to attacking other, larger bits of meat. Players included.
Originally, there was no concept of “aggro” in the game. Hunger or greed was the only reason why creatures attacked. This was overruled by some of the other folks on the team, who felt that from a game experience point of view, certain creatures should always be dangerous.
Should the wolves clear out the deer, then whatever ate the deer would then need to find other prey as well. “Bite size” imposed a lower threshold on what something would go after as well. A dragon, with a large stomach size, eating MEAT in big gulps, would not be willing to hunt down rabbits. But it might well find a human a tasty snack if it came across one.
Dragons would not normally be right next to player cities, of course. But if the deer that normally existed in between the players and the dragon’s lair were gone, the dragon’s search radius away from its home might well carry it to the village…
Most of this is actually fairly straightforward, in terms of AI implementation. The basic AI behavior of a creature was
- If I’m hungry, search for items that produce stuff on my FOOD list, and attack or eat them. Wander as far as needed to accomplish this.
- If I am not hungry, then start looking for a home base. If I already have one, then go there. If I get hungry while doing this, go back to hunting for food.
- If I am sheltered and not hungry, then look around for stuff that I just like. If I can pick it up, bring it to my shelter. If not, just hang around there — until I get hungry.
At one point, we had effects like beggars who had desires for GOLD, and thus followed rich players in the street. We had bears who would hang out in their cave, but would wander over to hang around near beehives. All that stuff worked. The problem was that the constant radial searches were incredibly expensive, and so was all the pathfinding.
One of the first things to go was the search frequency. Next, the step was taken to put every creature to “sleep” when players were not nearby. This change alone really ruins the large-scale ecological applications completely. On top of that, the issues with spawning “overdrawing” the bank were not foreseen; in practice, it wasn’t MEAT that resulted in creatures not spawning. It was all the FUR and whatnot that ended up hoarded by players that prevented the deer and rabbits from returning.
The last big element, however, was that there were a fair amount of team members who saw the whole system as a boondoggle, and not worth pursuing. Alas, one of them also ended up in charge of implementing it in beta. By beta time, systems that used to work in alpha no longer did.
This meant that we never got to the second stage of implementation on it, which would have been hooking it into quests. But I will talk about that next time.

You can follow any responses to this entry through the RSS 2.0 feed. Responses are currently closed, but you can trackback from your own site.
























[...] Dynamic objects didnt have all these troubles, and in fact, there were parts of the world which were dynamic objects. Fruit trees, for example, were real, and were hand-placed trees with scripts on them. As I recall, this script was bugged pretty much my entire tenure at Origin, and for years after, which is bad because I wrote it. It simply checked when the tree was clicked on; if the tree had sufficient FRUIT resource on it, it would create a fruit of the appropriate type for what tree it was, and move the resources off the tree and onto the new fruit. Thus you could harvest apples from the apple trees in Lord Britishs garden. The FRUIT resource on the tree had a regrowth rate, so you could pick all the apples from it, but eventually they would grow back. This sort of process, of moving resources from one thing to another, is the core strength of the resource system. You could look at an object and treat it abstractly. Not too long after, a very similar system was used in Thief, permitting water arrows or buckets of water or indeed anything that had the WATER property to douse fires. This sort of thing would have permitted many cool effects that we refrained from putting in. For example, a fireball could easily have caught every wooden or cloth possession on fire. A rust monster could have destroyed all of your metal objects with every hit. Some of the examples of moving resources from thing to thing were truly nuts. The craziest script was perhaps the bladed script. This was attached to everything with a sharp edge on it: axes, knives, swords, whatever. If it was used on wood, it would chop wood away. If it was used on cloth, it would cut it up into strips and then bandages. If it was used on a carcass, you would dress the carcass and get fur and meat. Cut up the meat further and you could get filets. The most extravagant use of this was when Dan Rubenfield extended the bladed script to work on cutting up corpses into a rather disturbing array of bits, including allowing the harvesting of skulls. This ended up being removed when the game launched in Europe, but not before some of the battle-hardened playerkillers had engaged in cannibalism (MEAT was MEAT after all) and the collecting of their victims ears. Link: UOUltima Online von Electronic Arts.s resource system, part 2 150)?150:this.scrollHeight)”> __________________ The tools suck! — Raph Koster [...]
thing then became the world itself. Raph Koster has recently begun a series of blog posts about some of the orginal design concepts behind the design of UOâs virtual world. In part one, he talks about the original ideas for the resource system. Inpart two, he describes the actual application of the resource system and some of what went wrong with it. Both posts are great reads if you are even slightly curious about game design. My gears are certainly cranking after reading them and I
[...] Raph Koster has a series of articles on aspects of the AI that was intended (but not fully realized) for Ultima Online (my first graphical MMO and a game for which I still have fond memories). [...]
[...] Raph Koster weighs in with a fascinating discussion of what went into UO’s gloriously failed ecology design. (Part 1, Part 2, Part 3 to come). [...]
[...] http://www.raphkoster.com/2006/06/04/uos-resource-system-part-2/Last time I wrote about the basic structure of how the resource data worked in the original design for Ultima Online. Now I’ll talk a bit more about applications of that data. A world with properties [...]
[...] Virtual ecology I could write about virtual ecology, but I think Raph Koster is much better at explaining it. I usually don’t agree with him but this is the first time he shows something I actually like. The following shows how UO was originally designed (it was never fully implemented). It would be nice to see this implemented in WAR or other games. I am not sure why games almost always use the old aggro system, spawn system, etc. Anyway, just read the following links. http://www.raphkoster.com/2006/06/03…source-system/ http://www.raphkoster.com/2006/06/04…system-part-2/ [...]
[...] Shop « UO’s resource system, part 2 | [...]
Iâve now written two posts that were far lengthier than I anticipated, about the way that UOâs resource system was originally intended to work. The first dealt with underlying data structures, and the second withapplications of those data structures to the actual world. I want to talk a bit about future directions that we didnât get to pursue. Cool ways to use what we already had The mining system in UO was an example of âtransmutationâ in action. We placed ORE in the chunk eggs based on the presence of
that describe the process they used to create the resources system used in Ultima Online. Some interesting stuff in there from a virtual world design standpoint. Here are the three articles: Part One is about the underlying data structures.Part Two is about the application of those data structures to the virtual world. Part Three is about the future directions they didn’t get to pursue with UO, and an ample source of ideas for your own creations.
[...] Just FYI, Raph Koster, author of "A Theory of Fun," just finished blogging a series of articles that describe the process they used to create the resources system used in Ultima Online. Some interesting stuff in there if you’re looking to build a more environment-based RPG (as opposed to scripted, console-style). Here are the three articles: Part One is about the underlying data structures. Part Two is about the application of those data structures to the virtual world. Part Three is about the future directions they didn’t get to pursue with UO, and an ample source of ideas for your own creations. Those articles reminded me of the permeating magic discussion we had a while back, and makes me want to go back and revisit it. Heh._________________Visit the Sacraments web site to play the game and read articles about its development. [...]
[...] rnum=Math.round(Math.random() * 100000); document.write(”); Ultima Online Chatzone MAIN UP REPLY UOâs resource system Zappa 12.195.89.1306/6/2006 12:45:54 PM This explains alot about how things worked in the game that us players were only able to delve into on the bare surface. It is a very nice read on something that few people notice.http://www.raphkoster.com/2006/06/03/uos-resource-system/http://www.raphkoster.com/2006/06/04/uos-resource-system-part-2/http://www.raphkoster.com/2006/06/05/uos-resource-system-part-3/ [...]
I loves me some Raph Koster. He has a discussion of Ultima Onlineâs resource system that spansthree articles, and is completley worth a read. He references the âPlaying to Bake Breadâ article he wrote a while back in the article, and I should point out thatâs well worth a look too. We ended up saying that a given object (which was still
[...] Have you guys seen this? http://www.raphkoster.com/2006/06/03/uo…ce-system/ http://www.raphkoster.com/2006/06/04/uo…em-part-2/ http://www.raphkoster.com/2006/06/05/uo…em-part-3/_________________-Marcaaus http://ctprofiles.net/951789 [...]
post two, post three) about the resource system in Ultima Online, how it was suppose to work, and why it didnât. What is really interesting, at least to me, is how the resource system was suppose to tie very heavily to the behavior of creatures.
More Interesting AI Raph Koster has posted a GOLD MINE of information on the ecological / economic systems of Ultima Online (see part 1,part 2, and part 3), and a discussion on the “dumbing down” of NPCS in MMORPGs. Raph’s comments go on how these sophisticated plans for Ultima Online and Star Wars Galaxies were eventually deep-sixed in favor of maintainability and simplicity (not to mention
[...] selected Teeside as my Uni next year for a computer games programming masters. Today I worked on a C# DirectX Form that’s a basic tile engine. With only a DirectX enabled form (clearing a panel to apackaged bundle of analogies. Pick up? (Y/N) target=”_top”>Furl | Newsgator | Rojo | MyYahoo # posted by Dan @ 12:06 PM Comments: Post a Comment Links to this post: Seelinks to this post posted by @ if (typeof BL_addOnLoadEvent == ‘function’) { BL_addOnLoadEvent(function() { BL_writeBacklinks(); }); } [...]
part 2, part 3). I recommend these articles not only for the obvious reasons of examining what was attempted before and why it failed, but because these links will be of particular interest to anyone who has taken the time to read my thesis and found the
[...] The ORIGINAL UO This is a series of articles written by one of the original designers of Ultima Online, Raph Koster. He used to work at Sony Interactive or whoever produced Star Wars Galaxies, which was supposedly UO’s successor. I never played it, I don’t know. These articles describe the way the world of Brittannia was supposed to have worked. They’re a little geeky, and you need to understand at least a little bit about how computers work and games are programmed to really wrap your head around how amazing this idea was. It never made it to UO’s release because of technical difficulties (slow computers back in 1997). However, I think it’s worth a read, and might be worth some consideration the next time the team goes to revamp monster spawns or wants to add quests or anything like that. The article is broken up into 3 parts, and they don’t link to each other, so I’ll link them seperately here. UO’s Resource System: Part 1 UO’s Resource System: Part 2 UO’s Resource System: Part 3 [...]
Original post:UOâs resource system, part 2 by at Google Blog Search: water
[...] Hurray! I would love to see some naval combat! The Duchy needs a coast guard
I like the formation ideas although in combat, it would be quite a sight to see. The Borrowers used to just hide a group and send in a quick theif to start some trouble then run away with an angry mob chasing him right into the ambush. This worked very well when UO introduced the houses (before they complicated them). Although it may not seem like a very honorable form of combat it is very effective >.< People loose their heads when they think they’ve got some easy bait http://www.raphkoster.com/2006/06/04…system-part-2/ "An example that comes to mind is the Trinsic Borrowers and their army of slimes that crashed the shard and forced an update that made slimes no longer divide." I miss the good old days… [...]
[...] Ultima Online’s Resource System II [...]
[...] The core of what Kristen and I had talked about on that road trip was putting abstracted properties onto objects. Rather than building a recipe out of the item ID numbers for every object that worldbuilders had made that was raw wood, we would instead track that the object was made of wood. And then the crafting code could just query, is this wood? and if so, do things with it. … We ended up saying that a given object (which was still defined in a template) could have as part of it, a set of resources. A resource was just a label nothing more and nothing less. (Much later, in SWG, that team would introduce the concept of resources with stats, but thats a post for another day.) The server had a list of the resources that existed in the world, and designers could create new ones fairly readily. Resources were things like METAL, WOOD, and CLOTH. But they were also things like MAGIC and PLAYER and other such abstract qualities. UOs resource system, part 2 on Raph Koster Permalink | 1 Comment | Post a Comment Ultima Online Bring a Friend to Britannia Program May 28, 2006 - 11:25 AM Ultima Online Bring a Friend to Britannia Program [...]
[...] was originally planned/attempted in the early UO and the reasons that it didnât work (Part 1, 2, 3).Which is very interesting to me, since I have been reading up what I can. In a strangely [...]
[...] regularly blogs at his website. I don’t care! What about the original resource system? Articles: 1 2 3 There’s also a lot more information on game design to be found on the website and plenty of [...]
was kind enough to repost his UO resource system write-up, long lost (and missed by me as reference material)âof course he did this in June 2006 when I was concerned with things like interviewing for a new job. UOâs Resource System (part 1) UOâs Resource System (part 2) UOâs Resource System (part 3)
[...] of articles by Raph Koster on UO’s (planned and never fully implemented) Resource System: Part 1 Part 2 Part 3 This is pretty much the reason I got into MMOs in the first place - I was thoroughly [...]
[...] to explain when I started this thread. http://www.raphkoster.com/2006/06/03/uos-resource-system/ http://www.raphkoster.com/2006/06/04/uos-resource-system-part-2/ http://www.raphkoster.com/2006/06/05/uos-resource-system-part-3/ Damn, I want an MMO that has [...]
[...] you have no idea what he’s talking about,http://www.raphkoster.com/2006/06/03/uo … ce-system/http://www.raphkoster.com/2006/06/04/uo … em-part-2/http://www.raphkoster.com/2006/06/05/uo … [...]
[...] muss noch darĂŒber nachdenken :-)Bis dahin kann ich das hier empfehlen:UO's ressource systemUO's ressource system 2UO's ressource system 3by Raph CosterUngefĂ€hr so möchten wir es handhaben. Wenn du es [...]
[...] have the environment generate quests as illustrated through this article series by Raph Koster: 1 2 3 4. But with a system like that it would be very complicated to have actual quest lines with good [...]
[...] He wrote some pretty interesting stuff about the UO resource system that can be found Here Part 1 Here Part 2 and Here Part 3. This has been posted before, but most of the people around these days are new so [...]
[...] and getting PK’d all the time as I mined ore (which was always gone due to the now-defunct resource bank system). I took some time off for a few years but eventually found my way back. A lot had changed [...]
[...] Koster wrote an interesting three part post (post one, post two, post three) about the resource system in Ultima Online, how it was suppose to work, and why it [...]
[...] mobs that kill you and use your equipment would be cool though. I once read an article Here. Written by one of the creators of Ultima Online. He described how animals would become stronger the [...]