instantia

Members
  • Content Count

    24
  • Joined

  • Last visited

  1. To do so: forceSetTimeOut: falseThe problem with low FPS (begin gmae) is not solution.
  2. How to disable fixed FPS in version 2.4.3? is it possible? Or, can disable tunneling in early state play? Low FPS at begin of my game (after version 2.2.0). Solution to problem in http://www.html5gamedevs.com/topic/10345-phaser-220-release-candidate-11-please-test/ i could not found. Until I see that the only way out is to use 2.1.3.
  3. Generate a mask may be? Read coordinates of the polygon and create black-white picture?
  4. And no other way? This is not particularly suited. I need to ask a different curve landscape
  5. Made using csv game.load.tilemap('ground0', 'data/levels/ground0.csv', null, Phaser.Tilemap.CSV);game.load.image('tiles', 'data/textures/ground.jpg');this.tile = game.add.tilemap('ground' + this.id, 256, 256);this.tile.addTilesetImage('tiles');this.layer = this.tile.createLayer(0);I do not know now how to cut and set polygon
  6. instantia

    Map p2 physic

    How to create it? - red line - polygon. - colorful squares - tile map - random or atlas file. How to set the polygon object I know. Here, too, and plan. How do I randomly impose sprites? What to do to create? To trim down the red line
  7. solved the problem so: if (Math.abs(this.obj.angle) > 90) this.dir = 'left';else if (Math.abs(this.obj.angle) <= 90) this.dir = 'right';if (this.dir !== this.dirOld) { this.obj.scale.setTo(this.scale, this.scale); this.obj.body.clearShapes(); this.obj.body.loadPolygon('physics', this.name+'_'+this.dir);}if (Math.abs(this.obj.angle) > 90) this.obj.scale.setTo(this.scale, -this.scale);else if (Math.abs(this.obj.angle) <= 90) this.obj.scale.setTo(this.scale, this.scale);this.dirOld = this.dir;a bit expensive(
  8. The interesting thing is that if you put the shift on the same "right", everything works fine. if (this.obj.angle !== this.angleOld) { if (Math.abs(this.obj.angle) > 90) { this.obj.scale.setTo(this.scale, -this.scale); this.dir = 'left'; } else if (Math.abs(this.obj.angle) <= 90) { this.obj.scale.setTo(this.scale, this.scale); this.dir = 'right'; } if (this.dir !== this.dirOld) { /*console.log(this.obj.height);*/ this.obj.body.clearShapes(); this.obj.body.loadPolygon('physics', this.name+'_'+this.dir); } this.dirOld = this.dir; }- not working. if (this.obj.angle !== this.angleOld) { if (Math.abs(this.obj.angle) > 90) { this.obj.scale.setTo(this.scale, -this.scale); this.dir = 'right'; } else if (Math.abs(this.obj.angle) <= 90) { this.obj.scale.setTo(this.scale, this.scale); this.dir = 'right'; } if (this.dir !== this.dirOld) { /*console.log(this.obj.height);*/ this.obj.body.clearShapes(); this.obj.body.loadPolygon('physics', this.name+'_'+this.dir); } this.dirOld = this.dir; }- working. How so? left = right.
  9. { "salmon_right": [ { "density": 2, "friction": 0, "bounce": 0, "filter": { "categoryBits": 1, "maskBits": 65535 }, "shape": [ 29, 84 , 28, 69 , 73, 65 , 74, 90 ] } , { "density": 2, "friction": 0, "bounce": 0, "filter": { "categoryBits": 1, "maskBits": 65535 }, "shape": [ 190, 95 , 122, 111 , 91, 104 , 101, 32 , 115, 23 , 155, 26 , 196, 53 ] } , { "density": 2, "friction": 0, "bounce": 0, "filter": { "categoryBits": 1, "maskBits": 65535 }, "shape": [ 73, 65 , 101, 32 , 91, 104 , 74, 90 ] } , { "density": 2, "friction": 0, "bounce": 0, "filter": { "categoryBits": 1, "maskBits": 65535 }, "shape": [ 233, 52 , 237, 65 , 212, 91 , 190, 95 , 196, 53 ] } ], "salmon_left": [ { "density": 2, "friction": 0, "bounce": 0, "filter": { "categoryBits": 1, "maskBits": 65535 }, "shape": [ 29, 84 , 28, 69 , 73, 65 , 74, 90 ] } , { "density": 2, "friction": 0, "bounce": 0, "filter": { "categoryBits": 1, "maskBits": 65535 }, "shape": [ 190, 95 , 122, 111 , 91, 104 , 101, 32 , 115, 23 , 155, 26 , 196, 53 ] } , { "density": 2, "friction": 0, "bounce": 0, "filter": { "categoryBits": 1, "maskBits": 65535 }, "shape": [ 73, 65 , 101, 32 , 91, 104 , 74, 90 ] } , { "density": 2, "friction": 0, "bounce": 0, "filter": { "categoryBits": 1, "maskBits": 65535 }, "shape": [ 233, 52 , 237, 65 , 212, 91 , 190, 95 , 196, 53 ] } ] }
  10. this is because this.obj.scale.setTo. I do not know how to fix (
  11. Created a new polygon. When the direction of changing. this.obj.body.clearShapes();this.obj.body.loadPolygon('physics', name+'_'+this.dir);Yet polygons same. But here is a bug: Why shifted polygin?
  12. As in Phaser to check whether the changed state of the sprite (body)? Is there any standard is a function? Or most velocity / speed / forse / rotation check?
  13. Create a new polygon for left?
  14. I turned to reflect sprite. this.obj.scale.setTo(1, -1); How to reflect the polygon body p2 physic? body.setTo(1, -1) not working