Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement json level loader #33

Open
Abe404 opened this issue Feb 27, 2012 · 0 comments
Open

implement json level loader #33

Abe404 opened this issue Feb 27, 2012 · 0 comments
Assignees
Labels

Comments

@Abe404
Copy link
Contributor

Abe404 commented Feb 27, 2012

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)

@ghost ghost assigned Abe404 Mar 1, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant