Spritesheet Upgraded with Tilemaps



I’ve looked through briefly and could not find any spritesheet library update and created this:

and decided to share it with you guys although I’ve seen another library already done in here (Mapsheet - A Tilemap based spritesheet animation library). I actually found Mapsheet the moment I’ve pushed my version.

I decided to post it anyway in a different topic, because I’ve added some extra features and updated original fox examples so this may be a little bit more comprehensive. I’ve kept the original approach alongside the new tilemap-based one.

I’d love to hear some comments on code and approach.



Awesome, thanks for sharing!

Do you think there’s a benefit to retaining the older Bitmap + BitmapData style of spritesheets? Should Tilesheet become the new default? If you’re interested, I’d love to help integrate your work into the official library :slight_smile:


I’ve got some spare time, so I’d be glad to work with you on that matter :slight_smile:

I believe there are no benefits to the old style but I’ve decided to keep it for reference purposes rather than any other - it can be removed before it gets integrated into the official.


If its not too much trouble, do you think you could do a pull request to the original library, using your new Tilemap-based approach in place of the older Bitmap-based approach?

If that’s too much, I can help more with integration, but I think this is a great idea for the library :slight_smile:


I’ve thought you’re talking about a different thing than pull request. I actually forked it to my private account so I guess it won’t be much of a trouble to just pull request back to original repository.

I’ll refactor it a little bit so only new approach is available and pull request whenever I’m done with it (within 1-2 days). Thanks :slight_smile:


Again, I’m happy to help if a pull request is more problematic, so we can get your work integrated. I think the official library would benefit a lot by using Tilemap :grin:

…then I can release on haxelib :slight_smile:


Here you go: https://github.com/skylarkstudio/spritesheet/pull/26

I decided to pull request only the crucial changes so original library will probably be compatible with anything that has been done up to this point. I’ve tested it on my own, external example and on texturepacker example included within library.

I’m not sure of one thing and I’ve mentioned it in pull request comment. I also updated only two importers for now (Texture Packer + Bitmap). I can update them later on.

I guess it is OK to keep the refactored version with both tilesheet/spritesheet on my organisation github site? If I come up with some interesting updates that could be pull requested I will probably pull request them sooner or later.

Thanks :slight_smile:


Thank you! This will be great, absolutely, let me know if there’s more that you think would make the library more valuable.

Setting the Tilemap width/height more rarely speeds up performance on software (Flash/canvas/cairo), so using the largest rect size makes the most sense :slight_smile: