Author Topic: Spritesheet analysis tool?  (Read 11930 times)

Techbear

  • Newcomer
  • Posts: 9
  • Karma: +0/-0
    • View Profile
    • Email
Spritesheet analysis tool?
« on: May 12, 2015, 01:12:20 AM »
There's so many good, free or low-cost spritesheets out there!  And they're especially good for short projects, like the 7drl.

But they're also packed with images that must be carefully examined and categorized, to use in your game.  So I usually pick a player, enemy, wall, and bullet from the spritesheet, and get those working first.  Then I can (theoretically) go back and pick out other images to add to the game (again, usually manually).

Is there a better way, perhaps a tool?  A tool that examines a spritesheet and lets you easily mark, sort, and categorize the sprites?  Something that could help you master all the content of the spritesheet quickly and easily?

KhaoTom

  • 7DRL Reviewer
  • Rogueliker
  • *
  • Posts: 64
  • Karma: +0/-0
    • View Profile
    • My Projects
Re: Spritesheet analysis tool?
« Reply #1 on: May 16, 2015, 07:49:51 PM »
Search for "spritesheet unpacker". Here's the first hit I got from Google, it looks promising. http://www.alferdspritesheetunpacker.forkandbeard.co.uk/forkandBeard/apps/AlferdSpritesheetUnpacker/Download.aspx

Hope this helps!

Techbear

  • Newcomer
  • Posts: 9
  • Karma: +0/-0
    • View Profile
    • Email
Re: Spritesheet analysis tool?
« Reply #2 on: May 16, 2015, 09:08:04 PM »
I just examined the alferd spritesheet unpacker.  It seems to be designed to help you cut spritesheets into individual sprite image files.

There seem to be plenty of tools that create, or deconstruct, spritesheets.

The tool I'm imagining would be able to do both, but its main job would be to make sense of spritesheets.  Look at the spritesheets recently used in the 7DRL Firetail.
http://oryxdesignlab.com/product-sprites/ultimate-roguelike-tileset

While the individual images are well-organized and regularly-spaced, using the art still requires you to (manually) record which cells contain the weapons, which contain the swords, and which contain the flaming swords.  Not to mention making your code properly use the images that are meant to be animation frames.

Check out this spritesheet: http://www.36peas.com/blog/2010/9/13/free-japanese-ninja-shinobi-sprite-sheet.html
This image is much more about animation frames, and the frames are regular in H but not in W.  Parsing this would be different from the previous example.

Perhaps I could tackle this problem by making a spreadsheet of all the images, recording x-y-w-h for each image, plus keywords and level values.  But the spreadsheet wouldn't clearly associate the spreadsheet row with the image.  And building/editing the spreadsheet would still be a lot of work.  Right now many of us just make an array in our code to hold this data.

So I'm imagining a tool that looks and works like both an image editor and a spreadsheet, allowing you to load or make a spritesheet, find all the images it contains, organize the images according to type and sub-type, and annotate the images with keywords and values.  I'm also imagining a very smart, interactive UI, that would spot similarities in adjacent images, and ask you to identify whether the set of images were animation frames, similar objects, or what.


I now doubt that such a tool exists, so somebody got to make it. :)  A friend suggested I put it together in C# .NET.  Anyway I create it, it'd be open-sourced, so I'm not the only one working on it. :)

KhaoTom

  • 7DRL Reviewer
  • Rogueliker
  • *
  • Posts: 64
  • Karma: +0/-0
    • View Profile
    • My Projects
Re: Spritesheet analysis tool?
« Reply #3 on: May 16, 2015, 10:36:54 PM »
The smart detection in mixed spritesheets is an interesting idea, might be a lot of work, but I could definitely see that being pretty useful.

Zireael

  • Rogueliker
  • ***
  • Posts: 604
  • Karma: +0/-0
    • View Profile
Re: Spritesheet analysis tool?
« Reply #4 on: May 17, 2015, 01:01:41 PM »
Thanks for the thread - I tried Alferd, but it only separated some tiles from the UT32 spritesheet, leaving the rest untouched. Then I tried some more, until finally I found one that works for me. It's called Sprite Cutter and it's a Java app.