Jump to content

How should Atlas json configuration file look like?


spinnerbox
 Share

Recommended Posts

Probably there is already similar question on the topic.

 

I just wanted to know how should my json file look like if I have my atlas of several related game images? Is there some general structure?

 

Specifically I would like to have both as hash and as array?

 

I tried this tool https://spritesheetpacker.codeplex.com/ and it works great but it generates plain text file as configuration. So I need to edit it my self.

 

Yes I have heard about TexturePacker which is the right tool for the job but I need this for just several images, so buying it kind of doesn't pays off.

 

Also has somebody tried to use Phaser to generate spritesheets before? I think there is a way how to keep transparency inside the images generated from HTML canvas.

Link to comment
Share on other sites

Texture Packer is a hell of an investment. Easily one of my most used pieces of software! (next to Sublime).

 

However Shoebox generates atlas files too and that is free. Atlas files are just a single texture and a json file, that's all. Look in the Phaser Examples repository and you'll find loads of examples of them.

Link to comment
Share on other sites

The essential version of Texture Packer is completely free, and have all features you need to get started. Smart folders is the best! The template for Phaser requires the pro version, but you can alter the settings to work with the essential version.  I'm not completely sure about all the features missing in the free version, but I know that the paid let you optimize images and pack images better etc which I don't find necessary while developing. I haven't bought the full version yet, but will if I ever manage to finish a game both to support this great software and to gain access to the pro-features.

Link to comment
Share on other sites

Just wanted to know, does Phaser can load Pixi.js spritesheet.js configuration file? I mean does Phaser.Loader.atlasJSONHash() uses Pixi.js config file?

 

There's no such thing as a Pixi/js spritesheet configuration file, so I'm really not sure what you're asking.

 

Phaser loads industry standard texture atlas json formats, as exported by Texture Packer, Shoebox, Flash CC and numerous other packages. It's got nothing to do with Pixi.

Link to comment
Share on other sites

Fair enough, that makes more sense now - it's just a bog standard JSON file though, the same as Phaser uses and the same as Texture Packer exports. There's no such thing as a "Pixi.js" sprite sheet as it were (or a Phaser one for that matter).

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...