Map Screens

This cart demonstrates how to have different map screens that follows the player around the map. It is heavily commented so you can pull apart how this is being achieved.

Notes: The basic idea is that the camera is usually pinned to 0,0. We also track which 16x16 section of the map the player is standing on, and pin the camera to show that section of the map.

This code is based off the Map-Based Grid Movement cart, but this will also work with pixel-based movement without any real code changes.

Published 24 days ago
StatusIn development
CategoryOther
PlatformsHTML5
AuthorMBoffin
GenreEducational
Made withPICO-8
Tagsfantasy-console, PICO-8, sourcecode

Install instructions

Save this file to your PICO-8 carts folder. Then load it by typing load map_screens in the command line mode of PICO-8.

Download

Download
map_screens.p8.png 9 kB