Posts Tagged ‘Maps’

Using Dwarf Fortress to make a regional map

October 15, 2009

Bay 12 Games is basically one programmer creating awesome things every day. He used to be a mathematician but turned to game programming full-time and is supported by community donations.

Dwarf Fortress is an ASCII game, a roguelike, but a rather different one. You randomly generate a whole continent with mountains, rainfall and drainage, coastlines, etc. Then it generates a history with multiple civilizations where people live and die, deforest the areas around their towns and build roads, and send armies against each other. 200 years or so later you can play in the world with an adventurer or embark on a small site with seven dwarves to build a fortress. Hence the title.

The worlds created are diverse and beautiful. It does not look repetitive in the slightest. Every place you could choose to embark, on every generated world, will look very different. Although if you embark in the middle of a forest you should expect it to look a little bit boring. But it’s still more interesting than I would have come up with. And there’s the trick. You can export the world map you generate as a .bmp, convert it to .png, then edit it to get a world map.

Raw map output: This is what the game looks like on the world map, incidentally, though on the local level you’re dealing with individual dwarves and stone mugs instead of whole mountains.
Mostly done painting: I opened the image in Paint, shrunk it a bit, then started painting. This is what it looks like almost finished.

It helps to play the game a little to identify what each symbol means. The two wavy lines could be water, sand, or magma. But on the world map you don’t see magma. And if it’s blue, it’s definitely water. If it’s red or yellow it might be sand, but if there are rivers flowing into it it’s almost certainly a body of water. Why are the colors funky? The color includes the alignment of the region. Purple areas are haunted. The red and yellow seas are full of skeletal fish and zombie whales. Did I mention how great this game is?

My method was to start with a palette. I stole mine from the old Greyhawk map. Then I made map icons like hills, desert, etc. that look like the Greyhawk map.

Then using the paintbrush (circular dot 4 or 5 pixels wide) paint the border of the water leaving the coastline intact. Smooth the stroke a little as you go so you’re not drawing a bunch of jagged squares. When you have the body of water outlined, paintbucket the black spaces between symbols. Then use the filled square tool to block out large sections of symbols. Go back around and clean up the edges with the largest size paintbrush.

After that, do the mountains. The high mountains (solid triangle) I had a separate mountain image for, so I left those magenta for later change to mountain-brown. The low mountains (sort of a hollow triangle with squished-in sides … I cannot find the ASCII symbol!) I outline at this stage with the brown.

Now you can look around and pick out the forests. At this point I decide whether the forest will be deciduous, evergreen, bamboo, or jungle. I base my decisions on whim and proximity to other terrain, but you could try to remember what each tree symbol means if you wanted. Then I do hills all around – I have a “dry hills” and “green hills” here. But my “green hills” use the same color as the deciduous forest, so I use a nasty bright green placeholder until I get the map symbols in.

Sand is, as I said, the same two wavy line symbol as water. It can be grey or dark grey too. But the “square root” symbol and V / U are used for deserts and badlands. I don’t make a distinction yet, but will later.

The quote marks, lowercase “n”, period, comma, and weird little “y” shape are usually plains / grassland. But based on color and position they could be tundra or desert. This is why you kind of need to play the game to understand the map.

The solid blocks at the north end are glacier. Blue lines are rivers, brown lines are roads. I leave these alone until the end when I can draw in more winding, natural-looking roads and rivers.

The Pi symbol is a goblin fort. The yellow town symbols are elves. The Omega symbols are dwarves. The # and * are humans. Other map symbols that I left alone are usually ruins.

But there’s a good question. Why would you go through this much effort? Well, check out the complexity and general awesomeness of the edited map. I couldn’t come up with that on my own, it would look like I drew it. This has the impartial and realistic feel you get from copying an old Dutch map.
And you can set world generation variables. Want higher mountains? More erosion? Less drainage? More volcanism?

Right now you may look at this as too much work. And maybe it is. I know I’m getting burned out and I’ve done only a few of these maps. But keep an eye on Dwarf Fortress and its programmer Tarn Adams. One day you may be surprised at what the world generator will spit out.

And you know what? I feel like an idiot. You can use a custom tile set for the game. Why didn’t I just replace the tile set to one that had the images I’m replacing them with?

Because I’m working alone and if I were in a team someone would have pointed out how much time I was wasting :/

I’ll post an update when I can speed the process up a bit more.


October 5, 2009

Undermountain is a large module, a mega-dungeon, placed below a seaside metropolis called Waterdeep in the Forgotten Realms. The original boxed set (including the first three levels of the dungeon) always fascinated me, partly because it was the only mega-dungeon I had read.

The level maps are on poster-size paper, the squares representing 10′ of space are tiny. It’s really quite large. That’s one of its problems. The DM can’t hide the map (which does show secret areas and such) and it’s hard to handle behind the screen. I’ve seen one DM use black construction paper to hide sections of the map from players but that doesn’t hide the secret doors and marks in the keyed rooms.

That’s a second problem: the dungeon is not entirely filled-out. The central, or core, areas are detailed but the outer areas are not. Only about a tenth of the dungeon’s space is keyed. And these outer areas are often bland or stupid-looking, as if the cartographer just needed to fill up the space with something and it didn’t matter whether it was good or not.

But Undermountain drew me in because of its promise. It was not a dungeon you could clear out, or “finish”. It was just too big. And it had a reputation. And it could contain everything from horror to whimsy because of its background.

So I decided to make my own version of Undermountain. Not only to make my own maps and rooms, but to change what was already there so people who had played it before would discover pleasant (and some not so pleasant) surprises. I decided I needed an outline for each level, level maps, random encounter charts, and room descriptions. And then it would virtually run itself!

Internet Research followed. For a DM, Internet Research is a cunning euphemism for “finding someone with ideas and stealing them”. I’m not publishing this turkey, why should everything come from my head, right?

My outline gave me some cool ideas for Level 1 all the way down to Level 7. You might not think much of this, only seven levels, but the levels were widely spaced and there would be sub-levels between. In all, we’re talking about a depth of 2100 feet. The outline also defined the size of a level. I decided to base my level size on 4 square per inch graph paper, 8 x 11 inches. 10′ per square. So one sheet would cover 32 squares by 44 squares. Each level was five sheets by five sheets. They were labeled like Excel cells, with letters across the top and numbers down the side. Each section had multiple connections, many secret, to neighboring sections. I drew sewer grate style small tunnels between rooms, water pipes, etc. The dungeon was 1600′ by 2200′ per level. Almost a square mile of mapped 10′ squares not counting sublevels, of which there could be 2-3 between each pair of levels taking up one map page per sublevel.

The original Undermountain Level 1
(The original, 155 squares across)

25 page (5x5) DM map of Undermountain level 1
(Mine, 160 squares across)

Lots of mapping. In MS Paint. Each 10′ square was 18 pixels across plus a 2-pixel border. A square owned its side of the border, so effectively each square was 20 pixels wide unless there was a wall. Walls were a full 2 pixels wide. Ledges were only one pixel wide.

I actually made it through mapping Levels 1-3 and then started keying rooms. The core rooms I mapped closely to how they appeared in the boxed set. Their descriptions were slightly altered. For example, in the hall of mirrors, instead of expecting someone to come by and fix the mirrors occasionally, I had the shattered glass melt and evaporate and the frame grow new glass like it was a sheet of crystals. And the space behind the 10′ square frame was a 10′ cube room which could hold just about anything. It was a pretty tight little ambush room, though they never got ambushed in it. Oh and one randomly-shuffling mirror at a time would grow a Mirror of Opposition and another would grow a random magical mirror, which might be beneficial if you looked into it.

Anyway, my Internet Research scrounged up one excellent resource. A guy (I know, [Citation Needed], right?) had detailed many of the rooms on the original Undermountain map for Levels 1 and 2. Many of the room descriptions were too transient and were more like encounters, so I tore them apart and used ideas for my encounter lists. But many were good tricks and ideas.

I found a riddle forum that was an excellent source of inspiration for tricks and traps. various netbooks, mostly full of dreck written by simple folk, but with some gems. Architectural sites, news articles, travel documentaries, etc. It was all fuel for the growing monster that was Undermountain. And of course every thing I came across sparked some little bit of inspiration in me. I was carrying a notebook at the time and would jot down anything interesting.

So it came time to actually choose which rooms would be keyed to which descriptions. The Word doc holding my rooms became too slow to open and save, so I split them up by level. That held off the inevitable for a short time. I realized that my numbering scheme of 122 for Level 1, Room 22 wouldn’t work because I had far more than 100 rooms per level. I decided number/letter for the level and for the two-digit room code would be enough for the levels (1-9 then A-Z giving me 35 levels) and for the rooms (Room 34, Room A9, Room ZD, etc. giving me something over 1,000 rooms per level).

I keyed about a third of the rooms on Level 1 and a quarter of Level 2 and 3 each. It was important to me that there be empty spaces between exciting adventure rooms. I mapped but did not key in about half of Level 4 and small parts of Level 5. But I had plenty of room descriptions that I wanted to put there eventually.

So why did it abruptly stop? It was every other weekend swapping with another campaign, some players could only play every other week, and they wanted to play in the other one. Partly because I was running it as a playtest of an earlier version of Game XYZ and they didn’t enjoy it as much.

(It was entirely feat-based, classes gaining a feat every level, but almost all feats could be taken up to 5 times for broader and more intense effect)

So lesson learned! Make a simple playtest module and let them concentrate on the system for a couple sessions instead of the adventure. Not a dungeon with 60 pages of terse 10-point text for Level 1.

Harnessing the Google Maps API

October 2, 2009

A friend and I were talking about how to handle mapping a big RPG world. He’s big on world-building and storylines, and takes pleasure in crafting the broad strokes down to the smallest detail.

We concurred that a digital map is better than a hand-drawn map. Vector art is more scaleable but not strictly necessary. Freeform is preferable to cell-based (discrete hexes or squares). But what program to use? Paint.NET is a decent free alternative to Photoshop. And I’ve found that when opening a single-layer .PNG image in MS Paint and then in Paint.NET, the latter uses a lot less system resources than the former.

(I typically draw everything in MS Paint)

But the most relevant feature of Paint.NET over MS Paint is that you can choose a zoom level, which means you can set a scale of one pixel to one foot and zoom out to start painting in coastlines and mountain ranges. When you want to detail an area, zoom in to the scale you want and start painting details there.

And then I had an interesting thought.

What about using the Google Maps API with your own digital map sections? You can use the elevation / terrain / road overlays. I doubt anyone would want to go through the effort of a sattelite overlay but it’s possible. You could set up a search database of locations with longitude/latitude coordinates. You can reverse-search for a location by clicking the map and finding the nearest keyed location.

I saw a small implementation of this on a college campus website. The explanation under the full-feature Google API map was that they used their own images and did not access Google’s maps at all. So it’s possible. I don’t know how much work is involved.

You’d need to draw the maps and upload them, tell the API where to look for it, key your locations in the database, set up a protected wiki for further information on keyed locations and regions, and install the API in the wiki so it’s accessible on every page.

I’m not so sure this would help a tabletop game. I’ve come to be less a fan of laptops at the table. They have their uses, but I find I interface with the computer too much when I should be connecting with the players. For a PBEM or online gametable this would be an invaluable resource. For a pickup-group West Marches campaign the players could be given account-based rights to annotate the map or even edit map sections.

The search for tutorials continues.