Getting started

The best way I found to begin designing a map is to use a sheet of graph paper. Decide on the dimensions and draw the outer walls and write in the coordinates across and down starting with 0.

Here is the current starting map in the game.

Hand drawn map.

Note that the coordinates use row then column so when you say 15,5 it means row 15, column 5.

In the future I'll build a map designer but for now the only way to create maps is write the map information into a text file. See the map file specification. Usually I work by entering the data row by row. Remember that you can leave out coordinates which are considered blank spaces. Start by taking an exiting map file. Copy it and save to a new name. Then clear out the Data section and modify the General and Defaults sections.

A note about angled walls. Currently an angled wall is considered a block - you can't walk into a square with angled wall. When designing a map remember to space your angled walls out otherwise you won't be able to traverse that area.

Make sure to save you map file to the maps folder.

Linking Maps.

Let's add an exit to a new area on the western wall of this main map. A good spot looks like 14,0. I'll assume you named your new map "MyMaze.map".

The main startup map is maze1.map so lets edit that one and give 14,0 a west facing door. Currently 14,0 looks like this:

    14,0=100100

So let's make the west wall a door.

    14,0=300100

Now we need to specify that this door leads to a new area. Check if there's a section called 14,0. If not we'll add one.

    [14,0]
    ExitWest=MyMaze.map,14,15

What this section says is that at 14,0 there's an exit west leading to MyMaze.map to coordinate 14,15.

Often you'd want to make the door lead back. In order to do that edit your map file and put an east facing door at coordinate 14,15 to lead back. Example:

    14,15=100300
    ; Later after the Data section
    [14,15]
    ExitEast=maze1.map,14,0

That's it! One area is connected to another.

Placing Shops

There are a variety of shop types availaible in the game and each shop type can be specified as a section in your map file. For each shop you need to specify the shop's name, the proprietor name, the store hours and the location. See example:

    [Tavern]
    ShopName=Smiley's Tavern
    ShopOwner=Smiley
    Location=15,9
    Schedule=12,2

In the above example we have Smiley's Tavern at 15,9. Smiley is always happy to greet adventurers between 12 PM and 2 AM.

Currently the Schedule propery can support a start/end time or be blank (which means open 24/7). Notice that if the start time is greater than the end time then it means from PM to AM. If you had for example 9,17 - that would mean 9 AM to 5 PM. But if it was 9,5 then it means 9 PM to 5 AM.

NOTE: Sections need to be unique so if you want more than one of the same shop in the same map, simply add a number to the section name to make it unique. For example:

    [Tavern1]
    ShopName=Smiley's Tavern
    ShopOwner=Smiley
    Location=15,9
    Schedule=12,2

    [Tavern2]
    ShopName=Fred's Tavern
    ShopOwner=Fred
    Location=16,9
    Schedule=12,2

Placing Combat Encounters

To create Encounters with monsters use Encounter sections. Example:

    [Encounter0]
    Description=As you step through this door you hear a low growling sound.
    Monsters=2;4,1;3,3;2
    Location=0,12

See the encounters section for details. Currently the treasure screen is not implemented.

Using Scripts

Scripts allow you to add interactive content, stories and puzzles to the game. Scripts are defined in the map file. Example:

    [Script]
    7,7=townHall

This says that at location 7,7 of the map a script called "townHall.js" will be run. Scripts are located in the scipts folder under the main game folder. In order for the game to find the script you need to make a sub folder which matches your map name (case sensitive) and place your scripts there.

The example above is from maze1.map so the script file is found in scripts/maze1/townHall.js

See the Script API documentation for details.