mrvinegar

Texturepacker alternative ?

10 posts in this topic

Is there a free alternative to Texturepacker for creating Texture atlases with JSON data?

 

I've tried Shoebox but it doesn't seem to work with Phaser animations...

 

Thanks!

Share this post


Link to post
Share on other sites

I made a web based sprite-packer called Leshy SpriteSheet Tool.   It doesn't have as many features as TexturePacker, but it can do quite a lot.   Here is the documentation, and a demo video.  I'm not a Phaser user, so I don't know of the requirements, but it does support a number of different export formats, so hopefully it could work out of the box.

Maria likes this

Share this post


Link to post
Share on other sites

I made a web based sprite-packer called Leshy SpriteSheet Tool.   It doesn't have as many features as TexturePacker, but it can do quite a lot.   Here is the documentation, and a demo video.  I'm not a Phaser user, so I don't know of the requirements, but it does support a number of different export formats, so hopefully it could work out of the box.

 

I like it, very nice.  Unfortunately, the JSON format it saves is not compatible with Phaser's parser, but you could easily add a Phaser JSON version.  Here is a quick comparison I made with a simple sprite sheet, and the modification needed to get it to read with Phaser's game.load.atlasJSONArray() method: 

 

Leshy JSON output: 

[
{"name":"swim00","x":0,"y":0,"width":40,"height":20},
{"name":"swim01","x":0,"y":21,"width":40,"height":20},
{"name":"swim02","x":0,"y":42,"width":40,"height":20}
]

 

Phaser needs: 

{"frames": [
{
"name": "swim00",
"frame": {"x":0,"y":0,"w":40,"h":20}
},
{
"name": "swim01",
"frame": {"x":0,"y":21,"w":40,"h":20}
},
{
"name": "swim02",
"frame": {"x":0,"y":42,"w":40,"h":20}
}]
}

 

So the format is different, and "width" and "height" are reduced to "w" and "h", and that's all that seems necessary.

It would be nice if the Leshy tool could be extended to create a Phaser JSON format :-)

Share this post


Link to post
Share on other sites

I made a web based sprite-packer called Leshy SpriteSheet Tool.   It doesn't have as many features as TexturePacker, but it can do quite a lot.   Here is the documentation, and a demo video.  I'm not a Phaser user, so I don't know of the requirements, but it does support a number of different export formats, so hopefully it could work out of the box.

re: my earlier report of a new format needed

 

No changes are needed.  Oi vey, RTFM!  I just read your fine documentation, and found the JSON-TP format, which works out of the box in Phaser, using the game.load.atlasJSONHash() method.

 

Well done, dhaber.  I'm sure there are bells and whistles that other folks will want, but it's a great tool for getting a quick start in sprite sheets.

Share this post


Link to post
Share on other sites

re: my earlier report of a new format needed

 

No changes are needed.  Oi vey, RTFM!  I just read your fine documentation, and found the JSON-TP format, which works out of the box in Phaser, using the game.load.atlasJSONHash() method.

 

 

I've never tried it with Phaser, so I'm really glad to hear that works.   I included a few formats in hopes that people could find one that works for them, or easily convert to something that does.     Adding formats to the application is trivial, so if there is a more preferred format or change, just let me know and I can definitely add it into there.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.