Commit | Line | Data |
---|---|---|
375777a6 DN |
1 | ![](https://github.com/thecodingmachine/workadventure/workflows/Continuous%20Integration/badge.svg) |
2 | ||
20c525c3 DN |
3 | # Work Adventure |
4 | ||
5 | ## Work in progress | |
6 | ||
7 | Work Adventure is a web-based collaborative workspace for small to medium teams (2-100 people) presented in the form of a | |
8 | 16-bit video game. | |
9 | ||
10 | In Work Adventure, you can move around your office and talk to your colleagues (using a video-chat feature that is | |
11 | triggered when you move next to a colleague). | |
f1ab9705 DN |
12 | |
13 | ||
14 | ## Getting started | |
15 | ||
16 | Install Docker. | |
17 | ||
18 | Run: | |
19 | ||
20 | ``` | |
21 | docker-compose up | |
22 | ``` | |
23 | ||
24 | The environment will start. | |
25 | ||
26 | You should now be able to browse to http://workadventure.localhost/ and see the application. | |
27 | ||
28 | Note: on some OSes, you will need to add this line to your `/etc/hosts` file: | |
29 | ||
30 | **/etc/hosts** | |
31 | ``` | |
32 | workadventure.localhost 127.0.0.1 | |
33 | ``` | |
34 | ||
8ddd4656 DN |
35 | ## Designing a map |
36 | ||
37 | If you want to design your own map, you can use [Tiled](https://www.mapeditor.org/). | |
38 | ||
39 | A few things to notice: | |
40 | ||
41 | - your map can have as many layers as your want | |
42 | - your map MUST contain a layer named "floorLayer" of type "objectgroup" that represents the layer on which characters will be drawn. | |
2037147d DN |
43 | - the tilesets in your map MUST be embedded. You can refer to an external typeset in a TSX file. Click the "embed tileset" button in the tileset tab to embed tileset data. |
44 | - your map MUST be exported in JSON format. You need to use a recent version of Tiled to get JSON format export (1.3+) | |
cd776377 DN |
45 | - WorkAdventure doesn't support object layers and will ignore them |
46 | - If you are starting from a blank map, your map MUST be orthogonal and tiles size should be 32x32. | |
8ddd4656 DN |
47 | |
48 | ![](doc/images/tiled_screenshot_1.png) | |
49 | ||
ac69861e DN |
50 | In order to place an on your scene that leads to another scene: |
51 | ||
2448fef5 DN |
52 | - You must create a specific layer. When a character reaches ANY tile of that layer, it will exit the scene. |
53 | - 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>/...`. | |
54 | - 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. | |
ac69861e DN |
55 | - 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. |
56 | ||
029a7a9a | 57 | ![](doc/images/exit_layer_map.png) |
58 | ||
212f6f93 DN |
59 | ### MacOS developers, your environment with Vagrant |
60 | ||
61 | If you are using MacOS, you can increase Docker performance using Vagrant. If you want more explanations, you can read [this medium article](https://medium.com/better-programming/vagrant-to-increase-docker-performance-with-macos-25b354b0c65c). | |
62 | ||
63 | #### Prerequisites | |
64 | ||
63dc515c | 65 | - VirtualBox* 5.x Latest version https://www.virtualbox.org/wiki/Downloads |
66 | - Vagrant 2.2.7 Latest version https://www.vagrantup.com/downloads.html | |
212f6f93 DN |
67 | |
68 | #### First steps | |
69 | ||
70 | Create a config file `Vagrantfile` from `Vagrantfile.template` | |
71 | ||
72 | ```bash | |
63dc515c | 73 | cp Vagrantfile.template Vagrantfile |
212f6f93 DN |
74 | ``` |
75 | ||
76 | In `Vagrantfile`, update `VM_HOST_PATH` with the local project path of your machine. | |
77 | ||
78 | ``` | |
79 | #VM_HOST_PATH# => your local machine path to the project | |
80 | ||
81 | ``` | |
82 | ||
83 | (run `pwd` and copy the path in this variable) | |
84 | ||
85 | To start your VM Vagrant, run: | |
86 | ||
87 | ```bash | |
63dc515c | 88 | Vagrant up |
212f6f93 DN |
89 | ``` |
90 | ||
91 | To connect to your VM, run: | |
92 | ||
93 | ||
94 | ```bash | |
63dc515c | 95 | Vagrant ssh |
212f6f93 DN |
96 | ``` |
97 | ||
98 | To start project environment, run | |
99 | ||
100 | ```bash | |
63dc515c | 101 | docker-compose up |
212f6f93 DN |
102 | ``` |
103 | ||
104 | You environment runs in you VM Vagrant. When you want stop your VM, you can run: | |
105 | ||
63dc515c | 106 | ````bash |
107 | Vagrant halt | |
108 | ```` | |
212f6f93 | 109 | |
63dc515c | 110 | If you want to destroy, you can run |
212f6f93 | 111 | |
63dc515c | 112 | ````bash |
113 | Vagrant destroy | |
114 | ```` | |
115 | ||
212f6f93 | 116 | #### Available commands |
63dc515c | 117 | |
118 | * `Vagrant up`: start your VM Vagrant. | |
119 | * `Vagrant reload`: reload your VM Vagrant when you change Vagrantfile. | |
120 | * `Vagrant ssh`: connect on your VM Vagrant. | |
121 | * `Vagrant halt`: stop your VM Vagrant. | |
122 | * `Vagrant destroy`: delete your VM Vagrant. | |
1100edec | 123 | |
124 | ## Features developed | |
8ddd4656 | 125 | You have more details of features developed in back [README.md](./back/README.md). |