Instanced Objects

Started by Aaron Goulet, October 27, 2009, 07:28:52 PM


I want to discuss this graph, because, like brytta.leofa, who posted about it in Ask the Staff, I am also curious as to what causes these dips and peaks over the course of the day.

My Theory:
I think that the Object Instances variable in the graph above includes player-worn/player-carried equipment.  In a generic DikuMUD, having more people simultaneously logged in leads to more objects in the object_list, which is essentially a global linked list of all object instances (not prototypes) currently in the game, regardless of their location in the game world (on the ground, in a container, in inventory, worn, etc.).

In English:
More players on means more objects in-game, which means an upward spike during peak playing times.

The Steady Incline:
The steady upward trend is easy enough to explain; crafted goods, skinned corpses, Olgaris's poop script, and even certain purchases from NPC vendors contribute to the steady incline.  Like Xygax had hinted at, however, the memory and CPU footprint of an object is relatively small, since most of the object's data is stored with the prototype rather than the instance; DikuMUD is efficient that way.

Keep in mind that I'm just speculating here.  ArmageddonMUD has evolved greatly in the many years it has been running, and may not even use the same foundations of its original codebase.
Quote from: ZoltanWhen in doubt, play dangerous, awkward or intense situations to the hilt, every time.

The Official GDB Hate Cycle

It looks like about a 4k difference in objects. If you take low number of players to be 5, and high number to be 65 + 10 staff; that's a 70-player/staff difference, which is nearly 60 objects per player/staff character. Do coins count as individual objects? If they do, I can easily see a character getting to that number of objects.
Quote from: Vanth on February 13, 2008, 05:27:50 PM
I'm gonna go all Gimfalisette on you guys and lay down some numbers.

Coins in piles in your pack -do- count as a separate object (one object per pile), but coins in your inventory are actually stored as a part of your player-record, old-school style.  And yes, the "saw-tooth" pattern of this chart is quite clearly the result of player fluctuation.

-- X

October 27, 2009, 08:00:53 PM #3 Last Edit: October 27, 2009, 08:07:13 PM by Aaron Goulet
Quote from: Gimfalisette on October 27, 2009, 07:37:34 PM
It looks like about a 4k difference in objects. If you take low number of players to be 5, and high number to be 65 + 10 staff; that's a 70-player/staff difference, which is nearly 60 objects per player/staff character. Do coins count as individual objects? If they do, I can easily see a character getting to that number of objects.

Individual coins do not codedly count as objects, nor do coins residing directly in a character's inventory, though coins placed in containers or on the ground do count as a single object per pile.  That being said, 60 objects per character isn't as unrealistic as you might think, given the amount of wear locations available, the fact that tattoos and scars are codedly objects (I think), and the amount of crap that people manage to stuff into their bahamet-embroidered backpacks.  Also, consider that there's likely more stuff getting killed and skinned with more players on, contributing to the overall item count.

Not including <primary hand>, <secondary hand>, and <both hands>, there are technically 33 wear locations:

Location    ##
--------------
Head      =  1
Hair      =  1
Ears      =  2
Face      =  1
Neck      =  1
Throat    =  1
Back      =  1
Shoulders =  2
Arms      =  1
Forearms  =  1
Wrists    =  2
Fingers   = 10
Hands     =  1
Waist     =  1
Belt      =  1
on belt   =  2
Legs      =  1
Ankle     =  2
About     =  1
--------------
Total     = 33


Again, factoring tattoos, inventory, and container space, 60 objects isn't altogether unrealistic.


EDIT: Xygax, damn you...  You beat me to the punch!  Thank you for confirming my theory, though!
Quote from: ZoltanWhen in doubt, play dangerous, awkward or intense situations to the hilt, every time.

The Official GDB Hate Cycle

Not to mention the apartment/compound stuff that characters accrue. And tribal tents. And hidey holes.

Quote from: Adiadochokinesis on October 27, 2009, 08:02:37 PM
Not to mention the apartment/compound stuff that characters accrue. And tribal tents. And hidey holes.

Oh yes.  I imagine the steady incline in the graph would be much more noticable too, if it weren't for the recent fixes to apartments and other size-limited rooms.
Quote from: ZoltanWhen in doubt, play dangerous, awkward or intense situations to the hilt, every time.

The Official GDB Hate Cycle

What happens to that graph when the game reboots? Is there a reboot on there?
So if you're tired of the same old story
Oh, turn some pages. - "Roll with the Changes," REO Speedwagon

Quote from: flurry on October 27, 2009, 08:10:06 PM
What happens to that graph when the game reboots? Is there a reboot on there?

I can't answer your first question with absolute certainty, but I imagine there would be a noticeable dip.  As for your second question...

Quote from: Xygax
This is a graph of the number of objects in the game over the last 2-week period.  This is an interesting cycle because the game has been up and stable for a record time-period:  a few hours over 18 days as of a few moments ago, so the graph is not decreased by a reboot.
Quote from: ZoltanWhen in doubt, play dangerous, awkward or intense situations to the hilt, every time.

The Official GDB Hate Cycle

Right now, we dip by about 15k objects during reboots.  The chart shown above this post in this thread does not include a reboot.

-- X

Quote from: Aaron Goulet on October 27, 2009, 07:28:52 PM
...Olgaris's poop script...

Funny you should mention that. If you look at the longer term object instances you'll notice a really big spike when we put in the poop script. This is because I screwed up on the script and nobody caught the fact that each instance of the script was making a dung object every pulse, but it wasn't being put anywhere. It was creating the object, regardless of whether or not the object was placed in game.

It made so many that if you used your fancy immortal commandz to find out where all the poop was you would get your link spammed to the point of getting disconnected from the mud. Almost all the dung was in "unknown."
You give your towering mound of dung to the inordinately young-spirited Shalooonsh.
the inordinately young-spirited Shalooonsh sends:
     "dude, how'd you know I was hungry and horny?"

Quote from: Olgaris on October 28, 2009, 04:48:36 PM
Quote from: Aaron Goulet on October 27, 2009, 07:28:52 PM
...Olgaris's poop script...

Funny you should mention that. If you look at the longer term object instances you'll notice a really big spike when we put in the poop script. This is because I screwed up on the script and nobody caught the fact that each instance of the script was making a dung object every pulse, but it wasn't being put anywhere. It was creating the object, regardless of whether or not the object was placed in game.

It made so many that if you used your fancy immortal commandz to find out where all the poop was you would get your link spammed to the point of getting disconnected from the mud. Almost all the dung was in "unknown."

A secret plane of poop? Almost done with the poop elementalists that go along with it?
Quote from: Gimfalisette
(10:00:49 PM) Gimf: Yes, you sentence? I sentence often.

Ginka spawned a new elemental plane all on her lonesome... how sexy.
Quote from: Twilight on January 22, 2013, 08:17:47 PMGreb - To scavenge, forage, and if Whira is with you, loot the dead.
Grebber - One who grebs.

October 28, 2009, 08:09:40 PM #12 Last Edit: October 28, 2009, 08:11:31 PM by Aaron Goulet
Quote from: jcljules on October 28, 2009, 07:25:51 PM
A secret plane of poop? Almost done with the poop elementalists that go along with it?

I imagine a guild like that should have the same karma requirement as sorcerors and psionicists, for obvious reasons:


> cast 'mon un olgaris divan wril'
A literal shit-storm swirls around you as you draw upon the power of Olgaris.

>
You utter the incantation, 'mon un olgaris divan wril'.
You create an impossibly gigantic mountain of dung.

> think Oh shit.
You think:
    "Oh shit."


Quote from: Olgaris on October 28, 2009, 04:48:36 PM
Funny you should mention that. If you look at the longer term object instances you'll notice a really big spike when we put in the poop script. This is because I screwed up on the script and nobody caught the fact that each instance of the script was making a dung object every pulse, but it wasn't being put anywhere. It was creating the object, regardless of whether or not the object was placed in game.

ROFL, that is hilarious!  The funny thing about most scripting engines is that it is sometimes easier to "break" a MUD with them than by modifying the underlying C code itself.

Quote from: Olgaris on October 28, 2009, 04:48:36 PM
It made so many that if you used your fancy immortal commandz to find out where all the poop was you would get your link spammed to the point of getting disconnected from the mud. Almost all the dung was in "unknown."

The spam and disconnect symptom, happened to me on a former MUD I implemented on whenever I typed 'vnum obj sword' (don't ask me why we had so many freakin' unique swords in the game).  The solution was to page_string() the results.  Drop that in Morgenes's suggestion box, for any future poop-scripts-gone-wild.  ;)

EDIT: From a code perspective, 'unknown' is what the game displays when an object returns NULL for worn_by, carried_by, in_room, and in_obj.  If it isn't in any of those places, then it technically isn't anywhere, as Olgaris pointed out.
Quote from: ZoltanWhen in doubt, play dangerous, awkward or intense situations to the hilt, every time.

The Official GDB Hate Cycle

Quote from: FantasyWriter on October 28, 2009, 08:02:47 PM
Ginka spawned a new elemental plane all on her lonesome... how sexy.

Shouldn't that be an excremental plane?

Quote from: MorgenesYa..what Bushranger said...that's the ticket.

Touche. :D
Quote from: Twilight on January 22, 2013, 08:17:47 PMGreb - To scavenge, forage, and if Whira is with you, loot the dead.
Grebber - One who grebs.

Quote from: Bushranger on October 29, 2009, 07:12:20 AM
Shouldn't that be an excremental plane?

Oh snap!  And a Dogma screenshot, to boot!
Quote from: ZoltanWhen in doubt, play dangerous, awkward or intense situations to the hilt, every time.

The Official GDB Hate Cycle

My thread title was better.
The sword is sharp, the spear is long,
The arrow swift, the Gate is strong.
The heart is bold that looks on gold;
The dwarves no more shall suffer wrong.