The Great Mapper Rewrite

Since nearly the beginning of Dave’s Mapper, a vocal few had been requesting separate options for dungeons, caverns, and mixed maps. For the longest time, that was really not feasible. The original mapper code had been based on a single JavaScript array, then additional arrays for city tiles, edges, and corners. It was a fine system for a bunch of tiles by one cartographer, but for this large-scale app it was beginning to be a major pain.

Recently, I started to have thoughts about the huge size of those arrays: how they’d affect performance, browser array size limits, ease of updating them, and so on. I knew it would be time to move to a database system. I won’t get into boring specifics, but over the last month or so I’ve been working on creating the database tables, populating them with data, and writing PHP and JavaScript to interact with the data in this new way.

The results so far are underwhelming. Many will see little to no change, and possibly a bit more lag in generation than before. That part I’m kind of sad about, but the ability to separate dungeons, caverns, and mixed maps is now here, which no doubt pleases some of the people who were waiting on that feature. Additionally, this new system opens the door for many, many new things, which I wanted to take the time to mention so everyone knows what I’m up to for this app:

  • Dungeon/Cavern Exits: The ability to remove a tile already exists, but under the new system I’ll be able to let you choose specifically if the replacement tile has an exit to the dungeon or cavern.
  • Cartographer Profiles: Profiles with cartographer bios, links, a tile gallery, and more information on their projects. Think of it as a nice expansion on the Supporters page. Plus, this will ideally encompass a login system for cartographers to facilitate editing profiles and uploading new tiles to the mapper.
  • Better Export to PNG: The new system will allow me to rewrite the export to PNG system with shorter URLs and potentially larger maps. (Maybe.)

Additionally, the new system really allowed me to clean up the JavaScript, which will make it easier to add support for side-view geomorph tiles – especially handy given my recent artistic endeavors and those of a variety of cartographers in the community.

3 Responses to The Great Mapper Rewrite

  1. Currently, does the “D&C mixed” option only show tiles that have the mix (which is what I think is happening) or does it provide all three types of tiles (Dungeons, Caverns -and- Mixed tiles)?

    • There’s a hook in the system for that option so that all three tile types are present in the mix. Also, the first two options do not contain any of the mixed tiles; only the mixed option does.

Leave a Reply

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