Kartou

Members
  • Content Count

    14
  • Joined

  • Last visited

  1. I have created an example in the sandbox that displays the error. Please see error in the console after pressing the left arrow: http://phaser.io/sandbox/edit/mqmaJDwh It looks like the destroy does not properly stop the requestAnimationFrame. Maybe I'm not supposed to call game.destroy() at that time? c.Game.updateLogic @ phaser.js:34680 c.Game.update @ phaser.js:34619 c.RequestAnimationFrame.updateRAF @ phaser.js:58258 window.requestAnimationFrame.forceSetTimeOut._onLoop @ phaser.js:58242
  2. Hi! I'm having trouble with destroying the game after use. I'm calling game.destroy(), but this does not properly shut down the core game loop, hence crashing in: c.Game.updatec.RequestAnimationFrame.updateRAFwindow.requestAnimationFrame.forceSetTimeOut._onLoopwith the error: Uncaught TypeError: Cannot read property 'slowMotion' of nullFrom the source code it looks like game.destroy() should cancel all further updates etc. Maybe I'm missing something?
  3. SOLVED: In my helper function I called game.load.start() once for each asset i preloaded. This gave some weird behaviour where the preload method would exit prematurely. I removed game.load.start() and now it seems to work consistently.
  4. Hi! I just updated from Phaser 2.2.2 to 2.4.4 and i'm now experiencing sporadic errors from the cache during GameState create, like this: Phaser.Cache.getImage: Key "http://linkttoimage.com/Background.jpg" not found in Cache. I see this on both Chrome and Firefox, but Internet Explorer 11 seems fine. I believe this is a timing issue, since if I stop execution with a breakpoint in the start of the GameState create method I do not see the issue. Also refreshing a couple of times usually makes the problem go away, and all assets are available in the cache again. Cheers, Klaus
  5. Hi Rich, Looks awesome. Been waiting for this plugin for a while Do you plan on adding a graphical editor for this? Cheers!
  6. Hi Netcell, Your plugin looks really cool. However, I cant make it work using the console injection method. I just get a black bar around 20 pixels height in the top of the screen. Nothing happens when I click or drag it. Testing in Chrome. Best regards, Klaus
  7. Maybe using tint will get the effect you want sprite.tint = 0xff0000; Cheers!
  8. I'm still seeing this in Phaser 2.3.0. Is this something you will look into in Phaser 2? Or maybe its on the roadmap for Phaser 3 with the new rendering system? Cheers!
  9. Thanks Rich! Apparently another solution is to first add the rotated DisplayObject to a group and then call RenderTexture.renderXY with the group instead. // Create arm with hand as child. Then rotate arm and render to RenderTexturevar arm = this.game.make.sprite(0, 0, 'Arm');var hand = this.game.make.sprite(this.options.ArmAttachmentPointX, this.options.ArmAttachmentPointY, 'Hand');arm.angle = 90;arm.addChild(hand);var group = this.game.make.group();group.add(arm);renderTexture.renderXY(group, 0, 0, false);
  10. Hi! Is it possible to render a rotated DisplayObject into a RenderTexture. Atm it looks like "RenderTexture.render" and "RenderTexture.renderXY" just ignores rotation on the object. My current solution is to use "BitmapData.draw" which works fine. But I'm still wondering why RenderTexture ignores the rotation? Cheers, Klaus
  11. I'm seeing this behaviour as well, it looks like a bug. Can someone confirm this and maybe if its on the roadmap to fix?
  12. Thanks Rich, the new version looks very nice. Great work! Unfortunately there still seems to be issues with HDPI in ScaleMode.Resize. Do you have any plans to look into this in the near future? Also I have to say that the new docs look very cool, but they are desperately missing links to the source code. Would be a nice addition Cheers
  13. I have been struggling with the same issue and I am very interested in a solution to this It seems to me that you should be able to use ScaleManager.RESIZE without getting the "dirty" effect on high res screens. Is this a bug or is there a reason for this limitation? Cheers!
  14. Hi! First of all, i'd like to thank you guys for this awesome tool I am in the process of adopting to Phaser from Kinetic. I've previously used Kinetic for creating responsive micro games targeted mobile devices and so far I'm blown away by Phaser. Anyways, I'm having some trouble figuring out how to use the ScaleManager RESIZE property. I want the canvas to fill the entire screen and resize the different elements manually. I've therefore setup a resize callback where I based on the target dimension calculate a scale factor i apply to the sprites. Eg, I have a sprite that should be anchored to the top center, so I resize it using the scale property and translates it to the center. This works very well and gives me the responsive design I want. However, the sprite loses its crispyness/sharpness when rendered on a retina display. If i instead use the SHOW_ALL scalemode with no manual scaling it will look as sharp as it should. I did not have this behavior with Kinetic, so i guess i'm doing something wrong? So I guess my question is; how should I use RESIZE scale mode, together with manual scaling and still maintain sharpness of sprites? Below is an example of how I scale a header that should always be centered at the top of the screen using the resize callback: GameController.prototype.resize = function (width, height) { var scaleX = width / this.targetWidth; var scaleY = height / this.targetHeight; this.uniformScale = Math.min(scaleX, scaleY); this.headerImage.position.x = this.game.world.centerX; this.headerImage.scale.set(this.uniformScale, this.uniformScale);}Cheers, Klaus