Create your map

Defining a default entry point

In order to define a default start position, you MUST create a layer named "start" on your map. This layer MUST contain at least one tile. The players will start on the tile of this layer. If the layer contains many tiles, the players will start randomly on one of those tiles.

Start layer screenshot

In the screenshot above, the start layer is made of the 2 white tiles. These tiles are not visible to the end user because they are hidden below the "bottom" layer that displays the floor of the map.

Pro tip: if you expect many people to connect to your map at the same time (for instance, if you are organizing a big event), consider making a large start zone. This way, users will not all appear at the same position and will not pop randomly in a chat with someone connecting at the same moment.

Defining exits

In order to place an exit on your scene that leads to another scene:

  • 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 "exitUrl" property. It represents the URL of the next scene. You can put relative or absolute URLs.
  • If you want to have multiple exits, you can create many layers. Each layer has a different key exitUrl and has tiles that represent exits to another scene.

Note: in older releases of WorkAdventure, you could link to a map file directly using properties exitSceneUrl and exitInstance. Those properties are now deprecated. Use "exitUrl" instead.

Understanding map URLs in WorkAdventure

There are 2 kinds of URLs in WorkAdventure:

  • Public URLs are in the form https://play.workadventu.re/_/[instance]/[server]/[path to map]
  • Private URLs (used in paid accounts) are in the form https://play.workadventu.re/@/[organization]/[world]/[map]

Assuming your JSON map is hosted at "https://example.com/my/map.json", then you can browse your map at "https://play.workadventu.re/_/global/example.com/my/map.json". Here, "global" is a name of an "instance" of your map. You can put anything instead of "global" here. People on the same instance of the map can see each others. If 2 users use 2 different instances, they are on the same map, but in 2 parallel universes. They cannot see each other.

Defining several entry points

Often your map will have several exits, and therefore, several entry points. For instance, if there is an exit by a door that leads to the garden map, when you come back from the garden you expect to come back by the same door. Therefore, a map can have several entry points. Those entry points are "named" (they have a name).

In order to create a named entry point:

  • You must create a specific layer. When a character enters the map by this entry point, it will enter the map randomly on ANY tile of that layer.
  • In layer properties, you MUST add a boolean "startLayer" property. It should be set to true.
  • The name of the entry point is the name of the layer
  • To enter via this entry point, simply add a hash with the entry point name to the URL ("#[startLayerName]"). For instance: "https://workadventu.re/_/global/mymap.com/path/map.json#my-entry-point".
  • You can of course use the "#" notation in an exit scene URL (so an exit scene URL will point to a given entry scene URL)