1998Q1/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: [MUD&#45;Dev]  CORBA, RMI, threads -->
<!--X-From-R13: pbqreNvoz.arg -->
<!--X-Date: Thu, 12 Feb 1998 22:22:53 +0000 -->
<!--X-Message-Id: 199802122222.WAA81148#out4,ibm.net -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 34CAB24A.82512846#darklock,com -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, Re: [MUD-Dev]  CORBA, RMI, threads</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:coder#ibm,net">
</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="msg00442.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00444.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00307.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00300.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00443">Author</A>
&nbsp;|&nbsp;<A HREF="#00443">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00443">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Re: [MUD-Dev]  CORBA, RMI, threads</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: <A HREF="mailto:mud-dev#null,net">mud-dev#null,net</A></LI>
<LI><em>Subject</em>: Re: [MUD-Dev]  CORBA, RMI, threads</LI>
<LI><em>From</em>: <A HREF="mailto:coder#ibm,net">coder#ibm,net</A></LI>
<LI><em>Date</em>: Thu, 12 Feb 98 14:09:27 -0800</LI>
<LI><em>Reply-to</em>: <A HREF="mailto:coder#ibm,net">coder#ibm,net</A></LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>

On 24/01/98 at 07:35 PM, Caliban Tiresias Darklock &lt;caliban#darklock,com&gt;
said: &gt;Vadim Tkachenko wrote:
&gt;&gt; Marc Eyrignoux wrote:

&gt;&gt; &gt; In fact, I intend to make the monsters act every 15 seconds. A thread
&gt;&gt; &gt; that would sleep for 15 seconds and acts according to the situation 
&gt;&gt; &gt; at the moment it wakes up seems to be a good way for doing this.
&gt;&gt;
&gt;&gt; Once again, why 15? Why not 14 or 16?

&gt;12 | (&lt;unique object reference number&gt; &amp; 3) would work. Give the
&gt;appearance of randomness and 1-second resolution, without bogging the CPU
&gt;by using all the threads at once. 

Players will very quickly learn the granularity.  They'll snoop, remote
watch, or otherwise see a mobile "do" something, and then know that they
are safe for at least 15 seconds to do whatever they want before they need
get out.  I've done this more than once with different games.

&gt;Using appropriate bit shifting and
&gt;arbitrary fragments of statistics and whatnot, you can do a really fast
&gt;calculation that would change over time and keep things separated a good
&gt;deal. Sure, you might end up with a pathological case, but that would be
&gt;rare and it wouldn't be any worse than scheduling all the threads at
&gt;once.

Better, but the problem of the same base granularity remains.

&gt;There are, of course, much more efficient methods that could be pulled up
&gt;by people who are much more experienced in this sort of programming than
&gt;I am. 

I'f you are wedded to the pulse/polling model for whatever reason I'd
instead tend to have a loop which iterates across all possible candidates
a say one N'th the intended action frequency, and randomly selects N% of
the candidates on each pass for activity.  (Play with the numbers until
you like them)  The intended result is that every (say) 3 seconds a given
object may or may not get evaluated, with the strong possibility that some
oblects will be ignored for extensive periods, and others hyper-active. 
Tailoring your pseudo-random number algorithm can change the shape of the
curve here.

-- 
J C Lawrence                               Internet: claw#null,net
----------(*)                              Internet: coder#ibm,net
...Honourary Member of Clan McFud -- Teamer's Avenging Monolith...


</PRE>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00307" HREF="msg00307.html">Re: [MUD-Dev]  CORBA, RMI, threads</A></STRONG>
<UL><LI><EM>From:</EM> Caliban Tiresias Darklock &lt;caliban#darklock,com&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00442.html">Re: [MUD-Dev] Clients based on Netscape 5?</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00444.html">Re: [MUD-Dev]  OT: Linux g++</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00307.html">Re: [MUD-Dev]  CORBA, RMI, threads</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00300.html">Re: [MUD-Dev]  CORBA, RMI, threads</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00443"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00443"><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]  OT: DCOM and RMI</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<ul compact>
<LI><strong><A NAME="00208" HREF="msg00208.html">Re: [MUD-Dev]  OT: DCOM and RMI</A></strong>, 
Alex Oren <a href="mailto:alexo#bigfoot,com">alexo#bigfoot,com</a>, Mon 12 Jan 1998, 13:02 GMT
<UL>
<LI><strong><A NAME="00293" HREF="msg00293.html">[MUD-Dev]  CORBA, RMI, threads</A></strong>, 
Marc Eyrignoux <a href="mailto:Marc.Eyrignoux#efrei,fr">Marc.Eyrignoux#efrei,fr</a>, Fri 23 Jan 1998, 11:30 GMT
<UL>
<LI><strong><A NAME="00294" HREF="msg00294.html">Re: [MUD-Dev]  CORBA, RMI, threads</A></strong>, 
Vadim Tkachenko <a href="mailto:vadimt#4cs,com">vadimt#4cs,com</a>, Fri 23 Jan 1998, 15:39 GMT
<UL>
<LI><strong><A NAME="00307" HREF="msg00307.html">Re: [MUD-Dev]  CORBA, RMI, threads</A></strong>, 
Caliban Tiresias Darklock <a href="mailto:caliban#darklock,com">caliban#darklock,com</a>, Sun 25 Jan 1998, 03:32 GMT
<UL>
<LI><strong><A NAME="00443" HREF="msg00443.html">Re: [MUD-Dev]  CORBA, RMI, threads</A></strong>, 
coder <a href="mailto:coder#ibm,net">coder#ibm,net</a>, Thu 12 Feb 1998, 22:22 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
<LI><strong><A NAME="00300" HREF="msg00300.html">Re: [MUD-Dev]  CORBA, RMI, threads</A></strong>, 
Nathan Yospe <a href="mailto:yospe#hawaii,edu">yospe#hawaii,edu</a>, Fri 23 Jan 1998, 18:58 GMT
<UL>
<LI><strong><A NAME="00323" HREF="msg00323.html">Re: [MUD-Dev]  CORBA, RMI, threads</A></strong>, 
Marc Eyrignoux <a href="mailto:Marc.Eyrignoux#efrei,fr">Marc.Eyrignoux#efrei,fr</a>, Mon 26 Jan 1998, 16:40 GMT
<UL>
<LI><strong><A NAME="00324" HREF="msg00324.html">CORBA, RMI, threads</A></strong>, 
s001gmu <a href="mailto:s001gmu#nova,wright.edu">s001gmu#nova,wright.edu</a>, Mon 26 Jan 1998, 20:37 GMT
</LI>
<LI><strong><A NAME="00331" HREF="msg00331.html">Re: [MUD-Dev]  CORBA, RMI, threads</A></strong>, 
Brandon Gillespie <a href="mailto:brandon#roguetrader,com">brandon#roguetrader,com</a>, Tue 27 Jan 1998, 21:26 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
</UL>
</LI>
</UL>
</LI>
</ul>
</ul>
</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>