Skip to content
This repository was archived by the owner on Jan 8, 2021. It is now read-only.

Commit e679810

Browse files
Initial commit
0 parents  commit e679810

9 files changed

+1041
-0
lines changed
+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Optimize map and deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
10+
deploy:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
16+
- name: Checkout
17+
uses: actions/checkout@v2
18+
19+
- name: Optimize map
20+
uses: thecodingmachine/map-optimizer-action@master
21+
22+
- name: Bash
23+
run: |
24+
ls -al
25+
git config --global user.email "[email protected]"
26+
git config --global user.name "David Négrier"
27+
git checkout master
28+
git commit -am "Adding files"
29+
30+
- name: Deploy
31+
uses: JamesIves/github-pages-deploy-action@releases/v3
32+
with:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
BRANCH: gh-pages # The branch the action should deploy to.
35+
FOLDER: . # The folder the action should deploy.
36+
BASE_BRANCH: master
37+
38+
- name: Bash2
39+
run: |
40+
ls -al

README.md

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# WorkAdventure Map Starter Kit
2+
3+
This is a starter kit to help you build your own map for [WorkAdventure](https://workadventu.re).
4+
5+
## Tools you will need
6+
7+
In order to build your own map for WorkAdventure, you need:
8+
9+
- the [Tiled editor](https://www.mapeditor.org/) software
10+
- "tiles" (i.e. images) to create your map (this starter kit provides a good default tileset for offices)
11+
- a web-server to serve your map (this starter kit proposes to use Github static pages as a web-server which is both free and performant)
12+
13+
## Getting started
14+
15+
On the [Github repository page](https://github.com/thecodingmachine/workadventure-map-starter-kit),
16+
click the **"Use this template"** button. You will be prompted to enter a repository name for your map.
17+
18+
![](docs/create_repo.png)
19+
20+
Be sure to keep the repository "Public".
21+
22+
In your newly created repository, click on the **Settings tab** and scroll down to the **GitHub Pages** section.
23+
Then select the **gh-pages** branch.
24+
25+
![](docs/github_pages.png)
26+
27+
Wait a few minutes a Github will deploy a new website with the content of the repository.
28+
The address of the website is visible in the "GitHub Pages" section.
29+
30+
![](docs/website_address.png)
31+
32+
Click on the link. You should be redirected directly to WorkAdventure, on your map!
33+
34+
## Customizing your map
35+
36+
Your map is now up and online. You need to customize it.
37+
38+
### Cloning the map
39+
40+
Start by cloning the map. If you are used to Git and GitHub, simply clone the map
41+
to your computer using your preferred tool and [jump to the next chapter](#loading-the-map-in-tiled).
42+
43+
If you are new to Git, cloning the map means downloading the map to your computer.
44+
To do this, you will need Git, or a Git compatible tool. Our advice is to use
45+
[GitHub Desktop](https://desktop.github.com/).
46+
47+
TODO: test and continue
48+
49+
### Loading the map in Tiled
50+
51+
The sample map is in the file `map.json`.
52+
You can load this file in [Tiled](https://www.mapeditor.org/).
53+
54+
Now, it's up to you to edit the map and write your own map.
55+
56+
Some resources regarding Tiled:
57+
58+
- [Tiled documentation](https://doc.mapeditor.org/en/stable/manual/introduction/)
59+
- [Tiled video tutorials](https://www.gamefromscratch.com/post/2015/10/14/Tiled-Map-Editor-Tutorial-Series.aspx)
60+
61+
### About WorkAdventu.re maps
62+
63+
In order to design a map that will be readable by WorkAdventure, you will have to respect some constraints.
64+
65+
In particular, you will need to:
66+
67+
- set a start position for the players
68+
- configure the "floor layer" (so that WorkAdventure can correctly display characters above the floor, but under the ceiling)
69+
- eventually, you can place exits that link to other maps
70+
71+
All this is described in the [WorkAdventure documentation](https://github.com/thecodingmachine/workadventure/#designing-a-map).
72+
Please be sure to check it out.
73+
74+
### Pushing the map
75+
76+
When your changes are ready, you need to "commit" and "push" the changes back to GitHub.
77+
Just wait a few minutes, and your map will be propagated automatically to the GitHub pages web-server.
78+
79+
TODO: describe how to push

docs/create_repo.png

158 KB
Loading

docs/github_pages.png

175 KB
Loading

docs/website_address.png

43.6 KB
Loading

floortileset.png

85.1 KB
Loading

index.html

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<html>
2+
<head>
3+
<script>
4+
window.onload = function() {
5+
var path = window.location.pathname;
6+
if (path.endsWith('index.html')) {
7+
path = path.substr(path, path.length - 'index.html'.length);
8+
}
9+
var url = 'https://play.workadventu.re/_/global/'+window.location.host+path+'map.json';
10+
document.getElementById('mapLink').href = url;
11+
document.getElementById('mapLink').innerText = url;
12+
};
13+
</script>
14+
</head>
15+
<body>
16+
This website contains a map for <a href="https://workadventu.re">Workadventu.re</a>.
17+
<br/>
18+
You can access this map at <a id="mapLink" href=""></a>
19+
</body>
20+
</html>

map.json

+902
Large diffs are not rendered by default.

tilesets_deviant_milkian_1.png

33 KB
Loading

0 commit comments

Comments
 (0)