• Content Count

  • Joined

  • Last visited

  1. My computer is a laptop (Phenom 2.1Ghz X3 cores & 4Gb ram), I've tried chromium, opera and firefox. I've tried safari on my friend's mac book air computer too. If I stay whithout moving, 5fps is still the frame rate of the game. If you need more info, please ask me again.
  2. I've created a new project with the following index.html file: I'm starting thinking Phraser tilemapLayer functionallity is broken. <html> <head> <script src="js/phaser.min.js" type="text/javascript"></script> </head><body><script type="text/javascript">var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create, update: update });function preload(){ sprite = game.load.spritesheet('pill', 'assets/PNGs/Escenario/Pildoras.png', 28, 28); game.load.tilemap('level1', 'assets/levelfinal1.json', null, Phaser.Tilemap.TILED_JSON); game.load.tilemap('level1m', 'assets/levelfinal2.json', null, Phaser.Tilemap.TILED_JSON); game.load.tileset('tiles', 'assets/Tileado_1.png', 32, 32);}function create(){ //this.map = game.add.tilemap('level1'); this.map2 = game.add.tilemap('level1m'); this.tileset = game.add.tileset('tiles'); this.fondo = game.add.tilemapLayer(0, 0, 8192, 608, this.tileset, this.map2, 1); this.fondo.resizeWorld(); this.arcos = game.add.tilemapLayer(0, 0, 8192, 608, this.tileset, this.map2, 2); this.arcos.resizeWorld(); this.plataformas = game.add.tilemapLayer(0, 0, 8192, 608, this.tileset, this.map2, 3); this.plataformas.resizeWorld(); this.tileset.setCollisionRange(0, this.tileset.total - 1, true, true, true, true); this.fondo.fixedToCamera = false; this.plataformas.fixedToCamera = false; this.arcos.fixedToCamera = false; sprite = game.add.sprite(32, game.world.height - 150, 'pill'); this.game.camera.follow(sprite); sprite.body.velocity.x = 150;}function update(){ console.log(game.time.fps); }</script> </body></html>
  3. Hello everybody This is my first post and I'm not english speaker, so excuse me if the english is not ok or if this topic has just been create. I'm developing a game, it has a normal frame rate of 50-60 fps. If I use camera.follow or if I create tilemapLayer the frame rate is correct, but if I use both of them the frame rate decreases to 5 fps. I don't have a clue about what is hapenning here, so any help is ok. I've commented all mi update function and the frame rate is still 5 fps, so I'm sure the problem is with tilemaps. This is the code: Preload: game.load.tilemap('level1', 'assets/levelfinal1.json', null, Phaser.Tilemap.TILED_JSON);game.load.tilemap('level1m', 'assets/levelfinal2.json', null, Phaser.Tilemap.TILED_JSON);game.load.tileset('tiles', 'assets/Tileado_1.png', 32, 32);Create: this.map2 = game.add.tilemap('level1m');this.tileset = game.add.tileset('tiles');this.items = game.add.tilemapLayer(0, 0, 8192, 608, this.tileset, this.map2, 0);this.fondo = game.add.tilemapLayer(0, 0, 8192, 608, this.tileset, this.map2, 1);this.fondo.resizeWorld();this.arcos = game.add.tilemapLayer(0, 0, 8192, 608, this.tileset, this.map2, 2);this.plataformas = game.add.tilemapLayer(0, 0, 800, 600, this.tileset, this.map2, 3);this.plataformas.resizeWorld();this.tileset.setCollisionRange(0, this.tileset.total - 1, true, true, true, true);this.items.fixedToCamera = false;this.fondo.fixedToCamera = false;this.plataformas.fixedToCamera = false;this.arcos.fixedToCamera = false; I 've tried using the canvas size instead of 8192 and 806, that fix the frame rate problem, but the layers doesn't render ok.