How does Diablo build its maps?

I took a bit of time to try and look up how Diablo 1 loads or creates its maps – and I came up with nothing but tile graphics. I have to assume that when you use a stair to go to a level you haven’t been in yet, the progress bar is indicating that the game is generating the map from scratch. I used several tools to look into the Diablo MPQ datafile to try and find more information out, but I was unsuccessful. Without information or raw data, I had to look to other means of working towards building my own maps.

I have the thought now and again that I should really be trying to create my own content. Right now I can’t really support content I’m not ready to build, so it seems reasonable to borrow other content. That’s why you see me building a Diablo clone – it’s a good stepping stone to start off with. I’ve built mazes before, but never anything more complicated than a 1-tile-wide corridor maze. As I think on things, I could probably look up Rogue‘s level creation method, but since I’ve already done this much I figure I might as well see it through.

Getting back to the problem – I wasn’t able to find any information about how Diablo builds its levels, and there was no indication from the datafile how to go about it either. So I decided to take another approach – take screenshots of the automap and put them together in an image-processing program (I like Paint.NET). I wind up with images that look like:

diablomaplv1-200801180807.png

With enough of these, I can start to guess at the patterns and come up with my own builder. It’s a good idea, but the mashup above is awfully hard on the eyes. I wanted to filter out the non-map information, but I didn’t want to hand-edit the compiled image.. but how would I do that? I know GDI+ a bit, but I just wanted a quick-and-dirty solution that I know only one way of creating: Allegro. So I broke down and downloaded Dev-C++ and grabbed Allegro for it. After a bit of wrangling with C++ and a couple of recompiles, I handed my new tool the image and wound up with:

diablomaplv1-200801180807_filtered.png

Perfect! Now I can really get an idea of what the folks at Blizzard were doing.

It would really have been helpful for the guys at Diablo Evolution to have put something about the map generation somewhere on their site. These guys probably know more than anyone else about Diablo. They mention that some of the screenshots in the early days of pre-final Diablo were “impossible” and they could only know that if they knew how the maps were being built. I still have to dig some more before I decide to give up on that route, but for now I’ve got a good lead.

Advertisements

Tags: , , , , , , ,

3 Responses to “How does Diablo build its maps?”

  1. scratch map Says:

    Appreciating the hard work you put into your site and in depth information you offer.

    It’s good to come across a blog every once in a while that isn’t the same outdated rehashed material.
    Excellent read! I’ve bookmarked your site and I’m including your RSS feeds to my Google
    account.

  2. JSandusky Says:

    All 3 titles use geomorphs for dungeons (long standard from rpg mapping even on tabletop). D1 and d2 have the perk that they can easily choose whether to join adjacencies with openings or doors (ir not – because they’re 2d and have so little to fuss with).

    You’ll notice your example map is 3×3. Cathedral maps had a max of 9×9 (iirc) on hell diff and used a small number of fixed “base” layouts for the large rooms and halls.

    This way each series of levels had a very distinct feeling and were guaranteed to be solveable. Classic roguelike techniques are really terrible at the former.

    Endlessly tuning vs just authoring bits to glue together and having the generator link them together.

  3. Nik Says:

    Not sure if you’ve made any progress on this project or not.I’m curious as I’d be interested in a map generator for my tabletop games.
    Thanks.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: