From 5f118c2a4a5eb13867f6f60735ef80442e74bbdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Wed, 15 Apr 2020 19:39:26 +0200 Subject: [PATCH 1/2] Removing all reference to 'Tiles' constant in code --- front/src/Phaser/Game/GameScene.ts | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/front/src/Phaser/Game/GameScene.ts b/front/src/Phaser/Game/GameScene.ts index a089842b..e8597d73 100644 --- a/front/src/Phaser/Game/GameScene.ts +++ b/front/src/Phaser/Game/GameScene.ts @@ -8,8 +8,7 @@ import {ITiledMap} from "../Map/ITiledMap"; export enum Textures { Rock = 'rock', Player = 'playerModel', - Map = 'map', - Tiles = 'tiles' + Map = 'map' } export interface GameSceneInterface extends Phaser.Scene { @@ -21,21 +20,25 @@ export interface GameSceneInterface extends Phaser.Scene { export class GameScene extends Phaser.Scene implements GameSceneInterface{ GameManager : GameManagerInterface; RoomId : string; - Terrain : Phaser.Tilemaps.Tileset; + Terrains : Array; CurrentPlayer: CurrentGamerInterface; MapPlayers : Phaser.Physics.Arcade.Group; Map: Phaser.Tilemaps.Tilemap; Layers : Array; Objects : Array; + tilesetKeys : Array; startX = (window.innerWidth / 2) / RESOLUTION; startY = (window.innerHeight / 2) / RESOLUTION; + constructor(RoomId : string, GameManager : GameManagerInterface) { super({ key: "GameScene" }); this.RoomId = RoomId; this.GameManager = GameManager; + this.tilesetKeys = []; + this.Terrains = []; } //hook preload scene @@ -48,6 +51,7 @@ export class GameScene extends Phaser.Scene implements GameSceneInterface{ map.tilesets.forEach((tileset) => { let path = mapUrl.substr(0, mapUrl.lastIndexOf('/')); this.load.image(tileset.name, path + '/' + tileset.image); + this.tilesetKeys.push(tileset.name); }) }); this.load.tilemapTiledJSON(Textures.Map, mapUrl); @@ -66,16 +70,17 @@ export class GameScene extends Phaser.Scene implements GameSceneInterface{ //initalise map this.Map = this.add.tilemap("map"); - this.Terrain = this.Map.addTilesetImage("tiles", "tiles"); - this.Map.createStaticLayer("tiles", "tiles"); + this.tilesetKeys.forEach((key: string) => { + this.Terrains.push(this.Map.addTilesetImage(key, key)); + }); //permit to set bound collision this.physics.world.setBounds(0,0, this.Map.widthInPixels, this.Map.heightInPixels); //add layer on map this.Layers = new Array(); - this.addLayer( this.Map.createStaticLayer("Calque 1", [this.Terrain], 0, 0).setDepth(-2) ); - this.addLayer( this.Map.createStaticLayer("Calque 2", [this.Terrain], 0, 0).setDepth(-1) ); + this.addLayer( this.Map.createStaticLayer("Calque 1", this.Terrains, 0, 0).setDepth(-2) ); + this.addLayer( this.Map.createStaticLayer("Calque 2", this.Terrains, 0, 0).setDepth(-1) ); //add entities this.Objects = new Array(); From 8ddd4656e64c27bb47a5da82067c5d97893dd4c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Wed, 15 Apr 2020 23:10:12 +0200 Subject: [PATCH 2/2] Adding automatic loading of layers --- README.md | 13 ++++++++++++- doc/images/tiled_screenshot_1.png | Bin 0 -> 26594 bytes front/dist/maps/map2.json | 25 ++++++++++++++++++------- front/src/Phaser/Game/GameScene.ts | 28 ++++++++++++++++++---------- 4 files changed, 48 insertions(+), 18 deletions(-) create mode 100644 doc/images/tiled_screenshot_1.png diff --git a/README.md b/README.md index d71c3f0b..6953dace 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,17 @@ Note: on some OSes, you will need to add this line to your `/etc/hosts` file: workadventure.localhost 127.0.0.1 ``` +## Designing a map + +If you want to design your own map, you can use [Tiled](https://www.mapeditor.org/). + +A few things to notice: + +- your map can have as many layers as your want +- your map MUST contain a layer named "floorLayer" of type "objectgroup" that represents the layer on which characters will be drawn. + +![](doc/images/tiled_screenshot_1.png) + ### MacOS developers, your environment with Vagrant 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). @@ -98,4 +109,4 @@ Vagrant destroy * `Vagrant destroy`: delete your VM Vagrant. ## Features developed -You have more details of features developed in back [README.md](./back/README.md). \ No newline at end of file +You have more details of features developed in back [README.md](./back/README.md). diff --git a/doc/images/tiled_screenshot_1.png b/doc/images/tiled_screenshot_1.png new file mode 100644 index 0000000000000000000000000000000000000000..108dfed8989bddcb327a1a962a5bea4a31a1e1b8 GIT binary patch literal 26594 zcma&N1yEgEwnK_m+dv@9CM7hf@P#c5MZ%j!N9-}M1Km(fq{L{2Ll8D`Uwj7M&5Vu1^5SJ{ZrKr z3=B8${RJMedtm?u_6lIAtO9f=*F`LSId3+lO&%_)(u9-4Um0{8@(Y)~1`H06|eTltXV&V#LgI)H1;GIl& zoRrag(;3EMISJo(HY6}mgbl}g{e68fer}V~nB|9zzDCZ-9>{V&oWJ@#*HB);vah(l zzqdQ#mOsnBUFV}-&X0x#YBXSZdwO5?dEYwM*YSl+p3#qr;$z<{j?nNoGZZ7o^M-rIc*HKZ;UlD+LJHMc)?rmjmtEJb%j<| zzd=pqXb5k-u*qHH44QLYZmQGfUH3R=$7ZCMl$luO+&ajVRZWyysUQu0vmj+1yXVEj zIT&u_lodLaQaGp@9)QJNoG^dzffcD&F}f*9Vgj-oJl;49DXhVjSn{1})a8 zF-Dri;!1vBE%qr#_IP^K*h{5@z$1XbV0EX1$Pq9(I|<0q z5<*%_oXSf=*Clx_T$X!chMw4!yz+;9b%Q~sdDM_D>|r@PdqTCSl{#c zT%IMpdTZA1gZx=buxF>{0;M*6ewEQK*ItFV;j(hZB>g$6<)O?pc$qeKsB*rxT+0FX zuIwp3s!v7E2V)haDmE-G19+J8 z!37+T61=57h|!0%wZvunW>??*EiQLZBgnjOB2TG0B@Vl$azk*uIejxL%cwisH^&SA z_54~d_SJ$U<&vgi7@eK5Q4OtzBnK<7T;Aoi(Z;^iZXe;a6TWeuJ(c3MOJq4(wT32G zcG^uBNrh4FXUW_ISLrcyW*8BKW^OU2*>ee@?Q z$TBAX*wp+O3S$MFMG@V+fGzq+wE#_(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Fe!?YCFRuZWXtvkmi9;7{*{M6=-Mq4XiPn52ik#^bY>lo#n%3qC=~yP6PsX z?qqo~O#jJPJV4z18OS)(b~^pef0qOxpUeB8s>_COZ=&ia7hfufAI{UhzQ+qbxawp( zmI)!C;|UJ^|6PCb%RZ&Lx>>BAlY*LhuX*jSowq#-EdnHl_15aLb<$60g(n`7=t;V` zxRhtmDn2W+GHIOEZgMs&&!AIOM&f=%0jTW!<~HU>;!~4!zDs0)1jcdJ8; Objects : Array; - tilesetKeys : Array; + map: ITiledMap; startX = (window.innerWidth / 2) / RESOLUTION; startY = (window.innerHeight / 2) / RESOLUTION; @@ -37,7 +37,6 @@ export class GameScene extends Phaser.Scene implements GameSceneInterface{ }); this.RoomId = RoomId; this.GameManager = GameManager; - this.tilesetKeys = []; this.Terrains = []; } @@ -47,11 +46,10 @@ export class GameScene extends Phaser.Scene implements GameSceneInterface{ this.load.on('filecomplete-tilemapJSON-'+Textures.Map, (key: string, type: string, data: any) => { // Triggered when the map is loaded // Load tiles attached to the map recursively - let map: ITiledMap = data.data; - map.tilesets.forEach((tileset) => { + this.map = data.data; + this.map.tilesets.forEach((tileset) => { let path = mapUrl.substr(0, mapUrl.lastIndexOf('/')); this.load.image(tileset.name, path + '/' + tileset.image); - this.tilesetKeys.push(tileset.name); }) }); this.load.tilemapTiledJSON(Textures.Map, mapUrl); @@ -70,8 +68,8 @@ export class GameScene extends Phaser.Scene implements GameSceneInterface{ //initalise map this.Map = this.add.tilemap("map"); - this.tilesetKeys.forEach((key: string) => { - this.Terrains.push(this.Map.addTilesetImage(key, key)); + this.map.tilesets.forEach((tileset: ITiledTileSet) => { + this.Terrains.push(this.Map.addTilesetImage(tileset.name, tileset.name)); }); //permit to set bound collision @@ -79,8 +77,18 @@ export class GameScene extends Phaser.Scene implements GameSceneInterface{ //add layer on map this.Layers = new Array(); - this.addLayer( this.Map.createStaticLayer("Calque 1", this.Terrains, 0, 0).setDepth(-2) ); - this.addLayer( this.Map.createStaticLayer("Calque 2", this.Terrains, 0, 0).setDepth(-1) ); + let depth = -2; + this.map.layers.forEach((layer) => { + if (layer.type === 'tilelayer') { + this.addLayer( this.Map.createStaticLayer(layer.name, this.Terrains, 0, 0).setDepth(depth) ); + } else if (layer.type === 'objectgroup' && layer.name === 'floorLayer') { + depth = -1; + } + }); + + if (depth === -2) { + throw new Error('Your map MUST contain a layer of type "objectgroup" whose name is "floorLayer" that represents the layer characters are drawn at.'); + } //add entities this.Objects = new Array();