Skip to content

Maps and Tiles

Henri Asseily edited this page Mar 4, 2022 · 4 revisions

Maps

All maps are 64x64. The visible map area is 9x9, centered around the player. The player hence only sees "4 tiles out".

Overland

In the overland, whenever the player reaches 5 tiles before the edge of the map, the next map is loaded. The maps overlap by 9 tiles at the borders, so map loading makes the movement seamless in the overland.

The overland is comprised of 16 x 16 maps, each 64x64. That's a massive size, but the vast majority (80%+) is 100% water. There are 16 "continents", each a 4x4 area of the total overland. Out of the 16 maps per continent, the largest landmass is the starting continent which has 3 maps of land. Every other continent has a maximum of 2 maps of land out of the 16.

Towns

Towns are single 64x64 maps. They use the same tileset as dungeons.

Dungeons

In dungeons/towers, each 64x64 map is further divided into 4 quadrants of 32x32. Each of these quadrants is a level. Therefore, levels 1-4 are one map, 5-8 another, etc...

There is no seamless moving in dungeons/towers, as every quadrant is bound by walls that can neither be crossed nor seen through. The only way to move from map to map is through stairs, traps, or other teleporters.

Tiles

There are 2 tilesets in the game. One is for the overland, the other for the dungeons. The game swaps between them as necessary as you go through areas. Note that the dungeon tileset has a some garbage tiles that probably hold game data. I haven't investigated them.

Overland tileset Dungeon Tileset

The active tileset is at 0x4000. The inactive one is at 0xDD00. Each tileset has 64 tiles (not counting monster tiles). Each tile is 14x16 pixels, which is standard for Apple 2 tile-based games such as Ultima. The reason for the non-square tiles is that every pixel byte on the Apple uses the last bit for color information. Each row of 14 pixels is encoded in 2 bytes, and the tiles are 16 x 2 = 32 bytes each.

TELEPORTS

Each 64x64 map in Deathlord can have a maximum of 8 teleports. Dungeons that have 32x32 levels have 4 levels per map. The teleport data for a map is loaded in 5 fixed 8-byte arrays. Each teleport is a unique index. A value of 0xFF in an array means disabled:

constexpr UINT16 MAP_TP_FR_X_START = 0xA60;      // Teleport from, X value, start of array (length 8)
constexpr UINT16 MAP_TP_FR_Y_START = 0xA68;      // Teleport from, Y value, start of array (length 8)
constexpr UINT16 MAP_TP_TO_X_START = 0xA70;      // Teleport to, X value, start of array (length 8)
constexpr UINT16 MAP_TP_TO_Y_START = 0xA78;      // Teleport to, Y value, start of array (length 8)
constexpr UINT16 MAP_TP_TO_LEVEL_START = 0xA58;	 // Teleport to which level? Start of array (length 8)
Clone this wiki locally