veggis

Members
  • Content Count

    31
  • Joined

  • Last visited

Everything posted by veggis

  1. @in mono Thanks, but this isn't really what I'm looking for since I'm using arcade physics. What I'm trying to do is to find a workaround for my original problem (this).
  2. This question might sound a little vauge, but is it possible to mask out all the alpha from a tilesprite so its possible to collide with everything except alpha? Thanks
  3. @Jazz I tried this and it really doesn't change much when there's 2 or more layers. After digging around it seems that moving camera along tiles has been a perfomance issue for a long time. My tiles are 4*4, i have 3 layers (object, collision and background) on a 96*36 map size. And even with that small a size, it still occurs except if i strip everything down.
  4. So it looks like there's an performance issue when the camera moves along a tilemap. FPS is fine untill the camera starts to move. It even happens in phaser examples like this one: http://phaser.io/examples/v2/tilemaps/sci-fly On my high end PC i dont notice it, but when i tried to run it on my laptop i came across this problem. It happens in my game aswell. Code: http://pastebin.com/UHvXu6nz Has anyone an idea why this happens, and how to fix it?
  5. Hola amigos! Is there a createSpring function with arcade physics? I'm in development of a platformer and I want my character to have a rope-like ability. Kind of like give up robot, but first of all I need to know how to create a spring between two objects. I've tried creating an object with p2 physics tracking the characters position. When the rope ability is called the positions is swapped. Lets just say it didn't meet the requirements (it's greasy): rope: function() { if (this.cursors.up.isDown) { this.ropeSpring = this.game.physics.p2.createSpring(this.testP2.body, this.springBox.body, 5, 0.5, 0.5); this.line.setTo(this.testP2.x, this.testP2.y, this.springBox.x, this.springBox.y); this.drawLine = true; } else { this.game.physics.p2.removeSpring(this.ropeSpring); this.drawLine = false; } }, springTest: function() { if(!this.drawLine) { this.testP2.body.x = this.character.body.x; this.testP2.body.y = this.character.body.y; } else if(this.drawLine) { this.character.body.x = this.testP2.body.x; this.character.body.y = this.testP2.body.y; } },