Free Gamer Blog plug

qubodup has plugged OSARE over at the Free Gamer blog. Sweet!

Map Loading

Collecting my thoughts on map loading. The following things have to occur to dump an old map and load a new one:

  • User steps on a tile tagged with an event.
  • A flag is set to load a new map, with the new map filename and position taken from the triggered event.
  • GameEngine needs to check for this flag because it is the parent of the following objects.
  • MapIso::load(filename)
  • EnemyManager::handleNewMap() // add function to remove all enemies
  • HazardManager::handleNewMap() // add function to remove all hazards
  • Add logic to TileSet: if we already have the correct tileset we shouldn’t reload it.
  • Set the Avatar (x,y) to the trigger event’s destination (x,y).
  • Change MapIso and TileSet to interpret tile indexes as hex 00-ff instead of dec 00-99
2010/04/29

Leave a Reply

Your email address will not be published. Required fields are marked *