spinnerbox Posted April 24, 2015 Share Posted April 24, 2015 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 More sharing options...
rich Posted April 24, 2015 Share Posted April 24, 2015 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. spinnerbox 1 Link to comment Share on other sites More sharing options...
MichaelD Posted April 24, 2015 Share Posted April 24, 2015 I had written a simple tutorial not long ago, you might want to check it out here: http://nightlycoding.com/index.php/2015/01/phaser-io-how-to-use-atlashash-to-your-advantage/ I hope it helps. spinnerbox 1 Link to comment Share on other sites More sharing options...
spinnerbox Posted April 26, 2015 Author Share Posted April 26, 2015 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? Link to comment Share on other sites More sharing options...
nkholski Posted April 26, 2015 Share Posted April 26, 2015 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 More sharing options...
spinnerbox Posted April 26, 2015 Author Share Posted April 26, 2015 I had a license for TP for one year. After expiration, the last time I tried it exported the files with some frame colored red Have to check again. Link to comment Share on other sites More sharing options...
rich Posted April 26, 2015 Share Posted April 26, 2015 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. spinnerbox 1 Link to comment Share on other sites More sharing options...
spinnerbox Posted April 27, 2015 Author Share Posted April 27, 2015 Well ShoeBox has option to export for Pixi.js, so I gave myself a freedom to call it Pixi.js spritesheet config file Link to comment Share on other sites More sharing options...
rich Posted April 27, 2015 Share Posted April 27, 2015 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 More sharing options...
Recommended Posts