LeedsJs/jackdaw — Issue #33: implement json level loader
Author: Abe404
Created: 2012-02-27 02:55:33+00:00
State: open
Labels: task

Now the behavior and logic has been moved into the components, the levels main purpose is to declare and update entities. The level data could instead be expressed in JSON which would allow for a more flexible system and open up possibilities such as level generation from custom algorithms or a level designer.

A generic loader could be written which loads the JSON data, creates the level and updates the entities.

/lib/levels/Level_002.json shows how level 2 could look as JSON.

The loaders tasks would include:
* loading any components implemented by entities
* creating entities from the level data
* updating the entities on each update
* removing each entity and attached components correctly when the level ends

updating the renderer? (or perhaps this should go somewhere else as the components deal with the renderer directly)