• Content count

  • Joined

  • Last visited

  1. I made two maps with Tiled, start with Isometric then I have changed to Ortogonal and set the width to 32 pixels. I have a Javaascript function to read the JSON map and use "game.add.isoSprite" to show the sprites in Browser. When did I make maps with diferent sizes it didn't work in the same way. First town map (Stade 1): widh: 14 pixels height: 20 pixels this.hero.anchor.setTo( 0.5 ); Second town map Stade 2: widh: 20 pixels height: 8 pixels this.hero.anchor.setTo( 1.1 ); I set up the anchor with diferent value and then then hero walk over the map. // Set the First world size this.game.world.setBounds( 0, 0, (14+2) * 64, (20+2) * 32); this.game.physics.startSystem(Phaser.Plugin.Isometric.ISOARCADE); this.game.physics.isoArcade.bounds.widthX = 14 * 32; this.game.physics.isoArcade.bounds.widthY = 20 * 32; // Set the Second world size this.game.world.setBounds( 0, 0, (2 + 20) * 64, (2 + 8) * 32); this.game.physics.startSystem(Phaser.Plugin.Isometric.ISOARCADE); this.game.physics.isoArcade.bounds.widthX = 20 * 32; this.game.physics.isoArcade.bounds.widthY = 8 * 32; //Loop var oSprite = jogo.add.isoSprite(posX, posY, 0, imagemCarregada, qualSprite , group); oSprite.anchor.set(0.5); //hero this.hero.game.add.isoSprite(x, y, 0, loadImage, imagem , grupo); //In the First Map this.hero.anchor.setTo( 0.5 ); //In the Second Map this.hero.anchor.setTo( 1.1 ); I use a lot of values and didn't work equality in two maps. My englsh isn't good.
  2. @lewster: What do you recommend to make a character with a gun and can change the gun to another? (Isometric)
  3. Collision between entity and map not working

    When I test and don't include this line the character go throgh the wall. this.sprite.body.collideWorldBounds = true; In you file player.js
  4. Set world bounds for an isometric world

    I tested some possibilities and I was able to determine the limits using the code below: this.game.physics.startSystem(Phaser.Plugin.Isometric.ISOARCADE); this.game.physics.isoArcade.bounds.widthX = 3 * 32; this.game.physics.isoArcade.bounds.widthY = 9 * 32; this.game.iso.anchor.setTo( 0.4, 0.4);
  5. Collision between entity and map not working

    Some errors doesn't display anything, just stops the execution of the code. When this occurs I only can discover the location of the problem with prints. Do you have the old version? If have, make the change and test for each step. if don't, try to modify to back to correct stage, and try step by step. It's boring, but ... it is one way. If you want me to test your code, post the URL.
  6. Tilemap collision

    Did put this.game.physics.arcade.collide in update function?
  7. Use Tilemap with Isometric Plugin?

    I use the program "Tiled". After creating a scene, save as orthogonal and change the width of the Map in Tiled to 32. Use Phaser and Isometric plug in to load the map. I create a function to walk through JSON file and load the layers. function buildMapIso (map, witchTileset, witchLayer, deltaX, deltaY, imageLoaded, group, game, collide) { Var deltaTileIndex = map.tilesets [witchTileset] .firstgid; Var mapColls = map.layers[wichLayer].width; Var mapRows = map.layers[wichLayer].height; Para (var coll = 0; coll <mapColls; coll ++) { Para (var row = 0; row <mapRows; row ++) { If (mapa.hasTile (coll, row, witchLayer)) { var tile = map.getTile( coll, row, witchLayer); var witchSprite = tile.index - deltaTileIndex; posX = coll * mapWidth; posY = row * mapHeight; var theSprite = jogo.add.isoSprite(posX, posY, 0, imageLoaded, witchSprite , group); game.physics.isoArcade.enable( theSprite); if( collide ){ theSprite.body.collideWorldBounds = true; } theSprite.body.immovable = true; theSprite.anchor.set(0.5); } } } }
  8. I can only make the ground square, the map appears square, even if you put different sides. I put the width equal to 2 multiplied by the Cartesian width, this results as if it had multiplied by 0.866 (cosine of 30). I create the ISO map with the Tiled then change to orthogonal and change the width to 32 pixels, then use the Phaser game.add.tilemap and the game.add.isoSprite of the Isometric plugin to show it.
  9. Collision between entity and map not working

    Do you use console in Browser test? You can put "console.log("any info");" inside update function, it shows theposition where exist any error, when it doesn't print. If it works before, you include any error, a position of code can be changed. Excuse my poor english.
  10. I need a help with Phaser and Isometric Plug in. Can I you help me?

  11. Set world bounds for an isometric world

    @lewster32 I try to did what is in your answer, but didnĀ“t work. Every time de World has the same dimensions in X and Y. this.game.world.setBounds( -32, -32, 1240, 840); Isometric square???