From 5610d25b1125435f68d2a5a3bf7cbea32dbf5b78 Mon Sep 17 00:00:00 2001 From: Rangi Date: Sat, 27 Oct 2018 22:18:35 -0400 Subject: 1300 --- Add-a-new-map-and-landmark.md | 8 ++++++++ screenshots/outdoor-sprites-improved-vram.png | Bin 13239 -> 13292 bytes screenshots/outdoor-sprites-vram.png | Bin 15029 -> 15080 bytes 3 files changed, 8 insertions(+) diff --git a/Add-a-new-map-and-landmark.md b/Add-a-new-map-and-landmark.md index 966da9f..d6bb8de 100644 --- a/Add-a-new-map-and-landmark.md +++ b/Add-a-new-map-and-landmark.md @@ -53,6 +53,14 @@ Now create another new map, 9 blocks wide and 6 blocks high, using the `radio_to Save that as **maps/GlobalTerminal1F.blk**. +When you're designing maps, keep their size below this limit: + +(*width* + 6) × (*height* + 6) ≤ 1300 + +The current map's block data gets loaded into WRAM at the address `wOverworldMapBlocks`, which is declared to have 1300 bytes in [wram.asm](../blob/master/wram.asm). This buffer gets padded on all sides with an extra 3 blocks to load the edges of any connected maps. + +It so happens that a 30x30 map will neatly fit into this limit, since (30+6)×(30+6)=1296. However, keep in mind that the official maps are usually designed with the width as a multiple of 10 and the height as a multiple of 9. For example, small towns are often 10x9; large cities are 20x18; routes may be 20x9, or 10x18, or 10x45, or so on; National Park is 20x27; et cetera. + ## 3. Define a map constant diff --git a/screenshots/outdoor-sprites-improved-vram.png b/screenshots/outdoor-sprites-improved-vram.png index 8a9d29e..cdaffcb 100644 Binary files a/screenshots/outdoor-sprites-improved-vram.png and b/screenshots/outdoor-sprites-improved-vram.png differ diff --git a/screenshots/outdoor-sprites-vram.png b/screenshots/outdoor-sprites-vram.png index edd3eae..4e719d5 100644 Binary files a/screenshots/outdoor-sprites-vram.png and b/screenshots/outdoor-sprites-vram.png differ -- cgit v1.2.3