dmitsuki Posted January 4, 2014 Share Posted January 4, 2014 Sorry if this is the wrong board. I needed to create Texture Atlases for my sprites in game, and a quick google search led me to TexturePacker. However, that is not a free solution and I don't like spending money on task I can write my own code for Before creating my own Texture atlas creator however, I stumbled upon http://spritesheetpacker.codeplex.com/ This tool seemed to bascially do what I wanted with the added cost of being free, but it did not output to a format readable by Phaser. So I wrote a DLL to allow it to do so! Pretty easy to use. Just download spritesheetpacker and put SpriteSheetPacker.JsonExporters.txt in the same directory as the executable, and change the extension from .txt to .dll. I should mention the .json file is in the hash format. The JSONExporter.txt isn't neccessary, it's just source if anybody cares.SpriteSheetPacker.JsonExporters.txtJSONExporter.txt spinnerbox, Arlefreak, belliott1 and 4 others 7 Link to comment Share on other sites More sharing options...
Arlefreak Posted January 5, 2014 Share Posted January 5, 2014 This is awesome !!! Also check this posthttp://www.html5gamedevs.com/topic/2594-tools-compatible-witht-phaser/?fromsearch=1 Link to comment Share on other sites More sharing options...
rich Posted January 5, 2014 Share Posted January 5, 2014 Nice one. Do you mind if we include your DLL in the phaser repo? There are a few atlas extensions in there already it could go with. Link to comment Share on other sites More sharing options...
dmitsuki Posted February 4, 2014 Author Share Posted February 4, 2014 Sorry for the super late reply, go ahead! Link to comment Share on other sites More sharing options...
GNUton Posted April 11, 2014 Share Posted April 11, 2014 It works on linux too! Here how to get it working step by step:Once you followed the above instructions: 1. Install mono for linux sudo apt-get install mono-complete2 Double click the exe file! That's it! To output the map file to JSON format, first select the map file then the Image one.It didn't work in the other way around for me. CheersAntonio Link to comment Share on other sites More sharing options...
GNUton Posted April 11, 2014 Share Posted April 11, 2014 I have amended the source code and you can download the DLL which exports the map to JSON Array. http://goo.gl/NTSxJLIf you like to use it, copy the file and select JSONA as extension type when you save the image map. Enjoy! Link to comment Share on other sites More sharing options...
srobertson421 Posted April 15, 2014 Share Posted April 15, 2014 If anyone is also looking for a quick web app solution for texture atlas and the like, try this out: http://www.leshylabs.com/apps/sstool/ It's worked wonders for me! and you can output to multiple files that are compatible with Phaser. Cheers! c75 and Reinkaos 2 Link to comment Share on other sites More sharing options...
Tom Atom Posted May 2, 2015 Share Posted May 2, 2015 I made texture atlas in Java tool long time ago. While the code inside is crappy and hardly maintainable, I am happy with it and I use it for all my games. Just now it is named SBC PicOpt, but I will probably rename it to Spritor or so in future. Anyway it is free now and it gives good results. Actually it is little more than pure atlas tool. You can add custom properties to sprites and export it along with standard TP export. You can also export scaled atlas as you can set global scale on all sprites and adjust it with individual scales on every single sprite. you can get the tool here: https://sites.google.com/site/sbcgamesdev/blogfiles/SBC_PicOpt_v1_00.zip here is description how to use it with Phaser (+ how to add custom properties to sprites): http://sbcgamesdev.blogspot.com/2015/04/phaser-tutorial-sprites-and-custom.htmland here is first part of tutorial (for old version - new features were added during time): http://sbcgamesdev.blogspot.com/2012/10/sprite-atlas-tool-part-i-creating-atlas.html I plan to completely rewrite it one day as I can think about tons of features... Link to comment Share on other sites More sharing options...
AndreasLoew Posted September 3, 2015 Share Posted September 3, 2015 We've added support for Phaser to TexturePacker - both the JSON hash and array format. This gives you some additional benefits:update your sprite sheets with a single click - or by adding TexturePacker to your build scriptsoptimize the sheet using PngQuant for faster loading runs on Windows, Mac and LinuxI've also created a short tutorial - including code on GitHub: https://www.codeandweb.com/blog/2014/12/17/creating-spritesheets-for-phaser-with-texturepacker hoskope 1 Link to comment Share on other sites More sharing options...
staff0rd Posted January 13, 2016 Share Posted January 13, 2016 @dmitsuki this works brilliantly, many thanks! @GNUton's ammendment works as well, but saves as JSONArray instead of JSONHash. You can in fact copy both dlls (name them differently) to the Sprite Sheet Packer directory and the app will then give you both *.json and *.jsona as options to export. I note that *.json is slightly smaller than *.jsona per sprite. Link to comment Share on other sites More sharing options...
DonFrag Posted January 13, 2016 Share Posted January 13, 2016 I used Phaser Editor for Sprite and Audio Atlas generation. PhaserEditor2D 1 Link to comment Share on other sites More sharing options...
XtriMzZ Posted February 21, 2016 Share Posted February 21, 2016 @dmitsuki Thanks, it works perfectly Link to comment Share on other sites More sharing options...
samme Posted August 4, 2016 Share Posted August 4, 2016 Glue is neat. glue ./images ./atlas --json # -> atlas/images.png # -> atlas/images.json # Descend into folders: glue ./images ./atlas --json --recursive # Make 1 atlas per folder: glue ./images ./atlas --json --project drhayes 1 Link to comment Share on other sites More sharing options...
staff0rd Posted August 17, 2016 Share Posted August 17, 2016 spritesheet.js if you wanna make spritesheets in node - I set up some gulp tasks to collate and pack sprites using it. Link to comment Share on other sites More sharing options...
Recommended Posts