• Content Count

  • Joined

  • Last visited

  1. Hi, I have issues with scaleMode too (phaser 2.4.3 and less) In my case, scaleMode works only with “width” (for all scaleMode: EXACT_FIT, SHOW_ALL, RESIZE, …). So my game is never display entirely with mobile devices. If I add « this.scale.parentIsWindow = true;”, my game is display entirely but there are black bands (for all scaleMode also). If I use phaser v2.1.0.js, scaleMode works as expected (not black bands with EXACT_FIT for example). So, you can try "parentIsWindow" and change your phaser version to test.
  2. I found the origin of this issue. I used a touchHandler function to make work my UI (dialogs) on desktop and mobile. These create a double run in mobile… document.addEventListener("touchstart", touchHandler, true); Sorry for the inconvenience.
  3. I am testing with a new iPad (iOS 8.3) an old iPad mini 1st generation (iOS 8.2) Google Chrome (emulation iPad) - windows 8 There are the same result for all
  4. Hi, It seems that game input events run twice (one click => 2 runs) on iOS. It’s normal? It can create performance issues. game.input.onUp.add(function(){ console.log("click"); //display "click" 2 times for one real click on iOS }, this); Set game.input.maxPointers = 1; doesn't change anything. On desktop it works correctly. Olorin
  5. Thank you very much George. I have tested to use contact material, and only "restitution" property seems to change the move. Change other properties do nothing. I hope that the old behavior will come back with the future releases…
  6. Hi, I develop a game which uses P2 and collisions. But in the latest versions, the behavior of move, speed and collision are very different. My reference example is “World move” between Phaser 2.0.6 and the lastest version. http://examples.phaser.io/_site/view_full.html?d=p2%20physics&f=world+move.js&t=world%20move I think the move behavior is more realistic in Phaser 2.0.6. So, how to keep these behaviors with the last version? I have made live examples with jsbin, to see the differences : Test 1: moveforward 3000 + angle 90 The ball bounces many times, and the speed gradually slows Phaser 2.0.6: http://jsbin.com/moxijibebuta/1/edit?html,js,output The ball bounces one time and nothing… Phaser 2.1.2: http://jsbin.com/kipayexoqadu/8/edit?html,js,output Test 2: moveforward 1000 + angle 60 The ball bounce many times, and the direction is fine for each bounce. Phaser 2.0.6: http://jsbin.com/wiloyizanucu/1/edit?html,js,output Indescribable… Phaser 2.1.2: http://jsbin.com/rejidageguhu/1/edit?html,js,output What do you think about that? Can we have the movement from 2.0.6 with the latest version?
  7. You can also see this website: http://gamemechanicexplorer.com/#easing-1 There are examples for all easing function with phaser.
  8. ok thank you for the advice you solved my problem
  9. Thanks for your response ! Indeed it is better : http://jsbin.com/kipayexoqadu/5/edit?js,outputBut it is possible to remove child after? I want to drag my second sprite and in this case it stops to follow the first sprite (and when I stop to drag, the sprite become again a child). Drag doesn't work with relative positions.AddChild() is not in the Phaser.Sprite documentation…
  10. Hi, I want to follow a sprite with another, but when the first sprite move quickly, the second is shifted. It is visible on the screen and in the logs (x/y position in each iteration of the update function). When the first sprite slow down, the shift is reduced. When it stop, the sprite are at the same position (it’s normal). How to do the positions of the two elements remain the same every time? I have make a live example here : http://jsbin.com/kipayexoqadu/4/edit?js,output Lose focus to do “pause” and watch positions and images. Sorry for my bad english. My example code : var red_ball=null, green_ball=null;var MainState={ preload: function(){ this.load.image('red_ball', 'http://examples.phaser.io/assets/sprites/red_ball.png'); this.load.image('green_ball', 'http://examples.phaser.io/assets/sprites/green_ball.png'); }, create:function() { this.time.advancedTiming = true; this.physics.startSystem(Phaser.Physics.P2JS); this.physics.p2.setImpactEvents(true); this.physics.p2.defaultRestitution = 0.8; red_ball = this.add.sprite(100, 100, 'red_ball'); this.physics.p2.enable(red_ball); red_ball.enableBody = true; red_ball.physicsBodyType = Phaser.Physics.P2JS; red_ball.scale.set(2); red_ball.body.setCircle(8); red_ball.body.collideWorldBounds = true; red_ball.body.fixedRotation = true; red_ball.anchor.setTo(0.5, 0.5); red_ball.body.angle = 90; red_ball.body.moveForward(3000); green_ball = this.add.sprite(100, 100, 'green_ball'); green_ball.scale.set(2); green_ball.anchor.setTo(0.5, 0.5); }, update: function(){ green_ball.x = red_ball.x; green_ball.y = red_ball.y; }, render: function() { this.game.debug.text(this.game.time.fps || '--', 2, 14, "#00ff00"); this.game.debug.text('Green ball: x: ' + green_ball.x + ' - y: ' + green_ball.y, 2, 30, "#00ff00"); this.game.debug.text('Red ball: x: ' + red_ball.x + ' - y: ' + red_ball.y, 2, 46, "#00ff00"); }};var game = new Phaser.Game(500, 500, Phaser.CANVAS, 'phaser-example', MainState); Thanks ! Edit: i have update my jsbin link example + a new screenshot to see the shifted: