• Hail Guest!
    We're looking for Community Content Contribuitors to Stratics. If you would like to write articles, fan fiction, do guild or shard event recaps, it's simple. Find out how in this thread: Community Contributions
  • Greetings Guest, Having Login Issues? Check this thread!
  • Hail Guest!,
    Please take a moment to read this post reminding you all of the importance of Account Security.
  • Hail Guest!
    Please read the new announcement concerning the upcoming addition to Stratics. You can find the announcement Here!

When a Tree Falls in the Forest

T

Tazar

Guest
"You must log in to view this page"...

Not a chance! Any tidbits you can copy/paste over for those of us who do not want to register?
 

Maplestone

Crazed Zealot
Stratics Veteran
Stratics Legend
I'm hesitant to copy the whole thing here, but the essay talks about some quirky behavior in a SA dungeon he because of the fact the monster AI/activity turns off when there are no players around (which yes, does sound like it's a followup to that philosophy thread Harlequin - I thought the same thing when I read it).
 

Basara

UO Forum Moderator
Moderator
Professional
Governor
Stratics Veteran
Stratics Legend
Wiki Moderator
UNLEASHED
Campaign Supporter
He's stated already in one of his replies that people can copy stuff like that as much as they want to other places.
 

Storm

UO Forum Moderator
Alumni
Stratics Veteran
Stratics Legend
Awards
1
Falling Trees


If a tree falls in a forest and no one is around to hear it, does it make a sound?

Ultima Online is a big world, containing a myriad of virtual objects of every type and description. Animals, monsters, people, plants, and yes, trees too, all abound over nearly seventy million square meters of territory that exists merely as a figment of data in some server's RAM, dutifully backed up on a daily basis.

If UO is a persistent world, does everything keep going, even when players aren't there?

The short answer is: no, unfortunately not. A somewhat commonly known thing amongst our playerbase, for instance, is that mobiles (any dynamic object that can move: animals, monsters, NPCs) don't move when players aren't nearby. This "sleep" behavior was implemented some time ago in order to combat wasted CPU time that bogged down performance for the rest of the game.

The behavior itself is very simple to understand. Every mobile has its own basic AI loop that executes, sets a short delay, and starts over again. This allows every mobile to evaluate its current situation and respond to it, and then turn control of the CPU back over to the rest of the game.

In fact, these loops are very short, and we call them ticks or heartbeats. Rather than give every single object in the game its own individual share of the CPU, we have a main thread that runs as a loop as well, which gives short amounts of time to each object on an as needed basis.

Now, imagine a normal server, like Atlantic. There are over sixty thousand mobiles up and running, all potentially handling their AI loops at any given time. If every mobile tried to execute all the conditions and possibilities available to it, the game would take a gigantic hit in performance. Even worse, imagine if every mobile wanted to actually move.

And so, instead, if players aren’t within a certain distance, those mobiles just go to sleep, waiting for their time to shine.

This became a problem, though, while we were working on the Stygian Abyss expansion.

We wanted to do something we thought would be relatively simple. One of the newer dungeon levels has a series of tombs, each blocked by a gate, hooked to a lever in another room. When the lever is pulled, it should open the gate, releasing the monsters inside.

Now, normally, that means we just send a message to each monster saying "move down the corridor and get ready to meet the player in the main hallway."

So we pulled all the levers, eager to see the suddenly full hallway, and to our surprise, found the hallway quite empty. At least, for a moment! Suddenly the monsters came streaming from left and right, coming out of the tombs, now that someone was there to see them.

Even though we knew about the "sleep" mode for mobiles, we thought we could override it just by directly sending commands to them. This had worked in many other game systems added for live events, such as Sherry the Mouse, an NPC who had a full daily schedule of running around the castle, eating lunch in the kitchen, popping through mouseholes, and generally being cute.

It turns out, we were wrong! The only reason Sherry worked at all when players weren't around was because she could teleport when her movement checks failed, a failsafe originally designed to deal with griefers trying to trap her in the corner.

Ultimately, our resolution is a simple one: we've designed a flag that allows some mobiles to avoid the sleep system, which will be implemented in the new expansion. From here on out, parts of the world will come to life more than ever before, existing and evolving apart from the comings and goings of the average observer.

And while we may not be able to hear a tree chopped down in the woods, and least we know a horde of undead Gargoyles won't be standing idly by when you raid their tombs!

This was from Draconi's facebook essay
 
O

Old Man of UO

Guest
Hmm.. I wonder how certain spawns like dungeon stealables works then. Interesting article.
 

Storm

UO Forum Moderator
Alumni
Stratics Veteran
Stratics Legend
Awards
1
Hmm.. I wonder how certain spawns like dungeon stealables works then. Interesting article.
Makes me wonder what Draconi is gonna do to us in SA I am sure it wont make it easier to stay alive lol
 

Draconi

Most explosive UO Legend
VIP
Stratics Veteran
Stratics Legend
He's stated already in one of his replies that people can copy stuff like that as much as they want to other places.
Right - anything I put on Facebook can be considered public and approved for distribution.

Anything I say on an internal beta forum, though, is subject to NDA.

Luckily, the whole point of dev accounts for Facebook is for stuff just like this :)
 

Maplestone

Crazed Zealot
Stratics Veteran
Stratics Legend
Right - anything I put on Facebook can be considered public and approved for distribution.
Good to know - I wasn't sure about that approved for (re)distribution part of Facebook :)

I keep wondering about CPU cycles and the amount of time that has passed since UO first went live.

How many times has the underlying hardware changed? Has the coding become significantly more complex or the number of mobiles increased to eat the proceeds of Moore's Law? (or do different subservers have their own threads that can be spaced out across CPUs?)

Do the same presures exist to keep inactive mobs inactive that were there when it was it first implemented. I suppose any time a server is chugging away with nobody to benefit from it must seem like a waste, but I keep thinking back to playing with cellular automata and wishing my gardener could find a nice big open field and set off a massive "game of life" simulation planting seeds :)
 
S

Stratic Fanatic

Guest
Right - anything I put on Facebook can be considered public and approved for distribution.

Anything I say on an internal beta forum, though, is subject to NDA.

Luckily, the whole point of dev accounts for Facebook is for stuff just like this :)
*sigh*
Im not social in RL.....

Could you just email me everything you ever post on any forum/book/twits/twips/tweets or whatever they call it?

:)
 
Top