ranom

Members
  • Content Count

    6
  • Joined

  • Last visited

  1. console.log(renderer.interaction) undefined I'm lost. Does a webpage for v3 docs exist? Perhaps i should try v2...
  2. Trying to accomplish a very simple thing - get the x and y values of the current mouse coordinate. I found this method defined here http://www.goodboydigital.com/pixijs/docs/classes/Stage.html#method_getMousePosition However javascript console says: Uncaught TypeError: stage.getMousePosition is not a function Using the latest pixi build (as of 14.5.2015). Are the docs outdated or am i doing something wrong?
  3. I managed to fix the lag spikes by creating invisible sprites before updating. I grab an invisible sprite each 0.1 second, set it's alpha to 1 and update the coordinates. Is there a better way?
  4. Hello! i'm creating a bullet-hell type game in phaser. When alot of bullet sprites are being created ingame (~10 sprites/second, size = 5x5 px), i get consistent lagspikes, and graphic bugs caused by the lag... Is this normal? Anything i can do to increase performance? Here's the code to create bullet sprites: ...this.bulletGroup = game.add.group();this.bulletGroup.enableBody = true;this.bulletGroup.physicsBodyType = Phaser.Physics.ARCADE;this.bulletList = []...this.timeCheck = game.time.now; this.shoot = function(bulletSpeed, bulletRate, bulletTexture){ if (game.time.now > this.timeCheck + bulletRate) { var bullet = this.bulletGroup.create(this.sprite.x, this.sprite.y, bulletTexture); bullet.anchor.setTo(0.5,0.5); game.physics.arcade.moveToXY(bullet, player.sprite.x, player.sprite.y, bulletSpeed); this.bulletList.push(bullet); this.timeCheck = game.time.now; }}; this.shoot_update = function(type, phase){ for(var i = 0; i < this.bulletList.length; i++){ this.bulletList[i].body.x += Math.sin(phase*0.1)*5; }};// this.shoot and this.shoot_update are called in update()