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
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)
The text was updated successfully, but these errors were encountered:
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)
The text was updated successfully, but these errors were encountered: