• Content Count

  • Joined

  • Last visited

  1. Texturepacker... Just set trim mode to none and maybe some of the other options would work as well. Not sure if this feature is included in the free version or not.
  2. I would guess you have to either tell your texture packer to conserve the space (if it has that option), or you have to re-position the sprite. But it isn't 100% clear what you are doing... I can only guess from your description. As far as the "type". It seems that Phaser supports any one of those... atlas(key, textureURL, atlasURL, atlasData, format) → {Phaser.Loader}atlasJSONArray(key, textureURL, atlasURL, atlasData) → {Phaser.Loader}atlasJSONHash(key, textureURL, atlasURL, atlasData) → {Phaser.Loader}
  3. It's still pretty unclear what you're trying to do. You say you are using... "game.load.atlasJSONArray(name, 'image.png', this.path + 'image.json');" which is Phaser code, then later you say "I am writing my own game engine". If you are using Phaser, try your JSON and see if it works. You can also compare your JSON to the output from texturepacker. I think this is a valid example of what you are looking for...
  4. I'm not sure Tiled is the tool your looking for in this case. You want texturepacker...
  5. I would suggest adding an issue on github...
  6. Under "projects" you will see some examples that might help you there. They have states such as boot, preloader, menu, game... Also, I like this yoeman scaffold generator for a nice starting point...
  7. Option A = inheritance, Option B = composition. This topic has been discussed to death since the birth of OOP, so you will find plenty of resources out there. Most of the general OOP concepts related to this topic can be applied to game programming and Phaser. In this specific case, it probably won't make much difference. When you start getting into more complex structures, then it can make a world of difference.
  8. Are you sure it isn't something more specific about the content of your layers or your scrolling code? I just did a quick test. My test map is 80x60 tiles with tiles that are 64x64 pixels. I created 6 layers. The layers have very few tiles filled in except for one of them. I did not notice any change in performance with the extra layers. I'm using chrome with the game configured to use canvas. Do you have debug turned on?
  9. Perhaps not, but it is the fundamental difference between the two approaches, and it can be an advantage in some cases.
  10. The prototype approach gives you the option of easily creating a new instance of the state if you wanted to. In other words you can reuse the state over and over without having to duplicate code. One use case for this might be procedural or random level generation. Hopefully my meaning is clear here, but if not let me know and I can explain further.
  11. It may be a little inconvenient, but I think that is exactly what you need to do. I don't think it defeats the concept of phaser's states at all, It just means you need multiple preload states.
  12. Do other games run smooth? What GPU does your machine have?
  13. I don't know too much about blend, but I guess you could write some code to parse the XAML that blend generates and load your assets and position game objects based on that data. Or maybe write something to convert your XAML to JSON so that it will be easier to work with.