2000Q1/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: [MUD&#45;Dev] Simulated Populations -->
<!--X-From-R13: "cuyGWR" <cuyhvqNzvaqyrff.pbz> -->
<!--X-Date: Thu, 20 Jan 2000 20:37:40 &#45;0800 -->
<!--X-Message-Id: 000001bf63c5$a5478c60$0201a8c0#syntax2,javanet.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] Simulated Populations</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:phluid#mindless,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="msg00199.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00201.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00226.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00209.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00200">Author</A>
&nbsp;|&nbsp;<A HREF="#00200">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00200">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Re: [MUD-Dev] Simulated Populations</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: "Mud Dev Listserv" &lt;<A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A>&gt;</LI>
<LI><em>Subject</em>: Re: [MUD-Dev] Simulated Populations</LI>
<LI><em>From</em>: "phlUID" &lt;<A HREF="mailto:phluid#mindless,com">phluid#mindless,com</A>&gt;</LI>
<LI><em>Date</em>: Thu, 20 Jan 2000 23:11:51 -0500</LI>
<LI><em>Importance</em>: Normal</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>
<LI><em>Sensitivity</em>: Company-Confidential</LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
Vladimir Prelovac wrote:
&gt;   I am just having a look at this from the programming side of view. If
&gt; you are going to have large numbers of mobs moving from one location to
&gt; the other (ie. hunting, searching for food, going to war...) you will have
&gt; to spend a *lot* of CPU time calculating shortest paths. And I still dont
&gt; know an efficient way to handle this. Maybe there is a way to build this
&gt; database with some kind of implemented solution to this problem within it.

Well, there are a couple of thoughts on this:

1. We could just throw out the whole path finding thing and make mobs
   wander aimlessly. This would make sense because populations would
   remain mostly concentrated in one locale. Obviously, this isn't the
   fun way. :)

2. The database could calculate inter-wilderness paths upon bootup.
   I've never heard of this being done before so I'll give a quick
   description. Say I have a dwarven population in the north part of
   the map, and I want to make routes to all the other populations
   they might want to later interact with. I can use variations of
   the A* pathfinding algorithm with different heuristics to generate
   different paths through the wilderness. When one of the dwarves
   enter's a room that is part of this path, they just have to pick
   up the path ID and fallow all the path pointer's along the way to
   it's destination. This creates invisible roads through which the
   dwarves will move. Ranger's can also use tracking with zero CPU
   time. The only problem with this is that the paths will break if
   one of the rooms on them is destroyed. In this case, we will have
   some method of destroying the path, or else all the dwarves will
   end up in some deadend all trying to go east. :)

3. I use a wilderness system to connect different areas. This system
   shows a small overhead map in your room description depending on
   your current position within the wilderness. Luckily, the wilderness
   is graphed, so path finding is extremely fast when determining the
   way from one coordinate to the other coordinate. Of course, this
   doesn't account for the fact that the area's that are not part of
   the wilderness don't have coordinates. I will need to do cpu
   tests on a hybrid version of this system, using both graph path
   finding and non-graph path finding.

4. I can use regular pathfinding, but instead of just sitting there
   and sucking up the CPU to death, I can use the idle time spent in
   select() utilizing the path finding algorithm. Dwarves don't
   need paths to suddenly appear at that very pulse because they can
   effectively wait a few minutes for an answer. This conserves CPU
   and produces very reliable results. What's the point of wasting
   CPU cycles when you can use them to make the game more alive?

I believe that it is also possible to combine any number of these
elements together into one system. For example, I could use graph
pathfinding and wandering, so that a dwarf would wander around it's
area until it stumbled into the wilderness and then have it determine
if it wants to go back or go to another area. Another possibility is
to use pregenerated paths with wandering, so dwarfs will wander aimlessly
until they stumble upon a room with a path. It can then decide if it wants
to fallow that path.

Vladimir Prelovac wrote:
&gt;   Second matter is problem of handling system crashes or at least reboots.
&gt; You would obviously need a very safe and precise method of saving all the
&gt; data that have evolved (population info, every mob's current goal, etc
&gt; etc) and restoring them back, because you dont want your world to start
&gt; building itself from scratch every time you reboot.

   Luckily, because Spellbound uses C++ every object in the game inherits
  from a 'Savable' class. Because of this, Spellbound is 100% persistent.
  When the game saves to disk and loads from disk, it is in the exact same
  stage as it was when it went down or crashed. Total database saves are
  done periodically ever hour, so the worst that can happen is a time
  warp. The database is only copied if the save is successful.

Vladimir Prelovac wrote:
&gt;   The whole idea is of course very interesting. But also the effort that
&gt; has to be put into building it is simply HUGE. Hope you will finish it
&gt; though.

   Me too. There never seems enough time for a good coding run. For some
  odd reason people start asking questions about where you have been and
  where all the twinkies and soda keep going. :)

Amos Wetherbee,
The Spellbound Project




_______________________________________________
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>
<ul compact><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><A NAME="00209" HREF="msg00209.html">Re: [MUD-Dev] Simulated Populations</A></strong>
<ul compact><li><em>From:</em> SkeptAck#antisocial,com (Dundee)</li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00199.html">Re: [MUD-Dev] Community Relations</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00201.html">[MUD-Dev] [adv-mud] Spellbound Hierarchy and Keys (fwd)</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00226.html">Re: [MUD-Dev] Simulated Populations</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00209.html">Re: [MUD-Dev] Simulated Populations</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00200"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00200"><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] Simulated Populations</STRONG>, <EM>(continued)</EM>
<ul compact>
<LI><strong><A NAME="00256" HREF="msg00256.html">Re: [MUD-Dev] Simulated Populations</A></strong>, 
J C Lawrence <a href="mailto:claw#kanga,nu">claw#kanga,nu</a>, Wed 02 Feb 2000, 05:07 GMT
</LI>
<LI><strong><A NAME="00168" HREF="msg00168.html">RE: [MUD-Dev] Simulated Populations</A></strong>, 
Charles Hughes <a href="mailto:charles.hughes#bigfoot,com">charles.hughes#bigfoot,com</a>, Thu 20 Jan 2000, 00:47 GMT
</LI>
<LI><strong><A NAME="00183" HREF="msg00183.html">Re: [MUD-Dev] Simulated Populations</A></strong>, 
Nicolai Hansen <a href="mailto:nic#aub,dk">nic#aub,dk</a>, Thu 20 Jan 2000, 22:53 GMT
<UL>
<LI><strong><A NAME="00226" HREF="msg00226.html">Re: [MUD-Dev] Simulated Populations</A></strong>, 
J C Lawrence <a href="mailto:claw#kanga,nu">claw#kanga,nu</a>, Wed 26 Jan 2000, 05:32 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00200" HREF="msg00200.html">Re: [MUD-Dev] Simulated Populations</A></strong>, 
phlUID <a href="mailto:phluid#mindless,com">phluid#mindless,com</a>, Fri 21 Jan 2000, 04:37 GMT
<UL>
<LI><strong><A NAME="00209" HREF="msg00209.html">Re: [MUD-Dev] Simulated Populations</A></strong>, 
Dundee <a href="mailto:SkeptAck#antisocial,com">SkeptAck#antisocial,com</a>, Fri 21 Jan 2000, 18:04 GMT
<UL>
<LI><strong><A NAME="00212" HREF="msg00212.html">Re: [MUD-Dev] Simulated Populations</A></strong>, 
Wes Connell <a href="mailto:wconnell#adhesive,com">wconnell#adhesive,com</a>, Fri 21 Jan 2000, 23:28 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
</ul>
</LI>
<LI><strong><A NAME="00153" HREF="msg00153.html">[MUD-Dev] Signing off...</A></strong>, 
IronWolf <a href="mailto:ironwolf#ewa,net">ironwolf#ewa,net</a>, Wed 19 Jan 2000, 07:15 GMT
<LI><strong><A NAME="00142" HREF="msg00142.html">[MUD-Dev] How to handle/display partial language skill</A></strong>, 
Joe Kingry <a href="mailto:jkingry#uwaterloo,ca">jkingry#uwaterloo,ca</a>, Wed 19 Jan 2000, 02:56 GMT
</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>