Sunday, June 22, 2014

[MMc] OpenHeist maps specified

Maps and tile sets now have an API and parsers. Maps consist of multiple elevations. Each elevation has two layers: the "floor" under characters, and the space in which they can move (or not, if there are walls!)

Maps are drawn in a text editor using two characters for each grid cell:


The numbers running along the top and left edges are required. They let the engine know how big the map is and help the map designer when editing.

Because different games will need different per-cell properties, the map cells are all subclasses of heist::CellBase that are created by whatever function is registered as the server::App::cellFactory. These are server::Cells by default. When a cell is changed on the server, it automatically sends a message to the client notifying it.

The map, tile set, and tile parsing code is all implemented and compiling but not connected to the loadMission function. Once I have connected those and made a first pass at rendering the tiles you will be able to see your maps in-game. I recommend making maps and tile sets now based on the examples so that you can debug them once the renderer is connected.

No comments:

Post a Comment