Adding a notion of instances per mapAdding a notion of instances to room
The URL signature becomes: https://workadventu.re/_/[instance]/[path_to_map.json] This allows us to create many instances of the same map (and therefore to create several different worlds for different people) An exit on a map can target another "instance" by passing the "exitInstance" property.
This commit is contained in:
parent
1f2b33baec
commit
2448fef53a
6 changed files with 66 additions and 42 deletions
|
@ -47,8 +47,9 @@ A few things to notice:
|
|||
|
||||
In order to place an on your scene that leads to another scene:
|
||||
|
||||
- You must create an specific layer. When a character reaches ANY tile of that layer, it will exit the scene.
|
||||
- In layer properties, you must add "exitSceneUrl" property. It represents the map URL of the next scene. For example : `/<map folder>/<map>.json`. Be careful, if you want the next map to be correctly loaded, you must check that the map files are in folder `back/src/Assets/Maps/<your map folder>`. The files will be accessible by url `<HOST>/map/files/<your map folder>/...`.
|
||||
- You must create a specific layer. When a character reaches ANY tile of that layer, it will exit the scene.
|
||||
- In layer properties, you MUST add "exitSceneUrl" property. It represents the map URL of the next scene. For example : `/<map folder>/<map>.json`. Be careful, if you want the next map to be correctly loaded, you must check that the map files are in folder `back/src/Assets/Maps/<your map folder>`. The files will be accessible by url `<HOST>/map/files/<your map folder>/...`.
|
||||
- In layer properties, you CAN add an "exitInstance" property. If set, you will join the map of the specified instance. Otherwise, you will stay on the same instance.
|
||||
- If you want to have multiple exits, you can create many layers with name "exit". Each layer has a different key `exitSceneUrl` and have tiles that represent exits to another scene.
|
||||
|
||||

|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue