<!-- MHonArc v2.4.4 --> <!--X-Subject: [MUD-Dev] Re: Terrain/Landmass & GIF/BMP --> <!--X-From-R13: [nep Vreanaqrm <znepNwo.pbz> --> <!--X-Date: Thu, 8 Oct 1998 00:47:11 -0700 --> <!--X-Message-Id: Pine.LNX.3.93.981008002223.15612A-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 & 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> [ <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="msg00122.html">Previous</a> | <a href="msg00124.html">Next</a> ] Thread: [ <a href="msg00121.html">Previous</a> | <a href="msg00122.html">Next</a> ] Index: [ <A HREF="author.html#00123">Author</A> | <A HREF="#00123">Date</A> | <A HREF="thread.html#00123">Thread</A> ] <!--X-TopPNI-End--> <!--X-MsgBody--> <!--X-Subject-Header-Begin--> <H1>[MUD-Dev] Re: Terrain/Landmass & 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 & GIF/BMP</LI> <LI><em>From</em>: Marc Hernandez <<A HREF="mailto:marc#jb,com">marc#jb,com</A>></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. }>> (For rivers I plan on using heuristics for getting from point }>> A (river source) to point B (river mouth) but I haven't looked }>> at it too in depth. Finally I believe I have managed to locate }>> the actual formula for "A*" so I may see what I can do with it }>> at a later date.) }>I'd certainly be interested in seeing this if you have the possibility to }>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 :-> (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 } }>Hmmm.... Seems to me that if you want to encode *all* the information in }>the map in a single picture, you'll get a very messy one. That is, it will }>be very hard (just as hard as with your ASCII output) to get a feel for }>what the map looks like. You can simply *not* encode all the data fields }>in those 20 bits (some of which are heights, others which are resources, }>and so on, I take it?) and make it useful for a human reader ("so, okay, }>um, a lot of green mixed in with a little red should mean high altitude }>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. }>As for graphics formats... The format that strikes me as the simplest is }>plain BMP (the Windows incarnation, that is). However, other posters have }>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 & GIF/BMP</A></STRONG> <UL><LI><EM>From:</EM> "quzah [sotfhome]" <quzah#softhome,net></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 & 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 & GIF/BMP</A></STRONG> </LI> <LI>Next by thread: <STRONG><A HREF="msg00122.html">[MUD-Dev] Re: Terrain/Landmass & 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 & 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><Possible follow-up(s)><br> <LI><strong><A NAME="00119" HREF="msg00119.html">[MUD-Dev] Re: Terrain/Landmass & 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 & 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 & 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 & 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 & 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 & 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 & 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> [ <a href="../">Other Periods</a> | <a href="../../">Other mailing lists</a> | <a href="/search.php3">Search</a> ] </center> <hr> </body> </html>