You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, we keep the whole map structure, three times. But those consists, in most part, of useless or unused data.
For example, the map have 200x15 tiles, x2 layers, plus x1 locked flag. Even if the tile is not set to use any graphic (-1, -1), or the terrain is not locked (0), we are putting that information on memory.
To improve this, we could create a map that uses X and Y as key, and store only the entries that contains any information. A function fo acess the map will check if key does not exist, and, in this case, return the default values (-1, -1 for tile and 0 for locked).
The same could be done to the tileset, so we store each tile in memory and only the used ones for that map. This will allow us to increase the tileset image size without having to increase memory use for each stage.
The text was updated successfully, but these errors were encountered:
Right now, we keep the whole map structure, three times. But those consists, in most part, of useless or unused data.
For example, the map have 200x15 tiles, x2 layers, plus x1 locked flag. Even if the tile is not set to use any graphic (-1, -1), or the terrain is not locked (0), we are putting that information on memory.
To improve this, we could create a map that uses X and Y as key, and store only the entries that contains any information. A function fo acess the map will check if key does not exist, and, in this case, return the default values (-1, -1 for tile and 0 for locked).
The same could be done to the tileset, so we store each tile in memory and only the used ones for that map. This will allow us to increase the tileset image size without having to increase memory use for each stage.
The text was updated successfully, but these errors were encountered: