[MUD-Dev] The Endeavour Map and MUD Applications
jb at pulsepoll.com
Wed Feb 16 15:42:12 New Zealand Daylight Time 2000
> Michael Hohensee
> Sent: Wednesday, February 16, 2000 8:29 AM
> For those of you who haven't yet heard, the Space Shuttle Endeavour has
> been engaged in making an extremely high resolution map of the Earth
> from orbit. (see http://www.spacer.com/shuttle ) These maps are more
> uniformly accurate than any made before, as can be seen here:
[long intro to explain the background of the mapping issue]
I have been meaning to share this idea with the group and this post reminded
me of it. I wanted produce a graphic map from a world database by assigning
a color value to each pixel based on the corresponding value stored in the
table. I wanted to produce terrain, elevation, river and city map graphics.
Sometime ago, I asked the list about graphic file formats which could be
written in an ASCII (as opposed to binary) format so I could accomplish the
same goal. I got a lot of help with the best alternative turning out to be
the PPM format (for which I again thank the list). This format is very
simple as it defines each pixel as an RGP triplet with a header that
determines the overall size. The problem is the graphic editor I am most
familiar with (PhotoShop) does not directly support the format so I tabled
the idea. Recently, I purchased a copy of PaintShopPro which does support
PPM files so the idea resurfaced.
Since I completely rewrote my HTML-based Mud to take advantage of the new
technology we are using at work, I started with a clean slate. It became
quickly clear that I was taking the wrong approach. The world was built
using HTML tools to craft the terrain, cell by cell and region by region.
The graphic map would be generated by looking at the data entered in this
It became obvious that there was a much better way to do this. I reversed my
original idea. The key was to build the graphic map of the world using the
PaintShop tools and its ability manage layered graphics. By using a defined
16 color pallet, the elevation or terrain or anything else could be coded by
using the different colors. First you create the water by using a single
blue color on a file of, say, 1200x800 pixels. This creates an instant water
world with about a million locations. Then you draw the land masses with the
color which represents sea level. You now have your base graphic. This is
cloned and applied on top of the base. You then take the new level and edit
the elevation levels.
You save the file as a PPM file. A program that parses each pixel of the
graphic creates the initial world, exits from one location to another and
defines the elevation.
You clone the base graphic again and define a new color palette which
represents the dominant terrain of each region in the world. Now, you put
this new layer over the original two. You fade the terrain graphic in the
background and use it to provide a guideline for the terrain types. For
example, you would not specify a high mountain range as being primarily
swamps or farmland. Again, you save the file as a PPM and parse it into the
system, this time updating each cell with the terrain information.
You want to define major river systems, take the elevation map as a
background (so you can put the rivers in logical places) and draw the rivers
on the new layer. Parse and each cell with a major river has that added to
its characteristics. The program creates gateways which link the river
locations so if a player is navigating rivers, those options can be shown as
The same can be done with cities, towns, villages (use dots of different
color), roads and major terrain features like ore deposits, oasis, etc.
The cool thing about this method is that it can work both ways. You can take
the data in the world database and modify or create new graphical maps of
the world. Let's say you allow the world to "discover" the mineral wealth of
each region based on the first time a player prospects in the area. You
could build a mineral overlay for the world map marching cell by cell and
creating new graphic. Each cell is checked to see if it has a minerals above
a certain criteria and what mineral has the highest density. Put the mineral
layer on top of either the blank world or the elevation map and you have an
instant map of mineral wealth in your world. Save it a JPEG or GIF (despite
legal problems, still the best web format for line art) and you have a nice
web-viewable map. Cut up parts of it and you have a mineral map for a
region. Offset the pixel locations randomly in two dimensions and put a 5 to
7 pixel square or circle on the map and you have a map with the approximate
locations of minerals for the adventurous.
If you want to "salt" areas whose random resource generation makes them
uninteresting, simply define a new pallet with slightly different colors
(say, one rgb value) and start clicking dots. Reprocess the graphic and now
the world has additional resources. Run the mineral map program again and
now the new resources are included.
This is kind of the ultimate GUI editor. Draw a picture, get data.
Thought someone would be interested.
John A. Bertoglio
| jb at pulsepoll.com <mailto:jb at pulsepoll.com>
> MUD-Dev maillist - MUD-Dev at kanga.nu
MUD-Dev maillist - MUD-Dev at kanga.nu
More information about the MUD-Dev