Hello Guest

Author Topic: Is there anyway to import sprite sheets?  (Read 4599 times)

test84

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
Is there anyway to import sprite sheets?
« on: December 30, 2013, 03:08:53 pm »
Hi,

I'm porting a game to 2D Toolkit and my art assets are already in sprite sheets. Is there any way to import them to 2D Toolkit and not make each sprite of that sprite sheet into separate sprite file?

If not, do you a way to automate this via a program? Because I have a fairly large amount of sprite sheets and it's unhuman to ask my artist to do it!

Thanks!

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Is there anyway to import sprite sheets?
« Reply #1 on: December 30, 2013, 04:53:56 pm »
There isn't a way to import irregular sprite sheets - the easiest way to do this is to hack something into tk2dSpriteCollectionEditorSpriteSheetView.cs, AddSprites
That adds a grid of sprites splitting up a sprite sheet uniformly. You can add your own code there to extract whatever parts of your sprite sheet you need there.

test84

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
Re: Is there anyway to import sprite sheets?
« Reply #2 on: December 30, 2013, 06:50:43 pm »
Thanks for the super quick reply.

Sprite sheets are not irregularly shaped, quite the opposite, they are collection of sprites that are exactly the same size. For example a file that is 450x100 has 10 of 45x100 sprites sitting next to each other in an image. What about now, can I import them somehow into tk2d?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Is there anyway to import sprite sheets?
« Reply #3 on: December 30, 2013, 07:11:21 pm »

test84

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
Re: Is there anyway to import sprite sheets?
« Reply #4 on: January 09, 2014, 11:04:31 am »
You are a genius.