Chringo / SSP

Large game project at the Blekinge Institute of Technology

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Figure out a solid solution exporting logic from editor and importing it to ssp

Chringo opened this issue · comments

In SSP, entities communicate with each other by being subjects and observers. A lever, button or any other trigger entity is the subject for other entities. These other entities are observers to this entity and are added to the subjects' list.
Hypothetically in the editor, entities are linked with each other with a tag index. Entities that should observe an entity such as a button has the same tag index as the button. It's believed that the tag index is used only in the editor and in the process of importing a level which happens in level state.

Hypothetically in SSP during the import of a level, we want to import the subject with a tag index and if an entity is observing this tag index we want to connect these by adding the observer to the subject.

With pull request #222, the editor exports a level from which we can import these features to LevelState in the application.

Pull request #226 connects puzzle entities and #237 attaches the level director to fields. It's now possible to notify entities that observe an entity which is imported from the level.