1998Q4/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD&#45;Dev] Re: Terrain/Landmass &#38; GIF/BMP -->
<!--X-From-R13: [nep Vreanaqrm <znepNwo.pbz> -->
<!--X-Date: Thu, 8 Oct 1998 00:47:11 &#45;0700 -->
<!--X-Message-Id: Pine.LNX.3.93.981008002223.15612A&#45;100000#ias,jb.com -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 002201bdf285$17b12760$2c87ebcd@k6 -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, [MUD-Dev] Re: Terrain/Landmass &amp; GIF/BMP</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:marc#jb,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="msg00122.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00124.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00121.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00122.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00123">Author</A>
&nbsp;|&nbsp;<A HREF="#00123">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00123">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>[MUD-Dev] Re: Terrain/Landmass &amp; GIF/BMP</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>: [MUD-Dev] Re: Terrain/Landmass &amp; GIF/BMP</LI>
<LI><em>From</em>: Marc Hernandez &lt;<A HREF="mailto:marc#jb,com">marc#jb,com</A>&gt;</LI>
<LI><em>Date</em>: Thu, 8 Oct 1998 00:46:00 -0700 (PDT)</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#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>
On Wed, 7 Oct 1998, quzah [sotfhome] wrote:

	This is one of my favorite subjects :-).  I have multiple
implementations of various simple methods to generate land including
plasma                                  //I _love_ pine 
fractal, more traditional fractals (from Kenton Musgrave), random brownian
motion walks, continent division (take the land.  Split into 2 sides.
lower one and raise the other, repeat) etc. If you have any questions or
need some algorithms/code just ask.
	I found taking the plasma fractal (the subdivision one previously
described) and creating one 'map' then using that map as a 'roughness'
input for the _real_ map produces some nice heterogeneous land.  Otherwise
it can be really smooth.  
	Another thing to do with plasmafractal is to not just seed the
four corners but to seed a little more.  If you had a 512x512 land you
could seed
(0,0),  (256,0),  (512,0),
(0,256),(256,256),(512,256),
(0,512),(256,512),(512,512)

	(or more).  This tends to break up the 'one big landmass' effect
plasma often gives.

}&gt;&gt; (For rivers I plan on using heuristics for getting from point
}&gt;&gt; A (river source) to point B (river mouth) but I haven't looked
}&gt;&gt; at it too in depth. Finally I believe I have managed to locate
}&gt;&gt; the actual formula for "A*" so I may see what I can do with it
}&gt;&gt; at a later date.)

}&gt;I'd certainly be interested in seeing this if you have the possibility to
}&gt;post it.

}Actually I don't think I'm going to end up using it, because of
}the fact that water flows down hill. (Yes, I'm aware of the one
}instance, perhaps more, where it doesn't, but as a whole...). So,
}not knowing enough about A* yet, (I haven't played with it yet) I
}probably will opt just to do something like:

	A* is a good heuristic for finding shortest paths without using a
complicated or expensive search but as you noted water doesnt necessarily
take the shortest path does it :-&gt; (just the downhill one).  In fact it
tends to meander in flatter situations.

}start(x,y)
}find the valid moves from current local
}flow in one dir at random

	for 'find the valid moves' I would recommend using dir,dir+1,dir-1
(where dir is one of the 8 cardinal directions).  I tried just selecting
the lowest spot and ended up with some bad rivers.  some other ideas
including spawning a new river when certain conditions are met (so you can
get 'fingers' at the river head) etc.

}repeat
}
}&gt;Hmmm.... Seems to me that if you want to encode *all* the information in
}&gt;the map in a single picture, you'll get a very messy one. That is, it will
}&gt;be very hard (just as hard as with your ASCII output) to get a feel for
}&gt;what the map looks like. You can simply *not* encode all the data fields
}&gt;in those 20 bits (some of which are heights, others which are resources,
}&gt;and so on, I take it?) and make it useful for a human reader ("so, okay,
}&gt;um, a lot of green mixed in with a little red should mean high altitude
}&gt;and some, um, lessee, iron ore...").

}The only thing I currently need the picture for is water and land.
}The rest will be left off for now. I only need to see how high/low
}terrain is. (So I can see if I like its grouping, or if it just looks
}like a bunch of random crap ;) The image won't be used actually in
}the game, just for some test runs when map generating.

	I assume youll have your own '.map' format.  I would definatly
make a maptoxxxx (where xxxx is whatever graphics format you choose).
Then you could also split out differnt data into different graphic files.

}&gt;As for graphics formats... The format that strikes me as the simplest is
}&gt;plain BMP (the Windows incarnation, that is). However, other posters have
}&gt;responded to this, so I will refrain from doing it as well.

	Another good format is targa.  It has a simple 18byte header with
very simple data after (like RGBRGBRGB... for 24 bit and RGBARGBARGBA...
for 32).

}I haven't done anything with graphics ever, so it'll all be new
}to me. Again, thanks everyone for the help.
}-Q-

	Hope this isnt noise.

Marc Hernandez		marc#eisoftware,com
Programmer		www.eisoftware.com



</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="00121" HREF="msg00121.html">[MUD-Dev] Re: Terrain/Landmass &amp; GIF/BMP</A></STRONG>
<UL><LI><EM>From:</EM> "quzah [sotfhome]" &lt;quzah#softhome,net&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00122.html">[MUD-Dev] Re: Terrain/Landmass &amp; GIF/BMP</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00124.html">[MUD-Dev] Re: META: who are we?</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00121.html">[MUD-Dev] Re: Terrain/Landmass &amp; GIF/BMP</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00122.html">[MUD-Dev] Re: Terrain/Landmass &amp; GIF/BMP</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00123"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00123"><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><A NAME="00125" HREF="msg00125.html">[MUD-Dev] Re: META: What are you looking for in this list?</A></strong>, 
Alex Stewart <a href="mailto:riche#crl,com">riche#crl,com</a>, Thu 08 Oct 1998, 10:11 GMT
<LI><strong><A NAME="00116" HREF="msg00116.html">[MUD-Dev] Re: Terrain/Landmass &amp; GIF/BMP</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Thu 08 Oct 1998, 01:33 GMT
<UL>
<li>&lt;Possible follow-up(s)&gt;<br>
<LI><strong><A NAME="00119" HREF="msg00119.html">[MUD-Dev] Re: Terrain/Landmass &amp; GIF/BMP</A></strong>, 
John Bertoglio <a href="mailto:alexb#internetcds,com">alexb#internetcds,com</a>, Thu 08 Oct 1998, 04:47 GMT
</LI>
<LI><strong><A NAME="00121" HREF="msg00121.html">[MUD-Dev] Re: Terrain/Landmass &amp; GIF/BMP</A></strong>, 
quzah [sotfhome] <a href="mailto:quzah#softhome,net">quzah#softhome,net</a>, Thu 08 Oct 1998, 06:26 GMT
<UL>
<LI><strong><A NAME="00123" HREF="msg00123.html">[MUD-Dev] Re: Terrain/Landmass &amp; GIF/BMP</A></strong>, 
Marc Hernandez <a href="mailto:marc#jb,com">marc#jb,com</a>, Thu 08 Oct 1998, 07:47 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00122" HREF="msg00122.html">[MUD-Dev] Re: Terrain/Landmass &amp; GIF/BMP</A></strong>, 
quzah [sotfhome] <a href="mailto:quzah#softhome,net">quzah#softhome,net</a>, Thu 08 Oct 1998, 06:33 GMT
</LI>
<LI><strong><A NAME="00126" HREF="msg00126.html">[MUD-Dev] Re: Terrain/Landmass &amp; GIF/BMP</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Thu 08 Oct 1998, 14:08 GMT
</LI>
<LI><strong><A NAME="00127" HREF="msg00127.html">[MUD-Dev] Re: Terrain/Landmass &amp; GIF/BMP</A></strong>, 
quzah [sotfhome] <a href="mailto:quzah#softhome,net">quzah#softhome,net</a>, Thu 08 Oct 1998, 23:03 GMT
</LI>
<LI><strong><A NAME="00342" HREF="msg00342.html">[MUD-Dev] Re: Terrain/Landmass &amp; GIF/BMP</A></strong>, 
quzah [sotfhome] <a href="mailto:quzah#softhome,net">quzah#softhome,net</a>, Thu 22 Oct 1998, 08:19 GMT
</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>