<!-- MHonArc v2.4.4 --> <!--X-Subject: Re: [MUD-Dev] Rooms, 3D arrays, etc. --> <!--X-From-R13: pynjerapNphc.uc.pbz --> <!--X-Date: from stimpy.globecomm.net [207.51.48.4] by in10.ibm.net id 864856046.29372-1 Wed May 28 21:47:26 1997 CUT --> <!--X-Message-Id: 199705282151.OAA29075#xsvr3,cup.hp.com --> <!--X-Content-Type: text/plain --> <!--X-Reference: Pine.LNX.3.91.970527141836.3629B-100000@localhost --> <!--X-Head-End--> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <html> <head> <title>MUD-Dev message, Re: [MUD-Dev] Rooms, 3D arrays, etc.</title> <!-- meta name="robots" content="noindex,nofollow" --> <link rev="made" href="mailto:clawrenc#cup,hp.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> [ <a href="../">Other Periods</a> | <a href="../../">Other mailing lists</a> | <a href="/search.php3">Search</a> ] <br clear=all><hr> <!--X-Body-Begin--> <!--X-User-Header--> <!--X-User-Header-End--> <!--X-TopPNI--> Date: [ <a href="msg00911.html">Previous</a> | <a href="msg00913.html">Next</a> ] Thread: [ <a href="msg00968.html">Previous</a> | <a href="msg00935.html">Next</a> ] Index: [ <A HREF="author.html#00912">Author</A> | <A HREF="#00912">Date</A> | <A HREF="thread.html#00912">Thread</A> ] <!--X-TopPNI-End--> <!--X-MsgBody--> <!--X-Subject-Header-Begin--> <H1>Re: [MUD-Dev] Rooms, 3D arrays, etc.</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] Rooms, 3D arrays, etc.</LI> <LI><em>From</em>: <A HREF="mailto:clawrenc#cup,hp.com">clawrenc#cup,hp.com</A></LI> <LI><em>Date</em>: Wed, 28 May 97 14:39:33 -0700</LI> <LI><em>Reply-to</em>: <A HREF="mailto:claw#null,net">claw#null,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> In <<A HREF="msg00855.html">Pine.LNX.3.91.970527141836.3629B-100000@localhost</A>>, on 05/27/97 at 08:35 PM, RHS Linux User <michael#sparta,mainstream.net> said: >On Sun, 25 May 1997 coder#ibm,net wrote: >> On 25/05/97 at 10:32 AM, Michael Hohensee <michael#sparta,mainstream.net> said: >> Yup. This is actually a workable idea, especially f you code in some >> form of compressing array (a simple RLE would do fine, even better if >> capable of handling several dimensions). Multi-dimensional arrays can >> get big, quickly. >Hmm, never heard of a compressing array. The standard solution would be to use a sparse array. However your array is actually pretty dense (almost all fields are filled with data), so most sparse array techniques won't work too well. The next tack that struck me was to RLE compress lines, columns, or even recatngles in the array as fit. Why RLE? Its incredibly cheap to decompress -- you can afford to do a lot of it at runtime, I just figured on an array >of structures like: >struct space >{ > int terrain; > GENERIC_THINGY *room; >}; >struct space world [MAX_LENGTH] [MAX_WIDTH] [MAX_HEIGHT] [MAX_TIME]; Very space wasteful -- most of those pointers will be NULL. Why not have a simple array of unsigned chars for the terrain, using the 255 value as a flag. If the value is 255, instead use those coordinates as an offset into a sparse array to get the pointer value, if its not 255 the char value is the terrain type. Additionally this allows you to compress the terrain array as above. >How would you do compression? RLE is incredibly cheap but not terribly efficient. Its main benefit to this area is that you don't want to decompress large data sets at any one time -- you just want the value at a specific coordinate, which is very easy to get from RLE. With RLE I'd just compress rows and columns, or possibly even rectangles. Then on reading its just a matter of using the repeated pattern to predict what the value is at a specific coordinate. You could also use something like arithmetic compression. Its also cheap to decompress (very expensive to compress), but much more difficult to impossible to extract that value of a specific byte at a known position without decompressing the entire blob. See the *.compression groups and FAQs for other details. >> The problem here is preserving state changes at the various "time >> levels". Consider the cimple form of two players crossing the same >> ocean. Bubba crossed two hours ago IRL, and Boffo is crossing right >> now. If you go for the 4'th D == time, then you should be able to >> move some distance in the 4th D and find Bubba still crossing the >> ocean (even if you can't interact with him for obvious reasons). >Well, you could always come up with some arbitrary rule which >prevents this. Say that due to the laws of physics/magic, you can >only travel in time in 100 year intervals. And each universe is >moving forward in time at the same rate. So in the year 101, you >could go back to the year 1, but in the year 102 you could only go >back to year 2. So, after sufficient time has passed in the game, shouldn't you be able to see Bubba passing there 100 years ago? There are other forms of this question you'll also need to account for. >It would take a rather determined player to prove your universe >inconsistent. :) You'd be surprised. -- J C Lawrence Internet: claw#null,net (Contractor) Internet: coder#ibm,net ---------------(*) Internet: clawrenc#cup,hp.com ...Honorary Member Clan McFUD -- Teamer's Avenging Monolith... </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="00935" HREF="msg00935.html">Re: [MUD-Dev] Rooms, 3D arrays, etc.</A></strong> <ul compact><li><em>From:</em> Michael Hohensee <michael#sparta,mainstream.net></li></ul> </UL></LI></UL> <!--X-Follow-Ups-End--> <!--X-References--> <UL><LI><STRONG>References</STRONG>: <UL> <LI><STRONG><A NAME="00855" HREF="msg00855.html">Re: [MUD-Dev] Rooms, 3D arrays, etc.</A></STRONG> <UL><LI><EM>From:</EM> RHS Linux User <michael#sparta,mainstream.net></LI></UL></LI> </UL></LI></UL> <!--X-References-End--> <!--X-BotPNI--> <UL> <LI>Prev by Date: <STRONG><A HREF="msg00911.html">Re: [MUD-Dev] Meta issues [was Alright... IF your gonan do DESIESE...]</A></STRONG> </LI> <LI>Next by Date: <STRONG><A HREF="msg00913.html">Re: [MUD-Dev] Alright... IF your gonan do DESIESE...</A></STRONG> </LI> <LI>Prev by thread: <STRONG><A HREF="msg00968.html">Re: [MUD-Dev] Rooms, 3D arrays, etc.</A></STRONG> </LI> <LI>Next by thread: <STRONG><A HREF="msg00935.html">Re: [MUD-Dev] Rooms, 3D arrays, etc.</A></STRONG> </LI> <LI>Index(es): <UL> <LI><A HREF="index.html#00912"><STRONG>Date</STRONG></A></LI> <LI><A HREF="thread.html#00912"><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] Rooms, 3D arrays, etc.</STRONG>, <EM>(continued)</EM> <ul compact> <LI><strong><A NAME="00794" HREF="msg00794.html">Re: [MUD-Dev] Rooms, 3D arrays, etc.</A></strong>, coder <a href="mailto:coder#ibm,net">coder#ibm,net</a>, Mon 26 May 1997, 03:50 GMT <UL> <LI><strong><A NAME="00855" HREF="msg00855.html">Re: [MUD-Dev] Rooms, 3D arrays, etc.</A></strong>, RHS Linux User <a href="mailto:michael#sparta,mainstream.net">michael#sparta,mainstream.net</a>, Wed 28 May 1997, 01:29 GMT <UL> <LI><strong><A NAME="00892" HREF="msg00892.html">Re: [MUD-Dev] Rooms, 3D arrays, etc.</A></strong>, Shawn Halpenny <a href="mailto:malachai#iname,com">malachai#iname,com</a>, Wed 28 May 1997, 20:57 GMT <UL> <LI><strong><A NAME="00968" HREF="msg00968.html">Re: [MUD-Dev] Rooms, 3D arrays, etc.</A></strong>, clawrenc <a href="mailto:clawrenc#cup,hp.com">clawrenc#cup,hp.com</a>, Thu 01 Jan 1970, 08:11 GMT </LI> </UL> </LI> <LI><strong><A NAME="00912" HREF="msg00912.html">Re: [MUD-Dev] Rooms, 3D arrays, etc.</A></strong>, clawrenc <a href="mailto:clawrenc#cup,hp.com">clawrenc#cup,hp.com</a>, Thu 29 May 1997, 04:47 GMT <UL> <LI><strong><A NAME="00935" HREF="msg00935.html">Re: [MUD-Dev] Rooms, 3D arrays, etc.</A></strong>, Michael Hohensee <a href="mailto:michael#sparta,mainstream.net">michael#sparta,mainstream.net</a>, Fri 30 May 1997, 03:50 GMT <UL> <LI><strong><A NAME="00954" HREF="msg00954.html">Re: [MUD-Dev] Rooms, 3D arrays, etc.</A></strong>, Ling <a href="mailto:K.L.Lo-94#student,lut.ac.uk">K.L.Lo-94#student,lut.ac.uk</a>, Fri 30 May 1997, 22:59 GMT </LI> </UL> </LI> </UL> </LI> </UL> </LI> </UL> </LI> <LI><strong><A NAME="00798" HREF="msg00798.html">Re: [MUD-Dev] Rooms, 3D arrays, etc.</A></strong>, Nathan Yospe <a href="mailto:yospe#hawaii,edu">yospe#hawaii,edu</a>, Mon 26 May 1997, 05:47 GMT </LI> <LI><strong><A NAME="00804" HREF="msg00804.html">Re: [MUD-Dev] Rooms, 3D arrays, etc.</A></strong>, Raz <a href="mailto:muddyraz#mushroom,demon.co.uk">muddyraz#mushroom,demon.co.uk</a>, Mon 26 May 1997, 11:10 GMT </LI> </ul> </LI> </UL></BLOCKQUOTE> </ul> <hr> <center> [ <a href="../">Other Periods</a> | <a href="../../">Other mailing lists</a> | <a href="/search.php3">Search</a> ] </center> <hr> </body> </html>