Scroll Map
Description of ScrollMaps
ScrollMaps are like Maps, but of course there are some differences.
First, a
ScrollMap can only be displayed on the entire screen, while Maps can be displayed on a part of the screen.
But they are faster than simple Maps, and can be scrolled pixel by pixel, and not tile by tile. Moreover, they are toroidal, that is to say when you reach an edge of the map, the opposite edge is automatically displayed.
This is a disadvantage:
ScrollMaps have less functions than normal Maps. You loose the
space()
space()
function, so you cannot set the space between two tiles.
= Changing functions =
* Because ScrollMaps are displayed on the entire screen,
function, so you cannot set the space between two tiles.
- Because ScrollMaps are displayed on the entire screen,
ScrollMap.draw()
ScrollMap.draw() expects only the map to draw (with Maps, it expects coordinates).
* While
expects only the map to draw (with Maps, it expects coordinates). - While
Map.scroll()
Map.scroll() expects the number of tiles,
expects the number of tiles, ScrollMap.scroll()
ScrollMap.scroll() expects pixel values.
* The others functions (
expects pixel values. - The others functions (
ScrollMap.new()
ScrollMap.new(),
, ScrollMap.destroy()
ScrollMap.destroy(),
, ScrollMap.setTile()
ScrollMap.setTile() and
and ScrollMap.getTile()
ScrollMap.getTile()
) are unchanged
Finally,
ScrollMaps are better than normal Maps, even if you cannot set the space between the tiles. Speed display is certainly the better advantage. But if the full screen display bothers you, use simple Maps.