Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by MaximeC

  1. This solution does not work for me (Phaser 2.1.3). I am using SHOW_ALL, I don't have that problem with RESIZE. Any idea? Edit: actually I don't have the issue with Chrome but only with Firefox.
  2. No errors. The various JS are loaded and evaluated but after that it behaves as an empty page. I decided to give a try to crosswalk and it works like a charm.
  3. The project works perfectly in Chrome and Firefox, mobile version or desktop. But it does not work in any of the 3 modes with CocoonJS after upgrade. I don't use hasResized.
  4. I was using Phaser 2.0.7 but the upgrade to the version 2.1.3 (and dev) causes a black screen when I try to run my game with Cocoonjs. Do you have any idea about what could cause that? I tried AUTO and CANVAS. Thank you for your help.
  5. I am using onBeginContact in order to get the body that collided with the player's body (using p2): hitWall: function(wall, shapeWall, shapeShip, equation) {...}However, I don't know how to : - compute the « force » of the collision. I am currently using the speed of the player's body but I'm not sure that's a good idea (need confirmation). And the values are different between different phaser versions. - detect the part of the player's body that collided with something. Basically, if it's the bottom of the body it's fine, otherwise I need to remove life in function of the impact force. I di
  6. The line: this.game.physics.startSystem(Phaser.Physics.P2JS);Should be in Game.js. I found the problem by noticing that the gravity was not taken into consideration either.
  7. I think it was 2.0.7. I finally decided to stop moving the camera anyway so I'm back with the last version.
  8. hitWall is defined the same way as create: SpaceShip.Game.prototype = { create: function() {... }, hitWall: function(wall) {... }};But I have also tried to define hitWall as a global function and also directly in onBeginContact.
  9. Hi, I have refactored my code in order to use states and classes. I now have Boot, Preload, MainMenu and Game classes. The code is cleaner but the callback associated to the onBeginContact is not called anymore. Without classes, it was working as expected. In the create of Boot.js, I set the physics engine: this.game.physics.startSystem(Phaser.Physics.P2JS);In the create of Game.js, I create my sprite and a tilemap: ...var map = this.game.add.tilemap('map');var layer = map.createLayer('Tile Layer 1');map.addTilesetImage('ground');map.addTilesetImage('star'); layer.resizeWorld();ma
  10. Same issue for me. Fixed by using an older version of Phaser. Apparently, this might be fixed in the dev version too.
  • Create New...