Add Stages
parent
bf03edbf56
commit
219bee0410
54
Stages.md
Normal file
54
Stages.md
Normal file
@ -0,0 +1,54 @@
|
||||
Stages are the backgrounds of songs. Every week has at least one stage.
|
||||
|
||||
# How to make stages
|
||||
|
||||
First of all you need a name for the stage. Here i will just use "something"
|
||||
|
||||
## Start
|
||||
|
||||
Then you need the sprites / images for backgrounds and background characters. Usually they are put into sprites/something folder or images/something folder.
|
||||
|
||||
Dont forget that for sprites you need to convert the XML to a JSON file.
|
||||
|
||||
## Middle
|
||||
|
||||
You place something.json into the stages folder and add this stuff into it. It contains basic variables you will have to change for your stage.
|
||||
```
|
||||
{
|
||||
"boyfriend": [0, 0],
|
||||
"girlfriend": [0, 0],
|
||||
"opponent": [0, 0],
|
||||
|
||||
"camera_boyfriend": [0, 0],
|
||||
"camera_opponent": [0, 0],
|
||||
"camera_girlfriend": [0, 0],
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
Then, you will have to script your images and sprites into the game yourself. I made a good API for this with image / sprite types so it isn't too hard. You can check some [existing stages](https://git.squog.ru/TaggedEngine/TaggedEngine/src/branch/main/stages/stageErect.lua) and the [type documentation](https://git.squog.ru/TaggedEngine/TaggedEngine/wiki/Types) for help.
|
||||
|
||||
Also for more stage script manipulation you need to check the [Scripting Functions](https://git.squog.ru/TaggedEngine/TaggedEngine/wiki/Scripting) page.
|
||||
|
||||
### Small example stage script:
|
||||
```
|
||||
local myTypes = require("modules.types")
|
||||
|
||||
local module = {}
|
||||
function module.onCreate(song)
|
||||
local back = myTypes.Image("images/stage/stageback.png")
|
||||
back.layer = -10
|
||||
back.position = myTypes.Vector2(-800, 50)
|
||||
|
||||
local front = myTypes.Image("images/stage/stagefront.png")
|
||||
front.layer = -1
|
||||
front.position = myTypes.Vector2(-900, 1000)
|
||||
|
||||
local curtains = myTypes.Image("images/stage/stagecurtains.png")
|
||||
curtains.position = myTypes.Vector2(-1150, 50)
|
||||
curtains.modifier = 1.3
|
||||
curtains.layer = 5
|
||||
end
|
||||
|
||||
return module
|
||||
```
|
Loading…
x
Reference in New Issue
Block a user