proyb2

Members
  • Content Count

    43
  • Joined

  • Last visited

  1. Nope, this is the long-standing issue I have reported for a dozen times for a year and waiting to fix it, I've added those code in Phaser examples into create() and preload() scope. You will agree there is something wrong. This is ok that could bring down CPU power consumption on Mac OS X http://phaser.io/examples/v2/particlestorm/facing-velocity#gv and problem still persist even with setting the game.time.desiredFps=10: http://phaser.io/examples/v2/camera/camera-view#gv You can monitor using Intel Power Gadget for Mac OS X or if on Windows, set the power management to high performance (which is what Mac OS X does) Perhaps, you could advice some solutions to the creator.
  2. On Macbook Pro, despite setting desiredFps to 30, the frame rate is slower, I still see the CPU power consumption running at >11W on Canvas mode with hardware acceleration is enabled thru chrome://flags on Google chrome. Is it an ideal way to pause the stage/game if there is no animation and how to go about it? game.time.desiredFps = 30;
  3. How do I move bmd to new xy position using call all after it has added to game? game.add.sprite(i*20,0,bmd)
  4. Let say the vertical line draw on 1px on x-axis, the line will appear grey color instead of black while line draw on 10px will appear in a sharp black color, isn't the line at 1px should appear sharp as well? What could be done without increasing line width? bmapbox.line(1, 0, 1, 100, "0x000000", 1)bmapbox.line(20, 0, 20, 100, "0x000000", 1)bmapbox.line(30, 0, 30, 100, "0x000000", 1)bmapbox.line(40, 0, 40, 100, "0x000000", 1)
  5. Problem solved with chosen answer.
  6. What example could I get the sprite1 in world XY position after adding in a group?sprite1=game.make.sprite(17, 16, 'object1')sprite1.name="position1"sprite1.x=x-7sprite1.y=y+8ngroup.add(sprite1)
  7. Is SaveCPU is compatible with the latest phaser? I still getting High CPU despite setting fps parameter in SaveCPU to as low as 10 fps.
  8. What are other canvas libraries that has spritesheet and collision detection feature?
  9. Anyone know other than load image from src, I think there could be many ways which is not listed in tutorials?
  10. Drew 2 bezier to form an ellipse shaped, when adding to sprite, there is a noticeable graphics bottom and right side are truncated.var graphics = game.add.graphics(0,0);graphics.lineStyle(0,0x000000,1);graphics.beginFill(0xff0000);graphics.bezierCurveTo(0,10, 22,6, 19.5,-6);graphics.endFill();sprite = game.add.sprite(0,0,graphics.generateTexture()); //Can't offiset x and y position, the bottom and right with 1px horizontal and vertical are cutoff..... another bezier shapedvar sprite2 = game.add.sprite(0,-4,graphics.generateTexture());sprite.addChild(sprite2) //Sprite2 x and y can be offset and there isurve no cutoff issue.Happen on 2.3.0 and 2.4.0.
  11. If I think that's bitmap roll over issue, file a bug at github and see what they say. To get whole number, you could use javascript Math round, floor, etc on coordination..
  12. Ah, good idea. Sorry, the last question if the graphics could be convert to bitmapdata which can be further draw on anything and finally convert to sprite. I think there's a missing tutorials for this use case.
  13. Any way to merge 2 sprites into one sprite?
  14. Could I rotate only Ellipse without affected Line position and angle? var graphics = game.add.graphics(100,200);graphics.lineStyle(2,0x33FF00,1);graphics.moveTo(0,0);graphics.lineTo(20,199);graphics.beginFill(0x000000);graphics.angle=-45;graphics.drawEllipse(0, 0, 100, 200);graphics.endFill(); If using sprite to rotate, the graphics edge and line appear to jerky, how to make it smooth?sprite = game.add.sprite(30, 100, graphics.generateTexture());sprite.y=280sprite.x=178sprite.angle=-17