Map Page

Map page contains a grid of images (generally forming a map) which can be revealed as the game proceeds.
Every cell of the grid is a label widget named map_x where x is the ID number of the cell. It can contains an image representing a part of the whole game map.
 
6.3.1.7.1.5. Map Page
1

map_0

1. map_0
<TODO>: Insert description text here...
 
The map page is recognized by the player with the name "inventory_map".
 
The "inventory_map" container contains a clipview named "inventory_map_panel". This name is necessary to make this element to be recognized by the Player.
Generally the "inventory_map_panel" is a clipview containing a frame which contains the map pieces.
The frame must be named "inventory_map_frame" to be recognized and managed by Player.
 
Following image shows how the map page must be structured to be managed by Player:
 
This structure is necessary to allow the map to be bigger that the screen: the clipview has dimensions less than the screen while the frame it contains can have dimensions greater than the screen.
Then the map frame can be scrolled using, by default, the A/D and W/S keys.
When editing a map greater than the screen, and, in general, every widget container that is greater than the screen you can scroll the UI to edit by moving the mouse and holding the Right Mouse Button.
 
 
 

HOW IT WORKS
 
There are a lot of games in which not all the map is visible at start, it is gradually revealed as the game proceed.
The map system in EasyGamePack has been designed with this in mind.
 
But, how to reveal map pieces?
Player character automatically shows a map piece when receiving the message "MAP_X" where X is the ID number of the map cell to show.
 
In this way you can:
  • Use a eventSwitch to send the MAP_X message when player, for example, press a button or opens a door, etc...
  • Use a eventTrigger to send the MAP_X message when player enters a given area.
  • Use an itemTAG that sends the MAP_X message when player pick-up a give item.
  • Use a eventTimer that sends the MAP_X message after a given amount of time
  • Use a Counter that sends the MAP_X message after a given number of objects are destroyed (for example enemies killed)
  • Directly send the message in a GameMachine using the sendMessage action.