1999Q4/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: [MUD&#45;Dev] The grass is always greener in the other field -->
<!--X-From-R13: Epnggre <fpnggreNguribegrk.pbz> -->
<!--X-Date: Fri, 17 Dec 1999 09:06:48 &#45;0800 -->
<!--X-Message-Id: 385A0E1C.4B54F1D2#thevortex,com -->
<!--X-Content-Type: text/plain -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, Re: [MUD-Dev] The grass is always greener in the other field</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:scatter#thevortex,com">
</head>
<body background="/backgrounds/paperback.gif" bgcolor="#ffffff"
      text="#000000" link="#0000FF" alink="#FF0000" vlink="#006000">

  <font size="+4" color="#804040">
    <strong><em>MUD-Dev<br>mailing list archive</em></strong>
  </font>
      
<br>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->

Date:&nbsp;
[&nbsp;<a href="msg00639.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00641.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00651.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00641.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00638">Author</A>
&nbsp;|&nbsp;<A HREF="#00638">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00638">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Re: [MUD-Dev] The grass is always greener in the other field</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
<LI><em>Subject</em>: Re: [MUD-Dev] The grass is always greener in the other field</LI>
<LI><em>From</em>: Scatter &lt;<A HREF="mailto:scatter#thevortex,com">scatter#thevortex,com</A>&gt;</LI>
<LI><em>Date</em>: Fri, 17 Dec 1999 10:19:08 +0000</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
<LI><em>Sender</em>: <A HREF="mailto:mud-dev-admin#kanga,nu">mud-dev-admin#kanga,nu</A></LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>

Matthew Mihaly &lt;diablo#best,com&gt; wrote:
&gt;Cynbe ru Taren wrote:
&gt;&gt; E.g., if some values frequently default to the same value, but may
&gt;&gt; -sometimes- be changed, space can be saved by, instead of the typical
&gt;&gt; strategy of using a structure field per object initialized to the
&gt;&gt; default value (wastefully storing the default value many times),
&gt;&gt; instead storing the default value once and using a hash table
&gt;&gt; to record which objects have non-default values for the field.
&gt;Well, I'm not entirely sure I understand what you are talking about, as
&gt;I'm not much of a techie, but from my meager understanding, I still don't
&gt;understand how knowing which objects have non-default values will help
&gt;with the problem as I stated it. For instance, there are about 6000 vials
&gt;in Achaea currently. When you buy one, it will last 250 half-months
&gt;(that's about 130 rl days). So, you've got 6000 vials, with their decay
&gt;counter set at between 1 and 250. How can you aggregate these, unless they
&gt;have the same decay times, without losing the information specific to
&gt;them?

I use a system of place-holder objects for this kind of situation. It's
fairly simplistic, but it is yielding great savings in RAM and disk-space
usage.

In LPC, objects are cloned from a base (template) object. A normal object 
has a large set of attributes and a set of methods that manipulate them. A 
place-holder object has the same set of methods, but as few attributes as
possible. One of the attributes is a reference to base object, and the methods
that simply query other attributes just retrieve that attribute from the 
base object, thus retrieving the default value.

In the simplest case, the place-holder has only one attribute - the
base object reference. Since only attributes are saved, not the methods,
this is a massive space saving over saving all fifty odd attributes for
the object. This kind of place-holder can also be trivially aggregated
for saving, reducing the space needed even further.

In the case of things like your vials, or weapons and armour where every
object instance has a different 'condition' attribute, the place-holder
object would contain two attributes - the condition and the base object
reference. Still two attributes vs. fifty is a large saving, and place-holders
whose attributes match can still be aggregated for saving.

When changes are made to an individual object by something in the game
and an attribute not contained within the place-holder is changed, the
place-holder is transparently replaced with a 'real' copy of the object.

This means that for things like coins where thousands of them exist
with no changes to the default attribute values, all of them are represented
by tiny place-holder objects with only a couple of attributes. The
few that have had changes made to them, spells cast on them etc. are
'real' objects that save all their attributes, thus retaining their
individuality.

-- 
Scatter ///\oo/\\\



_______________________________________________
MUD-Dev maillist  -  MUD-Dev#kanga,nu
<A  HREF="http://www.kanga.nu/lists/listinfo/mud-dev">http://www.kanga.nu/lists/listinfo/mud-dev</A>

</PRE>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00639.html">Re: [MUD-Dev] Fair/Unfair? Scenarios (fwd)</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00641.html">Re: [MUD-Dev] The grass is always greener in the other field</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00651.html">Re: [MUD-Dev] Optimized Object Storage</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00641.html">Re: [MUD-Dev] The grass is always greener in the other field</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00638"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00638"><STRONG>Thread</STRONG></A></LI>
</UL>
</LI>
</UL>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
<ul><li>Thread context:
<BLOCKQUOTE><UL>
<LI><STRONG>RE: [MUD-Dev] The grass is always greener in the other field</STRONG>, <EM>(continued)</EM>
<ul compact>
<LI><strong><A NAME="00626" HREF="msg00626.html">RE: [MUD-Dev] The grass is always greener in the other field</A></strong>, 
Koster, Raph <a href="mailto:rkoster#origin,ea.com">rkoster#origin,ea.com</a>, Fri 17 Dec 1999, 01:01 GMT
</LI>
<LI><strong><A NAME="00634" HREF="msg00634.html">Re: [MUD-Dev] The grass is always greener in the other field</A></strong>, 
cg <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Fri 17 Dec 1999, 04:04 GMT
<UL>
<LI><strong><A NAME="00637" HREF="msg00637.html">[MUD-Dev] Optimized Object Storage</A></strong>, 
Ian Macintosh <a href="mailto:iman#issystems,co.nz">iman#issystems,co.nz</a>, Fri 17 Dec 1999, 17:06 GMT
<UL>
<LI><strong><A NAME="00651" HREF="msg00651.html">Re: [MUD-Dev] Optimized Object Storage</A></strong>, 
J C Lawrence <a href="mailto:claw#cp,net">claw#cp,net</a>, Fri 17 Dec 1999, 23:36 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
<LI><strong><A NAME="00638" HREF="msg00638.html">Re: [MUD-Dev] The grass is always greener in the other field</A></strong>, 
Scatter <a href="mailto:scatter#thevortex,com">scatter#thevortex,com</a>, Fri 17 Dec 1999, 17:06 GMT
</LI>
<LI><strong><A NAME="00641" HREF="msg00641.html">Re: [MUD-Dev] The grass is always greener in the other field</A></strong>, 
Ilya, Game Commandos <a href="mailto:Ilya#gamecommandos,com">Ilya#gamecommandos,com</a>, Fri 17 Dec 1999, 17:44 GMT
</LI>
<LI><strong><A NAME="00644" HREF="msg00644.html">RE: [MUD-Dev] The grass is always greener in the other field</A></strong>, 
Koster, Raph <a href="mailto:rkoster#origin,ea.com">rkoster#origin,ea.com</a>, Fri 17 Dec 1999, 22:05 GMT
<UL>
<LI><strong><A NAME="00649" HREF="msg00649.html">RE: [MUD-Dev] The grass is always greener in the other field</A></strong>, 
Adam Wiggins <a href="mailto:adam#angel,com">adam#angel,com</a>, Fri 17 Dec 1999, 23:00 GMT
</LI>
<LI><strong><A NAME="00658" HREF="msg00658.html">RE: [MUD-Dev] The grass is always greener in the other field</A></strong>, 
Ian Macintosh <a href="mailto:iman#issystems,co.nz">iman#issystems,co.nz</a>, Sat 18 Dec 1999, 04:26 GMT
</LI>
</UL>
</LI>
</ul>
</LI>
</UL></BLOCKQUOTE>

</ul>
<hr>
<center>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
</center>
<hr>
</body>
</html>