Jump to content


  • Content Count

  • Joined

  • Last visited

About indextwo

  • Rank

Contact Methods

  • Twitter
  1. Just to add: I suffered with this issue this morning (using Phaser 3.1.6) and `this,cameras.main.roundPixels = true` didn't fix it for me. In the end I used good ol' extrusion on my tiles and that solved it. Reference here: https://github.com/photonstorm/phaser/issues/3352#issuecomment-485242513 @rich mentions some other tools for creating extrusions for your tilemaps if `roundPixels` doesn't work for you.
  2. I realise this thread is super old, but I wanted to throw my two cents in, because a) I hate grunt, and b) the first time I tried a standard uglify call, it failed and broke everything. For a while now I've used a free GUI tool called Koala (because I'm a sucker for a nice, simple GUI) for compressing CSS & JS in websites. It occurred to me to try it with my first Phaser game, but I wasn't holding out that much hope, because my game comprised 10 states, 18 prefabs, 2 plugins, and for the hell of it I threw in a couple of extra JS files I was using for the overall page. The first time
  3. PARTIALLY SOLVED. Thanks to this ambiguously-titled thread, I found the solution for my sprite smoothing issue, at least. I solved it with: var skull = this.game.add.sprite(0, 0, 'atlas-sprite', 'skull'); skull.scale.setTo(6); skull.smoothed = false; skull.texture.baseTexture.dirty(); The key is that last line, .texture.baseTexture.dirty(), which I guess forces a cache refresh on the texture. Unfortunately, the same trick doesn't work on my bitmapText, even after using generateTexture(). Is there a similar dirty() method I could use for that?
  4. The only time I'm ever explicitly setting the smoothed property is in that last GameOverState, and that's when I'm switching it to false (although I gather that it is enabled by default). I hadn't realised it's actually on the texture rather than the Sprite though, and I guess that makes sense: once the texture has been used, smoothed is implicitly defaulting to true, and that's where it stays thereafter. Because, if I jump straight to the GameOverState and set it to the sprites (with the first in-game use of the image) to false, it works as expected. I would guess that the same is true o
  5. Huh. I don't know why I didn't think of that (aside from all of my images being within an atlas); but that totally works. I'm not super-precious about it HAVING to load from the atlas, but I'm now very curious as to why it wouldn't work under these particular circumstances. Any ideas?
  6. Yup. I just double-confirmed by console.logging the .smoothed property for both sprites, and they're both echoing as false. Like I said, it works exactly as expected as long as I do it before adding a group full of Sprites to the main GameState. If I switch to the GameOverState from any other point prior to the GameState (i.e. skipping that step entirely), it works as expected. It's just that point, where I'm adding sprites that create a group larger than the visible game area, that it stops working.
  7. I'm working on a game that switches through various states for the menu, main game and game-over screens. for the most part I'm happy for antialiasing to be used on my sprites and particularly my text, as forcing a crisp pixelated render on the whole game can lead to some of the text & sprites looking a little janky. I'm instantiating my game pretty simply: `MY.game = new Phaser.Game(800, 600, Phaser.AUTO, 'game');` I'm not setting any scale modes or special rendering prior to playing the game. In the Game Over state I'm loading a small pixel image I created, and adding some bitm
  8. I realise this is a super-late response, and it doesn't answer the question directly as it related to tilemaps with Tiled (I have very limited experience with that); however, this thread is the 2nd result on Google for 'phaser cloud platform', and I understood 'cloud platform' in exactly the same way as you, @jansensan - a platform that you could jump up through, and then land on (rather than an actual cloud that was moving). So, again: not an answer with Tiled, but there is already a Phaser example of almost exactly this method: https://phaser.io/examples/v2/arcade-physics/one-way-collis
  • Create New...