TerraMapTerraMap

TerraMap is an interactive Terraria v1.3.2 world map viewer that loads quickly and lets you pan, zoom, find blocks, ores, items in chests, dungeons, NPCs, etc.

Try it now » View recent changes. »

Features

  • Completely read-only, making it completely safe to use, with no risk of corrupting or overwriting your world files.
  • Cross-platform, supports any modern browser on Windows, MacOS, and Linux.
  • Completely client-side JavaScript, meaning your Terraria worlds are not uploaded to any server.
  • Open your Terraria world files by browsing to the .wld file.
  • Interactive, smooth pan and zoom using the mouse.
  • Find and highlight ores, items in chests, Enchanted Swords, Shark Statues, Strange Plants, etc.
  • Find and highlight biomes such as Corruption, Crimson, Hallow, Spider Nests, Floating Islands, etc.
  • View the world's spawn and dungeon locations.
  • View the location of NPCs such as Merchant, Mechanic, Arms Dealer, etc.
  • View world properties such as name, version, revision, width, height, moon phase, orbs broken, altars smashed, etc.

Controls

  • Drag with left mouse button to pan.
  • Click with left mouse button to select a tile. Click the 'Selected Tile Info' panel to see the contents of chests, text on signs and gravestones, etc.
  • Use mouse wheel to zoom.

Top Toolbar

  • Browse/Choose File - Open your Terraria world .wld file.
    • Windows - C:\Users\\Documents\My Games\Terraria\Worlds
    • MacOS - /Users//Library/Application Support/Terraria/Worlds
    • Linux - ~/.local/share/Terraria/Worlds
  • Sets - A list of pre-configured sets of blocks (Corruption, Crimons, Hallow, etc). Click the dropdown menu, then click a set to highlight all tiles in the map that match.
  • Choose Blocks - Choose tiles, items, and walls to find or highlight.
  • Find Previous - Find tiles that match the options chosen in 'Choose Blocks', starting at the current selection, working backwards (bottom-to-top, right-to-left).
  • Find Next - Find tiles that match the options chosen in 'Choose Blocks', starting at the current selection, working forwards (top-to-bottom, left-to-right).
  • Highlight All - Highlights all of the tiles in the map that match the options chosen in 'Choose Blocks'.
  • Clear Highlight - Clears any overlay (selection or highlight).
  • Zoom To Fit - zooms all of the way out and centers the map.
  • Save Map Image - saves the map and any overlay (selection or highlight) to a .png image file.
  • Reload World - reloads the current world file, picking up any changes since it was first loaded.

Bottom Toolbar

  • A list of NPCs present in the world. Click the dropdown menu, then click an NPC to highlight them in the map.
  • A list of world properties (version, revision, size, defeated bosses, etc.
  • Information about the currently selected tile. Click a tile on the map. If the tile is a chest, sign, gravestone, etc, click the dropdown menu to view its contents and/or text.
  • Information about the tile the cursor is currently over.

Background Information

TerraMap uses only a single pixel and color for each block, tile, wall, item, etc. It does not use the game's textures. For that, I highly recommend the excellent Terrafirma.

It's built using JavaScript, JQuery, and Bootstrap. It uses Web Workers to do processor-intensive work in the background to improve responsiveness and performance.

I experimented with several different approaches to drawing, and finally ended up using HTML canvas 2d context fillRect method, which is the fastest method on Chrome, my current browser of choice.

This was an education exercise for me. The only real improvements I made over Terrafirma are the combined block/tile/item search, allowing you to search for items in chests, the incremental search forward/backward, and UI improvements.

I referenced the Terraria .wld format documentation provided by Terrafirma to read the world data. Sean definitely did a great job at reverse-engineering and documenting the format. Portions of TerraMap code were adapted from the source code for TerraFirma and TEdit. I also used ILSpy to peek at some of the Terraria game code.

I used the excellent jquery.panzoom for pan and zoom functionality.