Armageddon General Discussion Board

General => Code Discussion => Topic started by: Fredd on January 13, 2011, 03:00:37 AM

Title: If a tree falls in the grey forest...
Post by: Fredd on January 13, 2011, 03:00:37 AM
I always wondered. Do room echoes only happen when populated with PC's?

I'm guessin no, to save on memory, but I scould be wrong!
Title: Re: If a tree falls in the grey forest...
Post by: Medivh on January 13, 2011, 03:22:39 AM
Pretty sure they are on a set timer.
Could be wrong though.
Title: Re: If a tree falls in the grey forest...
Post by: Schrodingers Cat on January 13, 2011, 12:26:51 PM
Neither yes or no.
Title: Re: If a tree falls in the grey forest...
Post by: Cutthroat on January 13, 2011, 12:30:22 PM
Quote from: Schrodingers Cat on January 13, 2011, 12:26:51 PM
Neither yes or no.

I see what you did there.
Title: Re: If a tree falls in the grey forest...
Post by: Schrodingers Cat on January 13, 2011, 12:33:04 PM
Quote from: Cutthroat on January 13, 2011, 12:30:22 PM
Quote from: Schrodingers Cat on January 13, 2011, 12:26:51 PM
Neither yes or no.

I see what you did there.

I thought it was funny.  But seriously, rooms echo if someone is or isn't there to read it.
Title: Re: If a tree falls in the grey forest...
Post by: Reiteration on January 13, 2011, 12:45:10 PM
Depends on how it's programmed, it could very well just grab all the actors in the room, count how many there are and if there are none it'll just return and cancel the echo.
Title: Re: If a tree falls in the grey forest...
Post by: Majikal on January 13, 2011, 12:45:38 PM
Quote from: Schrodingers Cat on January 13, 2011, 12:33:04 PM
Quote from: Cutthroat on January 13, 2011, 12:30:22 PM
Quote from: Schrodingers Cat on January 13, 2011, 12:26:51 PM
Neither yes or no.

I see what you did there.

I thought it was funny.  But seriously, rooms echo if someone is or isn't there to read it.

Have you ever been in a room when you weren't there... to validate this?  :-X
Title: Re: If a tree falls in the grey forest...
Post by: Schrodingers Cat on January 13, 2011, 12:54:50 PM
Quote from: Majikal on January 13, 2011, 12:45:38 PM
Quote from: Schrodingers Cat on January 13, 2011, 12:33:04 PM
Quote from: Cutthroat on January 13, 2011, 12:30:22 PM
Quote from: Schrodingers Cat on January 13, 2011, 12:26:51 PM
Neither yes or no.

I see what you did there.

I thought it was funny.  But seriously, rooms echo if someone is or isn't there to read it.

Have you ever been in a room when you weren't there... to validate this?  :-X

Mu
Title: Re: If a tree falls in the grey forest...
Post by: Anaiah on January 13, 2011, 01:48:48 PM
Rooms echo, even when you're not there. It's timed. And that's a pretty usual way for things with muds to work.
Title: Re: If a tree falls in the grey forest...
Post by: Medivh on January 13, 2011, 10:12:52 PM
Quote from: Medivh on January 13, 2011, 03:22:39 AM
Pretty sure they are on a set timer.
Could be wrong though.

Quote from: Anaiah on January 13, 2011, 01:48:48 PM
Rooms echo, even when you're not there. It's timed. And that's a pretty usual way for things with muds to work.

Go me.
Title: Re: If a tree falls in the grey forest...
Post by: Lizzie on January 14, 2011, 08:13:19 AM
If it's timed, then the timers are all broken. My experience:

I'll be in my clan compound (which does have those emits), solo-rping or sitting semi-idle (I can see the game-screen at the bottom of my monitor when I'm reading the GDB). There'll be nothing going on for around 10, 15 minutes. Then all of a sudden one of the scripted emits will show up, and there'll be like, 4 of them in 3 minutes time. Then nothing again.

Or I'll be sitting at the bar. Nothing will be happening when I get there. I'll sit down, have a drink, try to contact some people, maybe have a Way conversation. Someone -else- will show up, and BOOM - echoes happen.

I've always assumed that the timers are triggered only when someone shows up... OR if there's an IMM watching a PC.
Title: Re: If a tree falls in the grey forest...
Post by: Nyr on January 14, 2011, 08:43:21 AM
It's not timed, it is variable, but it will happen even if no one is there.
Title: Re: If a tree falls in the grey forest...
Post by: Majikal on January 14, 2011, 09:21:05 AM
That's just what Ginka wants you to think.
Title: Re: If a tree falls in the grey forest...
Post by: X-D on January 14, 2011, 12:59:12 PM
Actually, with Diku, if nothing is in the room that makes the room need to "exist" Then it does not "exist". And so, the echo does not happen. But if something is in it to make it exist then it does. If that makes any sense.
Title: Re: If a tree falls in the grey forest...
Post by: Medivh on January 14, 2011, 01:49:42 PM
Not. Go Me.  :-\
Title: Re: If a tree falls in the grey forest...
Post by: brytta.leofa on January 14, 2011, 01:55:53 PM
Does Arm load and run zones even when no PCs are there?  If I were guessing, I'd guess that it does.  Certain objects don't survive reboots; if zones were unloaded, I'd expect those same objects to not survive the last 'nakki logging out for the morning.
Title: Re: If a tree falls in the grey forest...
Post by: Majikal on January 14, 2011, 02:18:20 PM
Quote from: X-D on January 14, 2011, 12:59:12 PM
Actually, with Diku, if nothing is in the room that makes the room need to "exist" Then it does not "exist". And so, the echo does not happen. But if something is in it to make it exist then it does. If that makes any sense.

I seriously read this, then sat in my couch thinking up some weird Mud-theory for 2 or 3 minutes in complete silence. My wife had to snap me out of it. Thanks x-d, you broke my head.
Title: Re: If a tree falls in the grey forest...
Post by: Lizzie on January 14, 2011, 03:34:14 PM
majikal, you should've just asked me. I would've explained it in lizzie-speek.

See what it is, is a whole bunch of arrays. Like, rooms - are arrays. They're all numbered. So like there's room #1, room #2, room 3, 4, 5, so on. All those are in array_room.

Then there's shortblade #1, shortblade #2, shortblade #3, 4, 5 and so on, and those are all located in array_shortrblades.

The game runs, and it's running, and it's doing its thing, and whatever. Nothing exists, except what is being interacted with. Everything is tucked nice and neat in its little array. Its drawer, which is in a nice little chest of drawers, in a closet called Armageddon_the_MUD.

So then, you need to be in apartment_room #72, where there exists shortblade #9 on cot #8446.

The brain of the game, called Ginka, says "Oh hey - we gotta open the drawer called array_room and display item #72. And we gotta make sure that when we display item #72 from array_room, that the array_shortblades produces item #9 and displays it on cot #8446 (which as everyone knows, was tucked neatly away in array_furniture).

So your character shows up in the room, looks on the cot, and voila - there's a shortblade there!

Then, your character leaves, and locks the door, and walks out of the apartment building. The room gets tucked back in its array, the sword back in ITS array, and the cot back in ITS array, until the next time someone needs to access it.
Title: Re: If a tree falls in the grey forest...
Post by: Talia on January 14, 2011, 03:41:50 PM
What Lizzie said above is incorrect.

Quote from: brytta.leofa on January 14, 2011, 01:55:53 PM
Does Arm load and run zones even when no PCs are there?  If I were guessing, I'd guess that it does.  Certain objects don't survive reboots; if zones were unloaded, I'd expect those same objects to not survive the last 'nakki logging out for the morning.

Yes, zones are running even when no PCs are there.
Title: Re: If a tree falls in the grey forest...
Post by: Lizzie on January 14, 2011, 03:53:10 PM
What I said might not be how Armageddon works, but it is an accurate explanation of what X-D said. Which is, that nothing exists, until/unless there is a reason for it to exist, and that a reason to exist would be something needing to interact with it.

Arrays are an appropriate method of creating/producing/displaying virtual data (which is what X-D refers to in regards to the exist/not exist theory).
Title: Re: If a tree falls in the grey forest...
Post by: brytta.leofa on January 14, 2011, 04:28:53 PM
Quote from: Talia on January 14, 2011, 03:41:50 PM
Yes, zones are running even when no PCs are there.

So my dung farm/infinite money hack is feasible.
Title: Re: If a tree falls in the grey forest...
Post by: Marshmellow on January 14, 2011, 05:46:56 PM
Not really.
Title: Re: If a tree falls in the grey forest...
Post by: X-D on January 14, 2011, 08:27:44 PM
Lizzie's basics in explanation is correct. Diku was made in a time when CPU resources were VERY limited on home systems, but it was not written on home systems, it was written and first run on a VAX or Cray with either unix or VMS, some college where the sysadmin would limit you to X ram X drive space and most importantly X CPU cycle counts.

So Diku was written to take up the smallest overall footprint possible. There were muds before Diku but many of them were resource intensive, mostly because everything had to be held in ram at once costing high ram usage and heavy CPU cycle counts.

So, how do you reduce all that, you make it so everything is "compact" Till needed. And to that, all present day muds use a method much like Diku,

So, the answer to the question is, The tree does not fall in the grey forest if there is nobody around to experiance it.

Or, to explain another way, that plant with a script to regrow fruit. The scrip says a new fruit is grown every X# ticks to a max of X. You pick all the fruit, the script records which tick# each was picked, you leave the room, the room and plant go into storage, the game ticks along, the correct number of ticks pass to grow a fruit, but no fruit grows, but when you enter the room you see the plant, at this point there is still no fruit on it, when you look at it though the game checks the script and it says there are 2 fruit on the plant now so...now there are 2 fruit.

BTW, Talia, zone=array.

Now a better question is, does the room exist or the tree fall if there is an NPC in it?

Course the answer there is no as well, since NPCs are just objects. Which is where the term MOB comes from, standing for Mobile OBject. Though many think it is just the MOB from MOBile.
Title: Re: If a tree falls in the grey forest...
Post by: Lizzie on January 14, 2011, 08:52:14 PM
I knew my C programming would be useful some day! If I remember nothing else, I'll always remember arrays. And pointers. Mostly arrays though. Oh and int main(); .

HELLO, WORLD!  HELLO, WORLD! HELLO, WORLD!  HELLO, WORLD!
Title: Re: If a tree falls in the grey forest...
Post by: Majikal on January 14, 2011, 09:25:55 PM
Mud philosophy. So deep.
Title: Re: If a tree falls in the grey forest...
Post by: Morgenes on January 14, 2011, 11:24:11 PM
Actually, from my 20 years of experience with the Diku engine, I have yet to see one that doesn't hold all the areas, rooms, items and npcs in memory and iterates over all of them all of the time. I know that other MUD engines do as you suggest X-D, but without experience I can't say specifically which do. But Diku is a memory abuser, it loads everything at boot time and it stays there till the game is shut down.
Title: Re: If a tree falls in the grey forest...
Post by: Twilight on January 15, 2011, 12:34:25 AM
At some point during this thread, I was sort of like...seriously folks?

l w
watch w

That will definitively answer your question about whether rooms/mobs/objects stay in memory when a PC is not in the same room as them.  Watch scripts (where you can see into another room like the Arena in Nak) will definitively answer the question of whether or not scripts are being ran in rooms that PCs are in.  It also (if you have encountered the right rooms) will answer the "But maybe its coded to only load NPCs/Objs/Rooms into memory within three rooms of a PC" potential rebuttal.
Title: Re: If a tree falls in the grey forest...
Post by: lordcooper on January 15, 2011, 01:39:03 AM
But maybe watching a room causes it to 'need to exist', and thus it does.
Title: Re: If a tree falls in the grey forest...
Post by: X-D on January 15, 2011, 05:41:24 AM
Besides, watch does not see emotes and many other types of echos outside the same room...wonder if that could be fixed.

I'll bow to morg on this point at least for arm, as my diku experiance is as old as his is long. :)
Title: Re: If a tree falls in the grey forest...
Post by: Fredd on January 15, 2011, 06:25:39 AM
Quote from: lordcooper on January 15, 2011, 01:39:03 AM
But maybe watching a room causes it to 'need to exist', and thus it does.

Exactly this  goes to Heisenberg uncertainty principle. Which states that the very act of observing an action, changes the outcome.

And further expanded upon this is Schrödinger's cat.

For those that don't know:

A cat is penned up in a steel chamber, along with the following device (which must be secured against direct interference by the cat): in a Geiger counter, there is a tiny bit of radioactive substance, so small that perhaps in the course of the hour, one of the atoms decays, but also, with equal probability, perhaps none; if it happens, the counter tube discharges, and through a relay releases a hammer that shatters a small flask of hydrocyanic acid. If one has left this entire system to itself for an hour, one would say that the cat still lives if meanwhile no atom has decayed. Therefore, until the resault is seen the cat is considered both living, and dead.

Therefore, undead cat.

In other words, You never know for certain unless you observe somethig. But if you observe it, you have changed it.
Title: Re: If a tree falls in the grey forest...
Post by: lordcooper on January 15, 2011, 06:58:36 AM
It also proves once and for all that Schrödinger was more of a dog person.
Title: Re: If a tree falls in the grey forest...
Post by: brytta.leofa on January 15, 2011, 09:05:28 AM
Quote from: Twilight on January 15, 2011, 12:34:25 AM
watch w

That will definitively answer your question about whether rooms/mobs/objects stay in memory when a PC is not in the same room as them.

On Diku/circle, and, I assume, on Arm, rooms are grouped into zones of, I think, less than 1000 rooms each?  If things did go inactive (which, per Morg, they don't), I would expect it to be per zone, not strictly per room.  The test would be something like:
- Find an NPC that chases but doesn't wander. (Are there any? Don't answer.)
- Lead it to the edge of a zone, then escape.
- Walk across the zone boundary and circle around so you can see your critter from afar.
- Back away from him, past "very far."
- Wait 30-60 minutes.
- Practice your spells so it's IC and stuff, I mean we're not twinks here.
- Go back and verify that the NPC is gone--gone past where it could have wandered.

But Morgenes says it doesn't work this way and hasn't worked this way in living memory so...no.
Title: Re: If a tree falls in the grey forest...
Post by: Twilight on January 15, 2011, 12:37:05 PM
Except that isn't the purpose of zones in Diku.  You can actually infer a lot about how Diku works just by observation.  I spent six years as an Overlord on a different Gamma Diku based MUD, so I know all that stuff stays in memory anyways, all the scripts keep going off, etc.  So perhaps my perspective is warped, but it seems to me that is one of the easy things to guess at correctly.
Title: Re: If a tree falls in the grey forest...
Post by: BleakOne on February 16, 2011, 06:31:20 PM
Lots of the game world would be needed to remain in existance anyway, so NPCs and critters can wander around.