Open EliteMasterEric opened 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:
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.
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]
}
]
}
Make stage rendering data driven, so that it can be expanded upon and modified by mods.