• Content count

  • Joined

  • Last visited

  1. Phaser.Key.onDown listener issue

    See this example: https://phaser.io/sandbox/edit/TZeowZWz If you open the console and hold left, right, up, down and press space it logs "SPACE PRESSED". If you hold up + right and press space it logs SPACE PRESSED, but not if you hold combinations of any of the other directions. What gives? Edit: Nevermind, just found this: https://github.com/photonstorm/phaser/issues/949
  2. Poor text scaling

    Fixed my issue by removing game.scale.setUserScale(2, 2); and just scaling all the elements up individually.
  3. Poor text scaling

    Better! But has some weird artifacting compared to the HTML version (left).
  4. Poor text scaling

    I have a retro-style game with pixel art that I'm scaling up with game.scale.setUserScale(2, 2); And I'm adding some text: game.add.text(100, 100, "Hello world!", {font: "retrofont", fontSize:24}); But the scaling makes the font appear distorted, as you'd expect. Is there a way to render the text crisp or alternatively scale only certain elements of the game up? Currently I'm thinking of creating a second canvas overlaying the main canvas with default scale and rendering the text on that instead, but it feels hacky and could impact performance? Open to better suggestions.
  5. Masking a shine image

    I'm trying to work how to display a shine animation on one of my sprites. I have the shine as an image (with transparency in the image), and I just want to drag it over my sprite whilst staying masked inside the sprite shape itself. I can sort of work out how to get the shine to appear masked inside the image, but it includes a copy of the whole sprite in the final BitmapData instance, whereas I just want the shine, but masked by the sprite's shape. I could paste my code, which is using some hacky-feeling processPixelRGB calls, but would appreciate a full explanation of how to do it a more optimal way.