Search the Community

Showing results for tags 'tiled'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 206 results

  1. Hi! I am a beginner to melonJs, but I love it so much, it works so well with tiled map editor. Here is the question: We can use object in tiled to mark entity for melonJs, But I would like do a little bit further:use image as object for better visual. like this: Of cause it works, thanks melonJs, that image even been replace by the entity. But if I don't load all the tileset image in the tmx file, for example the player image I use in tiled. "me.levelDirector.loadLevel" will fail. So, it's there a way to skip loading some tileset in tmx file?
  2. Hi to you all. Hi have a question. I'm making a platformer game using phaser and , for now, arcade physics. I make my level in Tiled and export them in JSON. I noticed that since Tiled work with png tileset and that tiles are square. My character do not detect a slope or slante corner. It stands on a invisible cube border. What i was wondering is, is it possible for phaser to detect slanted slope using arcade or should i move to P2JS. Also how do I tell phaser to ignore the transparent part and collide only with the image? I tried making object layer coutouring all the platform for a more precise collision but it seems i'm not able to create a collision layer with a Tiled object layer. or maybe i'm doing it wrong. function create() { map = game.add.tilemap('niveau2'); map.addTilesetImage('tileset','background'); map.addTilesetImage('hints','hints'); backgroundLayer = map.createLayer('background'); collisionLayer = map.objects.evenement.find( o => o.name == 'platform'); collisionLayer.visible = false; console.log(collisionLayer); map.setCollisionByExclusion([],true,collisionLayer); collisionLayer.resizeWorld(); //map.setCollision(1) player = game.add.sprite(32, game.world.height - 150, 'star'); game.physics.arcade.enable(player); player.body.collideWorldBounds = true; player.body.gravity.y=10050; // Our controls. cursors = game.input.keyboard.createCursorKeys(); } function update() { game.physics.arcade.collide(player, collisionLayer); //more code }
  3. Hello i recently started to study Phaser and i have came to a problem witch i need help with solving. I created a 3 layer map with Tiled. SkyLayer, GroundLayer, BrickLayer. I added physics that allow the player to move around the GroundLayer. I also added physics that allow him to jump on the BrickLayer. I am struggling to make a motion that allows the player to jump from the bottom hit the brick with his head, when he hits his head the motion of the brick to move up a pixel and then back down a pixel just as in Mario. I have trouble finding out how to identify which brick section i have hit from the BrickLayer so i can later on apply the animation to the brick element.
  4. My new Phaser game Karate Burger | Salt Chef. Tap around character to control him. http://www.munchiegames.com/hamburger_games/karate_burger same Phaser game in webview, generated in Android Studio with Firebase addons https://play.google.com/store/apps/details?id=com.munchiegames.karate_burger
  5. Hi devs, I got some questions about the way to work with phaser and tiled and I haven't really found answers yet and hope that you guys can help me My goal is to create a simple tilebased game (top down view) with walls, towers and later add player objects. I am using Tiled to create the map. The tilesize is 16x16. Using Arcade Physics for collision. # Map (16x16) and rendering My tower-sprites are 32x32px. So basically 2 columns, 2 rows. Rendering-Problem: The towers (32x32) have some kind of an offset when I place them into the 16x16 grid. If I import them in Tiled and specify they are 16x16, then it works. I tried to set the TILE RENDER OPTION to "Left Up" but it didn't help. What am I doing wrong here? Collision-Problem: Only the top left cell of the tower seems to have a bounding box for collision. The other cells are ignored. Is there a way to tell phaser that the tile is actually not 16x16, but 32x32 and occupies more cells? # Map creation: this.map = this.phaser.add.tilemap('map'); this.map.addTilesetImage('wall'); this.map.addTilesetImage('tower'); this.layer = this.map.createLayer('World'); # Tower JSON { "columns":2, "firstgid":2, "image":"..\/game\/tower.png", "imageheight":32, "imagewidth":32, "margin":0, "name":"tower", "spacing":0, "tilecount":4, "tileheight":16, "tileproperties":{}, "tilewidth":16, } # Object creation The players are not included in the tilemaps json-data but created "dynamically" with their own class (extends Sprite): Unit = function (index, game, opts) { opts = opts || {}; var x = opts.x || game.world.randomX; var y = opts.y || game.world.randomY; this.game = game; // etc ... Phaser.Sprite.call(this, game, x, y, 'player'); }; Unit.prototype = Object.create(Phaser.Sprite.prototype); Unit.prototype.constructor = Unit; I wonder how it would work to create a Tower class for each tower-tile I encounter. Basically link tiles to an object: // Something like: for each tile: if tile == 'tower' new Tower() And when a player collides with a tower I can call my own defined methods like: Tower.collidesWith(player_sprite) Thank you very much!
  6. So i am trying to create a small map with tiled and implement it into phaser. But the collision between the map and the sprite im using as a player doesnt seem to work Here is my code: Platformer.Main = function(game){ var map; var layer; var layer2; var layer3; }; Platformer.Main.prototype = { preload: function(){ }, create: function(){ //map = this.game.add.image(0, 0, 'map'); //map.width = 1280; //map.height = 3800; map = game.add.tilemap('firstLevel'); map.addTilesetImage('object- layer', 'groundlayer'); map.addTilesetImage('ground_tiles'); map.addTilesetImage('Cliff_tileset'); map.addTilesetImage('graphics-tiles-waterflow'); map.addTilesetImage('Extra_Unfinished4'); map.setCollisionBetween(15, 16); map.setCollisionBetween(20, 25); map.setCollisionBetween(27, 29); map.setCollision(40); layer2 = map.createLayer('Background'); layer3 = map.createLayer('Background2') layer = map.createLayer('Tile Layer 1'); this.game.physics.startSystem(Phaser.Physics.ARCADE); this.goUp = game.input.keyboard.addKey(Phaser.Keyboard.UP); this.goDown = game.input.keyboard.addKey(Phaser.Keyboard.DOWN); this.sprite = this.game.add.sprite(50, 250, 'player'); game.physics.enable(this.sprite, Phaser.Physics.ARCADE); this.sprite.inputEnabled = true; this.sprite.body.collideWorldBounds = true; game.camera.follow(this.sprite); layer.resizeWorld(); }, update: function() { game.physics.arcade.collide(this.sprite, layer); game.physics.arcade.collide(this.sprite, layer2); if(this.sprite.input.pointerOver()){ this.sprite.body.velocity.x = 0; this.sprite.body.velocity.y = 0; } else { game.physics.arcade.moveToPointer(this.sprite, 200); } if (Phaser.Rectangle.contains(this.sprite.body, game.input.x, game.input.y)) { this.sprite.body.velocity.setTo(0, 0); } } } Im trying to get the player to collide with some rocks i have in my map. Those rocks are on layer and layer2 which im trying to collide with but it doest work. It also gives me this error Phaser.Tileset - image tile area is not an even multiple of tile size I dont really know how to fix it But im using spritesheets with more than 1 images on them and they are all 32x32 px. And i have really never understood what the map.setCollisionBetween is doing thats why there is so many of them in there Ty for any help
  7. Hi, I'm finished with a small 2D MMO-like project using Phaser, and I now need an original map for the game. The explorable world consists in one ~300 tiles * ~100 tiles map to explore, but I would like to have a new map of similar dimensions. A tileset is already available, and I need someone interested in drawing the map using that tileset in Tiled. The main requirement is to have a small amount of creativity so that the environment that is drawn is interesting enough (that's why I don't do it myself, I don't qualify). There are close to no restrictions about the content of the map, apart from trying to leverage all the decor elements that the tileset offers and having some variety. So if you enjoy making maps, that would be a moderate amount of work with lots of freedom. I need the map in tmx format, but I don't actually require experience with Tiled; it's a pretty easy tool and there is no hurry, so if you feel like it you can take the time to learn on the go, as long as the result is nice. As my project has no commercial views, I would be looking for this for a free collaboration. In addition you'll be free to reuse the map, as is or modified, for whatever other projects you want. Full credit will be given on the page of the game. The game is about finished and is testable online, I can provide the URL if you are interested (that will also give an idea of what kind of map to make). The fact that the project is already close to finished and will see the light of day in the coming weeks might make contributing to it a bit more interesting! For more information or if you are interested, you can contact me at jerome.renaux@gmail.com . Thanks!
  8. Hello all! I was trying to trim the collision size of one tile in Tiled, but then in Phaser the body of that tile it's the same. Does anyone know if is it possible to use Arcade Physics from phaser to get the trimmed collision size of the grid? I am waiting for your response. Thank you so much tilemapAux.json tilemapAux.tmx
  9. I created map by tiled editor. My collision layer have walls and it placed on the tile 64x64. I set collision for tile width 16px, because I need to the actual width of the wall was 16px. The remaining area is transparent. Tiled Editor allows you to do that, everything looks good. But, how to use a tile collision created in the tiled editor from phaser? Created tile collision, create an object in the json structure "tiles":{"2":{"objectgroup": etc. How to use the phaser api set Collision to these tiles? СonvertCollisionObjects does not work. Cannot read property 'length' of undefined -> for (var i = 0, len = map.collision[layer].length; i < len; i++) this.game.physics.p2.convertCollisionObjects(this.map, 'walls'); As if tiled editor has generated the not correct structure. phaser v2.6.2, tiled Version 0.17.0 My json file have structure: { "columns":4, "firstgid":1, "image":"..\/tiles\/fullSetTiles.png", "imageheight":64, "imagewidth":259, "margin":0, "name":"fullSetTiles", "spacing":1, "tilecount":4, "tileheight":64, "tiles": { "2": { "objectgroup": { "draworder":"index", "height":0, "name":"", "objects":[ { "height":64, "id":1, "name":"", "rotation":0, "type":"", "visible":true, "width":16, "x":0, "y":0 }], "opacity":1, "type":"objectgroup", "visible":true, "width":0, "x":0, "y":0 } }, "3": { "objectgroup": { "draworder":"index", "height":0, "name":"", "objects":[ { "height":16, "id":2, "name":"", "rotation":0, "type":"", "visible":true, "width":64, "x":0, "y":0 }, { "height":48, "id":3, "name":"", "rotation":0, "type":"", "visible":true, "width":16, "x":0, "y":16.25 }], "opacity":1, "type":"objectgroup", "visible":true, "width":0, "x":0, "y":0 } } }, "tilewidth":64 },
  10. Hi, Good day everyone, I really don't know how to start my sentence but all I know is I'm very new to Phaser , TILED also in game development. I'm self training right now by reading and watching Phaser and TILED tutorials. Currently I'm working on my first game and I'm having trouble figuring out what I'm missing and where I'm wrong in my code. What i want to do is very simple but i can't seem to make it work,i just want to create multiple enemies using createFromObjects and every time my player touches them he loses HP or restarts the level. What happens is the player only touches the last enemy object created and the first ones he just passes through. Any suggestions would really help and Thank you in advance. I've finally found my solution but thanks anyways.
  11. Hey guys, i'm making a sidescroller with phaser and tiled. I've run into some problems with the gun function. I collide my bullet group like this. this.game.physics.arcade.collide(this.bullet, this._collision_layer, this._kill_bullet, null, this); and the function goes like this: _kill_bullet(bullet, _collision_layer) { bullet.kill(); } this._collision_layer is a tilemap. Now the bullets collide and destroy pretty well, when fired at a low rate of fire. But when i ramp out the speed and rate of fire, the bullets start passing through the collision layer. Especially at angles. If i try to check for overlap instead, the bullet is destroyed instantly. I believe this is because the bounding box encapsulates all of the tilemaplayer. Does anyone have any insights they could share with me here? Some pointers possibly?
  12. Heya, i'm making a sidescroller with ladders. When the player is over a ladder, which is a seperate layer this runs: this._map.setTileIndexCallback([33, 43, 51, 61], this.player.setOnLadder, this.player, this._ladder_layer); I use this to call the ladderfunction, disabling gravity. It works just fine. My question is, can i resize the bounding box that calls the setTileIndexCallback? The tiles are 64x64, and i need the player to be in the middle of the sprite before setOnLadder is fired. Could i resize the bounding box so its something like x = 4 and y = 64? Or if you have some clever way of doing this, i'd like to hear it. Thank you for your time
  13. Hello everybody! Is it possible to change y position value of tiled ground ? I'd like to create hill tiled ground with perlin noise changing thy y values of tiled ground. There is no vertices data ?
  14. Hi all, I am making my first steps with Phaser and found something odd when building a tilemap with Tiled. The map so far consists of a single layer with tiles built from two different images containing 16x16 and 32x32 pixel tiles: When I load that into Phaser, it looks shifted: My first guess is that Phaser does not support maps with differently sized tiles on a single layer, could that be the cause? Are there any workarounds? The code is straightforward: // In a Phaser game template generated by the Yo phaser generator, I do: // In preloader.js: loadResources() { // load your resources here this.game.load.image('Mythos_A4_2', 'assets/mythos/Mythos_A4_2.png'); // walls this.game.load.image('Mythos_A5_1', 'assets/mythos/Mythos_A5_1.png'); // ground this.game.load.tilemap('map', 'assets/maps/test.json', null, Phaser.Tilemap.TILED_JSON); } // In game.js: create() { this.game.stage.backgroundColor = '#787878'; this.map = this.game.add.tilemap('map'); this.map.addTilesetImage('Mythos_A4_2', 'Mythos_A4_2'); this.map.addTilesetImage('Mythos_A5_1', 'Mythos_A5_1'); this.floorLayer = this.map.createLayer('floor'); this.floorLayer.resizeWorld(); } On a different note, when I use the custom/phaser-no-physics.min.js build, Phaser.Tilemap is undefined. When I use phaser.min.js, everything works nicely. How come? I don't see how Tilemaps would necessarily require physics. Thanks for any pointers in advance! synesthesia
  15. I'm trying to implement a simple tilemap in my Phaser game with this code: function preload() { game.load.tilemap('level0', '../static/images/maps/level0.json', null, Phaser.Tilemap.TILED_JSON); game.load.image('stone0', '../static/images/stone0.png'); game.load.spritesheet('player', '../static/images/player.png', 32, 48); game.stage.backgroundColor = '#000000'; } var map; var tileset; var layer;var player; var facing = 'left'; var jumpTimer = 0; var cursors; var jumpButton; var bg; function create() { game.physics.startSystem(Phaser.Physics.ARCADE); map = game.add.tilemap('level0'); map.addTilesetImage('stone0'); map.setCollision(1); layer = map.createLayer('Tile Layer 1'); // layer.debug = true; layer.resizeWorld(); and when I start up the webpage I get the error: "this.postUpdateCore is not a function" which is occurring within the phaser.js file itself. I'm unclear on how to debug and fix this.
  16. I've been working on a Phaser game for a project at university. All of this is relatively new stuff to me, so I'm learning on the fly. I've managed to create a simple tilemap using Tiled, and got it to import to Phaser successfully. However, I can't make the player collide with the 'platform' layer, and I've tried just about everything I can find online. I've cut down my game code to just what's needed for you to (hopefully) point out my error, but it all runs without errors usually. I can also upload any JSON or Image files that might be needed. var SuddenGame = SuddenGame || {}; var char; var map; // GAMEPLAY STATE // SuddenGame.playState = function() {}; SuddenGame.playState.prototype = { init: function() { this.game.renderer.renderSession.roundPixels = true; }, create: function() { //Setup FPS Counter this.game.time.advancedTiming = true; //Stop game from pausing if a player tabs out this.stage.disableVisibilityChange = true; //Import and play background music music = this.game.add.audio('menumusic'); music.play('', 0, 1, true); //Create Dotted Background this.background = this.game.add.tileSprite(0, this.game.height - this.game.cache.getImage('background').height, this.game.width, this.game.cache.getImage('background').height, 'background' ); this.dots = this.game.add.tileSprite(0, this.game.height - this.game.cache.getImage('dots').height, this.game.width, this.game.cache.getImage('dots').height, 'dots' ); //Enable Physics Engine this.game.physics.startSystem(Phaser.Physics.ARCADE); //Add level one tilemap map = this.game.add.tilemap('levelone'); map.addTilesetImage('scifi_platformTiles_32x32', 'scifi_platformTiles_32x32'); backgroundTiles = map.createLayer('backgroundLayer'); Objective = map.createLayer('Objective'); Platform = map.createLayer('Platform'); this.game.add.existing(Platform); this.physics.arcade.enable(Platform); map.setCollisionBetween(1, 1000, true, 'Platform'); Platform.resizeWorld(); Platform.debug = true; this.char = this.add.sprite(50, 470, 'hero'); this.physics.arcade.enable(this.char); this.char.body.gravity.y = 1300; this.char.body.collideWorldBounds = true; this.char.scale.setTo(2, 2); //Create Player Animations var idle = this.char.animations.add('idle', [0]); var walk = this.char.animations.add('walk', [0, 1, 2, 1]); this.game.camera.follow(this.char); }, update: function() { this.game.physics.arcade.collide(char, Platform); this.physics.arcade.TILE_BIAS = 40; if (this.game.input.keyboard.isDown(Phaser.Keyboard.LEFT) && !this.char.body.touching.left) { this.char.body.velocity.x = -150; this.char.animations.play('backwalk', 10, true); } else if (this.game.input.keyboard.isDown(Phaser.Keyboard.RIGHT) && !this.char.body.touching.right) { this.char.body.velocity.x = 150; this.char.animations.play('walk', 10, true); } else if (this.game.input.keyboard.isDown(Phaser.Keyboard.DOWN)) { this.char.animations.play('die', 10, true); } else { this.char.body.velocity.x = 0; this.char.animations.play('idle', 7, true); } if (this.game.input.keyboard.isDown(Phaser.Keyboard.SPACEBAR) && this.game.time.now > jumpTimer) { { this.char.animations.play('jump', 10); this.char.body.velocity.y = -1000; jumpTimer = this.game.time.now + 750; } } //if (this.cursors.up.isDown && !this.char.body.touching.down ) { if (this.game.input.keyboard.isDown(Phaser.Keyboard.SPACEBAR) && this.game.input.keyboard.isDown(Phaser.Keyboard.LEFT) && this.char.body.touching.left && this.game.time.now > jumpTimer) { this.char.body.velocity.y = -500; jumpTimer = this.game.time.now + 1; } if (this.game.input.keyboard.isDown(Phaser.Keyboard.SPACEBAR) && this.game.input.keyboard.isDown(Phaser.Keyboard.RIGHT) && this.char.body.touching.right) { this.char.body.velocity.y = -500; this.char.body.velocity.x = -2500; //jumpTimer = this.game.time.now + 1; } //More update code here }, render: function() { this.game.debug.text(this.game.time.fps || '--', 2, 14, "#00ff00"); } } Apologies if I've missed an extremely obvious mistake!
  17. Hello everyone, this is my first time posting on this forum, which means I'm pretty desperate at this point haha! I'm trying to make a simple game where a character is sliding down a hill, this is what I got so far: http://chewyrabbit.com/game.php I want to make the hill as slippery as ice, just like some ice parts in this game: http://test.xapient.net/phaser/ALL/ I learned a lot from this game btw. I tried to copy how the user made his ice material, but it doesn't seem to work in my game! // Create ramp and player from tiles sharp = this.game.physics.p2.convertCollisionObjects(map,"points"); player = this.game.add.sprite(10,10, 'player'); // Define materials groundMaterial = this.game.physics.p2.createMaterial(); playerMaterial = this.game.physics.p2.createMaterial('player'); // Give the ramp material for (i=0; i<sharp.length; i++){ sharp[i].setMaterial(groundMaterial); } // define what happens when one material contacts the other this.game.physics.p2.createContactMaterial(playerMaterial, groundMaterial, { friction: 0 , restitution: 0 }); What am I doing wrong? Please help me
  18. Dear Phaser community, I am working on developing my first game and having a lot of trouble finding information on tiled and how it works with Phaser. -The game is a sidescrolling shooter(character moves along a 8000px wide map) -I opened up tiled, and created a map 480x8000px, using 3 different sprite sheets or tilesets(as tiled calls them) -I have an exported .json, my saved .tmx and, i also saved the entire map as an .png Questions 1. I created the map as 480x8000 but the work space on the left in Tiled, has no indication of where to start your build and is much taller than my specified hight of the map. Does it matter where i started building from.(attached is a picture to better explain) as im used to applications like photoshop that make the canvas the size you specify.... 2. For collision , i created an object layer and just placed rectangles all over my maps tiles that are sopposed to be objects, is this going to work properly?(you can see these in the attached example as well) 3. Please explain in great detail what javascript is required in my game.js and what each line of code is doing. I have looked at all of the exaples (http://examples.phaser.io/index.html) and plenty of other online examples, with not a single explaination as to what each line of code is doing. My javascript up to this point as has been all web development focused(clicks, animations, video player/picture gallery), so im feeling a bit lost right now.
  19. Hi there! I'm trying to create an indefinite 1-way sidescroller game with a randomly generated World. For this conveniently to work I have prefactored blueprint-Tilemaps with the Tiled-Editor, which I want to glue together whenever the player moves into an unloaded area. I've already achieved to create a big level before it starts by appending layers (layers[0].data-array) together, but this is performance-heavy and does not work well on slow devices. In this context I've decided start with a small pregenerated map, which gets changed while the player is running through the level from left to right. I want to unload chunks of the map when the players leaves them and stick a new blueprint in front before the player reaches the right side, so you think the level is Indefinite. Phase 1: Create a tilemap from a few blueprints stitched together (works) Phase 2: Start the level: the player runs on the map from left right until the level end is near. (works) Phase 3: Randomly pick a prefactored blueprint and stick it on the right side of the map and update the size of it (does not work for me dynamically) Phase 4: Unload/remove left part of the map, which the player has left (have not tried yet) So my question for you: How can I update a tilemap after changing its size so it gets rendered/loaded correctly? Especially changing the world size/borders, as I cannot find a Phaser example for this use case. What I have tried so far: A ) Using the same method from Phase 1: I'm combining Tilemap.layers[0].data from the different blueprints and update layers[0].width and layers[0].height) B ) Adding Layers to the Tilemap.layers Array and offsetting layers[1].x by layers[0].width. A and B do not render the updated tilemap, sadly, even when using .resizeWorld() after the change. Thank you for reading this far and maybe leaving a helpful reply. =)
  20. I'm making a game in Phaser using Tiled for level design. However, when I rotate objects in the object layer and use the createfromobjects function to generate those objects in the game itself, the x and y positions have been messed up. I've taken screenshots to demonstrate: In Tiled In Phaser How do I solve this? Is this a known bug with the current version of Phaser?
  21. I can't understand why this is happening so please help me out. For some reason when i run this program at my home PC it will load a black screen. When I load the exact same files on a PC at my University it will run normally from using those exact files where it DID NOT work at my home PC. If anyone could shed some light into why this error is there and give a fix it would be great. Error: Uncaught TypeError: Cannot read property 'x' of undefined(…) P.s All files included in the ZIP. Test Game Phaser.rar
  22. I'm currently having this issue when I am trying to get a sprite to go up a slope within phaser using the phaser-arcade-slopes.min.js plugin. I am using a .csv tilemap also with a tile size of 32x32. I'm unsure if my names are just incorrect or I am using the wrong type of file for the tilemap itself. I have been getting errors such as - Tilemap.createLayer: Invalid layer ID given: null & Cannot read property 'resizeWorld' of undefined(…). Any help would be much appreciated. "snow_tiles_32.png" is the name of the tileset I created and I'm using "tiles.csv" the tilemap created inside Tiled. I've also included a .rar file of everything to do with the game if anyone decides to take a further look into this issue. HTML var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create, update: update }); function preload() { this.game.load.tilemap('tilemap', 'assets/tilemaps/csv/tiles.csv', null, Phaser.Tilemap.CSV); this.game.load.spritesheet('tiles', 'assets/tilemaps/tiles/snow_tiles_32.png', 32,32); this.game.load.spritesheet('player', 'assets/penguin.png', 32,48); } var player; var cursors; function create() { this.game.physics.startSystem(Phaser.Physics.ARCADE); this.game.plugins.add(Phaser.Plugin.ArcadeSlopes); cursors = game.input.keyboard.createCursorKeys(); this.map = this.game.add.tilemap('tilemap'); this.map.addTilesetImage('snow_tiles_32', 'tiles'); this.game.stage.backgroundColor = '#80e3ff'; this.ground = this.map.createLayer('collision'); this.ground.resizeWorld(); this.game.slopes.convertTilemapLayer(this.ground,{ 2: 'FULL', 3: 'HALF_BOTTOM_LEFT', 4: 'HALF_BOTTOM_RIGHT', 6: 'HALF_TOP_LEFT', 5: 'HALF_TOP_RIGHT', 15: 'QUARTER_BOTTOM_LEFT_LOW', 16: 'QUARTER_BOTTOM_RIGHT_LOW', 17: 'QUARTER_TOP_RIGHT_LOW', 18: 'QUARTER_TOP_LEFT_LOW', 19: 'QUARTER_BOTTOM_LEFT_HIGH', 20: 'QUARTER_BOTTOM_RIGHT_HIGH', 21: 'QUARTER_TOP_RIGHT_HIGH', 22: 'QUARTER_TOP_LEFT_HIGH', 23: 'QUARTER_LEFT_BOTTOM_HIGH', 24: 'QUARTER_RIGHT_BOTTOM_HIGH', 25: 'QUARTER_RIGHT_TOP_LOW', 26: 'QUARTER_LEFT_TOP_LOW', 27: 'QUARTER_LEFT_BOTTOM_LOW', 28: 'QUARTER_RIGHT_BOTTOM_LOW', 29: 'QUARTER_RIGHT_TOP_HIGH', 30: 'QUARTER_LEFT_TOP_HIGH', 31: 'HALF_BOTTOM', 32: 'HALF_RIGHT', 33: 'HALF_TOP', 34: 'HALF_LEFT' }); this.map.setCollisionBetween(2,34, true, 'collision'); //player this.player = this.game.add.sprite(100,50,'player'); this.game.physics.arcade.enable(player); this.player.body.bounce.y = 0.2; this.player.body.gravity.y = 2000; this.player.body.collideWorldBounds = true; this.player.animations.add('left', [0,1,2,3], 10, true); this.player.animations.add('right', [5,6,7,8], 10, true); this.game.slopes.enable(this.player); this.game.camera.follow(this.player); } function update() { this.game.physics.arcade.collide(this.player, this.ground); this.player.body.velocity.x = 0; if(cursors.left.isDown){ this.player.body.velocity.x = -150; this.player.animations.play('left'); } else if (cursors.right.isDown){ this.player.body.velocity.x = 150; this.player.animations.play('right'); } else{ this.player.animations.stop(); this.player.frame = 4; } if(cursors.up.isDown && player.body.onFloor()){ this.player.body.velocity.y = -350; } } Test Game Phaser.rar
  23. Since my previous post I have been wondering on how I can map tiles myself within Phaser using the slopes plugin. If I wanted to include tiles such as "hills" or different sorts of slopes, are there any good tutorials out there that explains this? It would be very beneficial to the game I am creating. I am using 32x32 tiles with arcade physics. I've read in this file I downloaded about a "Arcade Slopes converter" which I'm unsure about. I've included the current tile sheet I created and using to test things out as well as the full code. Any help is appreciated! This is my current code for the mapping of my tiles. this.game.slopes.convertTilemapLayer(this.ground,{ 1: 'FULL', 2: 'FULL', 3: 'FULL', 4: 'FULL', 5: 'FULL', 6: 'FULL', 7: 'FULL', 8: 'FULL', 9: 'HALF_TOP', 10: 'FULL', 12: 'FULL', 13: 'HALF_BOTTOM_LEFT', 14: 'HALF_BOTTOM_RIGHT', 15: 'HALF_BOTTOM_LEFT', }); Test Game Phaser.rar
  24. I am developing one application (platform) where I have 10 users (maybe this will increase with time). I have created one login page and created one map using tiled (phaser framework). But this map is now same for all users, What I want is to create a separate map for every user and that will be visible after login. Please give me some suggestion so that at least I can try. Or give some idea for this implementation. Thank you !