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

Add a Layer Template System #169

Open
AustinEast opened this issue Sep 9, 2020 · 0 comments
Open

Add a Layer Template System #169

AustinEast opened this issue Sep 9, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@AustinEast
Copy link
Member

Right now, Ogmo doesnt handle the need for multiple level types very well (ie, some levels need these layers, some levels need those layers, etc). Currently you either need to have extra layers that go unused between levels (which can lead to bloat), or you need to use multiple Ogmo projects, which is not a great solution either.

Adding a Layer Template system will hopefully fix this issue. This would entail these changes:

  • In Project Settings
    • Add an Add Template button to the Layers tab, which creates a Popup to name the new Layer Template
    • Add a dropdown to the Layers tab to swap between Layer Templates
    • Add a Delete Template button to bring up a Popup with a dropdown to select the template to delete
  • In Level Editor
    • Add a dropdown to the Level Values popup that swaps Layer Template on the Level
      • This may or may not work, but we should try to maintain as much of the Level data when swapping between templates - matching Layers with the same name and the same type is a good start
      • If the Level's Template is changed, add a warning that the Level's data will be changed/erased
  • In the Project file (ie project.ogmo)
    • Replace the layers field with a templates field containing an array of layers arrays
      • This is a breaking change, but we can add logic to auto-update project files (ie if a project file is found with a layers field, convert it to a templates field containing the layers field
  • In the Level file (ie level.json)
    • add a template field that holds the name of the template used in the Level
@AustinEast AustinEast added the enhancement New feature or request label Sep 9, 2020
@AustinEast AustinEast self-assigned this Sep 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant