0
\$\begingroup\$

I'm new to spritesheets and game development in general. I have two files: 1) a .png spritesheet with tons of sprites and 2) a companion XML file with coordinates, anchor points, image names, and animation info.

The spritesheet appears to have no order, and I cannot make sense of the organization of the XML file (which does not appear to contain the dimensions of the seemingly different-sized sprite images)

My question is: How do I use these to make sprite animations? It appears the work has been done for me, but I have no idea how to use it.

In particular, I would like to use this with Swift 3 SpriteKit.

I would be satisfied with exporting all the sprites into separate images with the appropriate names. Is that possible? Thank you for your help!!

\$\endgroup\$
  • 1
    \$\begingroup\$ have you tried looking at the documentation? \$\endgroup\$ – Bálint Oct 13 '17 at 9:16
  • \$\begingroup\$ What's the XML and what is the spritesheet? \$\endgroup\$ – Alexandre Vaillancourt Oct 13 '17 at 11:56
  • \$\begingroup\$ I discovered that I was reading the XML data incorrectly. I was under the impression that there was no height and width data paired with the image names, but there actually was. Thank you for your time! \$\endgroup\$ – retrovius Oct 14 '17 at 17:58
0
\$\begingroup\$

While I was testing with my sprite sheets in unity3D , i had similar problem, but the xml had only co ordinates to the sprites and none were animated. the link below was referred for the scripting and handling, so it might come in handy for your reference too.

Link To the tutorial

But I am not sure how the same thing can be handled with Swift 3 , but if this method works fine , there might not be a necessity of the SpriteKit.

Cheers,

\$\endgroup\$
  • \$\begingroup\$ Thank you! For those interested, there is a convenient tool called TexturePacker for this sort of thing! \$\endgroup\$ – retrovius Oct 14 '17 at 17:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.