Jump to content


  • Content Count

  • Joined

  • Last visited

About grinmonk

  • Rank

Contact Methods

  • Twitter

Recent Profile Visitors

1037 profile views
  1. @EpicKingdom_ Have you tried scaling your game in a browser? I would recommend using Chrome's device emulation: https://developers.google.com/web/tools/chrome-devtools/device-mode/
  2. this.inputEnableChildren = true; this.onChildInputDown.add(() => this.onClick.dispatch(this)); I use the code above to track input on my Group. But when I cache the Group: this.cacheAsBitmap = true; ...the signal stops working. Is there a way to handle input on a cached Group?
  3. @samme Thanks a lot! I will try your suggestion out. And thanks for the fix.
  4. @samme Thanks for your response! Am I correct that you suggest to replace Math.floor with bitwise OR? But aren't the results going to be the same? Could you please explain in more detail or point out where can I read about it? Thanks!
  5. I'm trying to zoom camera (change its scale) while focused on a player on a tilemap. const speed = 0.01; if (this.cursors.up.isDown) { this.game.camera.scale.add(speed, speed); } else if (this.cursors.down.isDown) { this.game.camera.scale.add(-speed, -speed); } This is how I create the map: this.map16 = this.game.add.tilemap("tilemap16"); this.map16.addTilesetImage("xrpg_tileset", "tileset16"); this.wallsLayer = this.map16.createLayer('Walls'); Both player object and the map
  6. Initially the height value comes from here: But then it gets rounded to zero:
  7. We moved our game from Phaser 2.6.2 "Kore Springs" to 2.10.3 and encountered this error in Firefox and Internet Explorer: IndexSizeError: Index or size is negative or greater than the allowed amount The exception is trown from PIXI.Sprite.prototype._renderCanvas: renderSession.context.drawImage(this.texture.baseTexture.source, cx, cy, cw, ch, dx, dy, cw / resolution, ch / resolution); The arguments are: cx : 803 cy : 899.37 cw : 168 ch : 0 dx : -0 dy : -0.6299999999999955 resolution : 1 Everything was fine in "Kore Springs" but we wanted to take advantage of all the fixes
  8. I want to stop RAF updating when my scene (canvas) is not mounted. I thought that pausing the game would do that, but updateRAF() method is being launched anyway.
  9. I have the same problem on 2.5.0. Adding graphics to a sprite does not affect sprite's dimensions. I have found this issue: https://github.com/photonstorm/phaser/issues/1632 Ok, if this does not happen automatically, is there a way to update sprite's bounds without scaling?
  10. I have a very trivial nested-sprites situation, similar to this: function create() { var sprite = game.add.sprite(0, 0, 'phaser'); sprite.width = 100; sprite.width = 100; sprite.inputEnabled = true; sprite.events.onInputDown.add(function(){console.log("parent clicked")}); var child = game.make.sprite(0, 0, 'phaser'); child.width = 10; child.width = 10; sprite.addChild(child); child.inputEnabled = true; child.events.onInputDown.add(function(){console.log("child clicked")}); //child.input.priorityID = 1; } http://phaser.
  11. @blackgames, thanks for a solution! I think it suits right. But what if sprite's anchor is changed due to some adaptive positioning (for example)? Then it is going to ruin internal positioning.
  12. Solved by setting text position to (0, 0): var text = game.make.text(0, 0, "Yo", { font: "10px Arial", fill: "#ffffff", align: "center" }); Am I correct, that children are positioned relatively to parent's anchor?
  13. Hi! With this code I try to put a text object in the center of a sprite, which is in its turn is centered relatively to the world. var sprite = game.add.sprite(0, 0, 'phaser'); sprite.anchor.set(0.5); sprite.x = game.world.width * 0.5; sprite.y = game.world.height * 0.5; var text = game.make.text(sprite.width * 0.5, sprite.height * 0.5, "Yo", { font: "10px Arial", fill: "#ffffff", align: "center" }); text.anchor.set(0.5); sprite.addChild(text); But what I get is this: instead of this: What am I doing wrong and how
  14. The phaser.io website is pretty beautiful but there is a problem with documentation that I would like to be solved: whenever I learn about some Phaser class I need to see both public properties and methods. But with current implementation I have to scroll through all the public properties (which may be a long list) to the methods (example: http://phaser.io/docs/2.4.7/Phaser.Group.html). There at least could be an anchor to the Public Methods at the top of the page, but I think it would be better if there was an index of all public methods and properties at the top of a class page. Sorry i
  15. Sorry for bumping the thread. Are there any news on atlas multipack support in Phaser 2?
  • Create New...