getButterfly Logo getButterfly

How to be the Dungeon Master using only JavaScript and CSS? James Edwards explains how. It would be a nice touch for a top-down RPG game like Dawn.

The essence of our maze script lies in our ability to create a three-dimensional perspective from a two-dimensional map. But before we can make sense of how the perspective works, we must look at the map — or, as I’ll refer to it from now on, the floor plan.

The floor plan is a matrix that defines a grid with rows and columns. Each square in the floor plan contains a four-digit value that describes the space around that square — whether it has a wall or floor on each of its four sides. As we’ll see in a moment, we’ll use a 1 or a 0 for each of the four digits.

Subscribe to getButterfly Blog

Once a week or so we send an email with our best content. We never bug you, we just send you our latest piece of content.

If you found any value in this post, agree, disagree, or have anything to add - please do. I use comments as my #1 signal for what to write about. Read our comment policy before commenting! Comments such as "Thank you!", "Awesome!", "You're the man!" are either marked as spam or stripped from URL.

3 thoughts on “Be The Dungeon Master

  1. This is a great idea. I have always thought that the Dungeon Master could do a much better job with some good computer tools. I would really like to see a full fledged program with a good user interface that would enable a DM to design and run a dungeon without having to know how to program. I think that this would be a product that people would be willing to buy. Do you know of any program like this in the works?

  2. @Not John, as for me I wish if I can find a program that can make me use it without knowing anything about anything, if you just know how much troubles I have in the programing things, I have a site that stuck in the middle with a designer and now I can’t continue somewhere else and I can’t even stop it,
    I need to learn a lot!

  3. Hey John, I saw a presentation of DnD 4. It’s really cool, it’s all computer-driven, and it’s really useful. Check it out on

    @Music Site, what site are you talking about?

Leave a Reply

Your email address will not be published. Required fields are marked *