Jump to content


  • Content Count

  • Joined

  • Last visited

Reputation Activity

  1. Like
    sleekdigital got a reaction from xzereus in Need help moving from spritesheets to atlases   
    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}
  2. Like
    sleekdigital got a reaction from oliversb in How to write spritesheets with JSON   
    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...
  3. Like
    sleekdigital got a reaction from LokisHood in Need Less Flexibility - More Guidance Please   
    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.
  • Create New...