• Content count

  • Joined

  • Last visited

About lloydevans

  • Rank
    Advanced Member

Recent Profile Visitors

423 profile views
  1. Phaser warps text

    You also need to think about other places that interpolation and scaling may come from. The app resolution, the device pixel ratio, the font size, the font resolution. It's a big ol' kettle of fish and there is no shortage of past forum posts and references talking about this subject. Bitmap fonts are commonly used for these retro pixel art fonts with roundedPixels enabled.
  2. Phaser warps text

    I meant to say a power of grid height, and it's not really a solution anyway. Actually increasing the resolution as you did seems like one fairly reasonable way to solve it. No reason you can't increase it even further. Edit - just be wary of potential performance implications of re-rendering that text as high resolution bitmap data from the font file. Pretty sure you can do something along the lines of cacheAsBitmap in Pixi to get around it. My explanation isn't very good but I'm trying to tell you why it's happening which can inform you to find a solution.
  3. Phaser warps text

    It's a complex thing to explain but you are using a vector font which pretends to be made up of low resolution pixels. Phaser interpolates pixels when rendering those vectors because the vast majority of fonts want that to look smooth. Your font with a given font size may tell phaser that one of the squares in the grid is say 15.4 pixels in size which results in interpolated values.
  4. Phaser warps text

    Might of been a typo, but you'd want to enable "autoRound" not disable it.
  5. Can't prevent camera from being moved out of bounds

    Creating a moving camera effect can be as simple as adding objects to a container and moving the position/scale of that parent container. No need for local transform. Tip - Leave your stage container static, and create a container for your "camera scene". If you move the stage you don't have an easy option for anything to be unaffected by the "camera" movements! Edit - Container.calculateBounds could potentially offer a dynamic way to impose some restrictions on the movement (by checking if the bounding rect of your scene container is within the stage). There are many ways to go about it depending on the requirements and level of optimisation you want.
  6. Can't prevent camera from being moved out of bounds

    Yea, look at what a PIXI.Container is
  7. Issue pixi don't load images from atlas

    Try going to a maximum of 2048, if that doesn't work it may even need to be 1024 for some really old devices.
  8. Issue pixi don't load images from atlas

    What dimensions are the texture atlases you are creating?
  9. Why is text not left aligned properly?

    An empty string evaluates as 'falsy', a string with a single space doesn't. My guess is that's something to do with the reasoning behind it. You can simply set the text property without using "+=" for the first time.
  10. Why is text not left aligned properly?

    http://pixijs.download/dev/docs/core_text_Text.js.html#line648 text = String(text === '' || text === null || text === undefined ? ' ' : text);
  11. Is this a rendering issue or...

    I think the assumption in the original question was that you passed the string to the PIXI.Text constructer by a reference. You can think of strings in JS as being "passed by copy" (unless it's passed as an object with a string property). When you set PIXI.Text.text, a set method is called which updates it with the new string. In addition to that you were also joining multiple variables into a string literal when you created the PIXI.Text instance. So the assumption there was that those variables could be updated with the string literal you defined somehow knowing about that and re-creating itself.
  12. app.render would of been needed if you'd wanted to extract the pixels from the renderer, but you are extracting them from the texture itself The texture having been loaded is needed in both cases.
  13. Adopt an issue today!

    A PhaserCE issue is for life, not just for Christmas!
  14. Killing sprite, tweening and animation

    No. At least I'd hope not, because that would be some needless coupling of two quite unrelated things. https://github.com/photonstorm/phaser/blob/v2.6.2/src/gameobjects/components/LifeSpan.js#L113 You can use the onKill event to do so yourself. That's why we have events You could also check the docs/source, or even just console log the object after you call the kill method to find out yourself.
  15. Yes, and also make sure the texture is loaded.