EliteMasterEric / EnigmaEngine

A fork of FNF's Kade Engine that combines its QoL features with true mod support and new gameplay enhancements
https://enigmaengine.github.io/
Other
12 stars 1 forks source link

Enhancement: Custom Stages #4

Open EliteMasterEric opened 3 years ago

EliteMasterEric commented 3 years ago

Make stage rendering data driven, so that it can be expanded upon and modified by mods.

isakube commented 3 years ago

IDEA: We make each custom stage a JSON like so:

{
  "name": "customStage",
  "assets": [
    {"file": "(image directory, from assets/shared/images perhaps?)", "x": 0, "y": 0, "fps":24},
    {"file": "customStage/foreGround.png", "x": 0, "y": 0, "fps":30}
  ]
}

This format provides:

EliteMasterEric commented 3 years ago

Things that are needed for each stage item:

Playing custom specific animations on stage elements at certain times in the song could be provided either by a song event or by script hooks. The former would be better since it would allow us to add it to the charter.

EliteMasterEric commented 3 years ago

This example shows the data for the mallEvil stage.

{
  // The 'assets' attribute describes all stage elements which are included in the stage.
  "assets": [
    {
      // id
      "id": "background",
      // In the week5 library, under images/christmas/evilBG.png
      "asset": "week5:christmas/evilBG",
      // Scrolls 0.2x as much with the camera.
      "position": [-400, -500],
      "scrollFactor": [0.2, 0.2],
      "scale": [0.8, 0.8]
    },
    {
      // id
      "id": "evilTree",
      // In the week5 library, under images/christmas/evilBG.png
      "asset": "week5:christmas/evilBG",
      // Scrolls 0.2x as much with the camera.
      "position": [300, -300],
      "scrollFactor": [0.2, 0.2],
      "scale": [1, 1]
    },
    {
      // id
      "id": "evilSnow",
      // In the week5 library, under images/christmas/evilBG.png
      "asset": "week5:christmas/evilSnow",
      // Scrolls 0.2x as much with the camera.
      "position": [-200, 700],
      "scrollFactor": [1, 1],
      "scale": [1, 1]
    }
  ]
}