Good tools for editing 2D game data?

Member
Posts: 260
Joined: 2005.05
Post: #1
I need to edit some 2D game data, most specifically the location of sprite faces in a multi-face file image, complete with its collision polygon and a specification of origin. What would you suggest? Is there some good format that would help, for which there are nice GUI editors and easy to get the data? How are you solving this problem?
Quote this message in a reply
Sage
Posts: 1,482
Joined: 2002.09
Post: #2
I've looked a bit for something like this as well. I was never able to find anything other than sprite sheet making programs that would take a bunch of sprites and jam them into a sprite sheet.

I've been toying with the idea of making such a program, but I'll probably never get to it along with all the rest of my "great" ideas. :-/

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Moderator
Posts: 682
Joined: 2002.11
Post: #3
I, too, have toyed with the idea of making at least a collision editor, but haven't had time. We'll see...

My web site - Games, music, Python stuff
Quote this message in a reply
Moderator
Posts: 3,579
Joined: 2003.06
Post: #4
I started working on a sprite sheet editor a few months ago but got side-tracked. Right now I'm still using Photoshop to arrange the sprites and then entering the coordinates of each sprite by hand into a plist. Works fantastic, but it's a little laborious. It's better than hard-coding directly into the program though. I went with the plist with the intention of writing the graphical sprite sheet editor for it after the fact.
Quote this message in a reply
Member
Posts: 260
Joined: 2005.05
Post: #5
Interesting! I envisioned you using some kind of powerful tool, perhaps a smart use of a drawing program (which is what I used for similar problem in the past). Well, maybe I have my next project right there. (Unless I get side-tracked too. Wink )
Quote this message in a reply
Moderator
Posts: 3,579
Joined: 2003.06
Post: #6
Heh, yeah, it's kind of interesting that I'm still doing sprite management by hand, but I have been mostly focusing on 3D over the years, so there wasn't much of a need until a few months ago. I didn't continue on the sprite sheet editor because I decided that even with a few hundred sprites, the work involved in entering data into a plist wasn't really all that significant compared to other aspects of the development process. One aspect which I found took up the vast majority of the labor was managing the state, animations and tweening. I'd estimate that sucked up at least a whopping 50-60% of the overall labor/coding, whereas sprite management was maybe only 15% after I started using the plist asset management scheme I came up with. While sprite management is rather boring and tedious, it was far from being the most inefficient part of the process for me at this point. For the next 2D game I do, I am definitely going to work on a tool to manage the state management, animation and tweening. Plus I'll probably finish that sprite tool -- unless you can come up with something better before then Smile
Quote this message in a reply
Member
Posts: 257
Joined: 2004.06
Post: #7
The other day I had to make a sprite sheet and I opened up Gimp to start creating it. Then I remembered that we're using ImageMagick at work to do some heavy duty batch image processing and manipulation so I poked around and found a way to take a bunch of images and composite them together into one image:

http://www.imagemagick.org/Usage/montage/

I ended up creating a shell script to stitch my images together. It definitely saved me a lot of tedium there.

The brains and fingers behind Malarkey Software (plus caretaker of the world's two brattiest felines).
Quote this message in a reply
Moderator
Posts: 3,579
Joined: 2003.06
Post: #8
Malarkey Wrote:I ended up creating a shell script to stitch my images together. It definitely saved me a lot of tedium there.

Oh yeah, I forgot to mention that I do have a tool I wrote years ago to automatically stitch images together into a sprite sheet. That definitely can save a lot of time in some cases, but it doesn't work well with sprites that aren't the same size. It's impossible to get computers to tile things optimally. I read an article on this a while back about how humans still smoke computers when it comes to fitting patterns.

Another issue which creates an added dimension of complexity is figuring out how to fit which sprites into which sheet so that they're used most often in which particular scene(s). On the Mac I wouldn't worry about it since you can leave graphics in memory and load to the GL as needed, but on iPhone, asset groups need to be loaded/unloaded per the particular scene.
Quote this message in a reply
Member
Posts: 260
Joined: 2005.05
Post: #9
AnotherJake Wrote:Oh yeah, I forgot to mention that I do have a tool I wrote years ago to automatically stitch images together into a sprite sheet. That definitely can save a lot of time in some cases, but it doesn't work well with sprites that aren't the same size. It's impossible to get computers to tile things optimally. I read an article on this a while back about how humans still smoke computers when it comes to fitting patterns.
It isn't impossible, but a pretty hard optimization problem.

But even if you can do that, specifying suitable collision shapes as well as origin remains.
Quote this message in a reply
Sage
Posts: 1,482
Joined: 2002.09
Post: #10
As I've mentioned in other threads, I have some very nice marching squares code to extract and then simplify collision outlines from anti-aliased masks. It works with inside and outside loops, and even preserves their winding so you can identify them. One might also want the tool to generate convex hulls as well, but that wouldn't be too hard either.

I hadn't exactly decided if I wanted to just give the code away yet, but if people were serious about starting a community project to make such an editor I'd be willing to donate the code I guess.

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Member
Posts: 260
Joined: 2005.05
Post: #11
Skorche Wrote:As I've mentioned in other threads, I have some very nice marching squares code to extract and then simplify collision outlines from anti-aliased masks. It works with inside and outside loops, and even preserves their winding so you can identify them. One might also want the tool to generate convex hulls as well, but that wouldn't be too hard either.
Marching squares or convex hull for extracting a collision outline is just great - if your objects are "all hard". But what if they are not? Yes, you can hand-tweak a limited number of outlines, as long as they are few enough, but I'd rather put that hand-tweaking straight into the tool. An automatic extraction as a first step is still highly useful.
Quote this message in a reply
Sage
Posts: 1,482
Joined: 2002.09
Post: #12
What do you mean by "all hard" exactly? Sharp angles and corners? I made mine to work with anti-aliased masks to that you could get sub-pixel precision out of it without jagged edges. The polyline simplification algorithm does a very good job of preserving curvature as well. The project that I made it for was to create smooth terrain collision outlines generated from image masks that were scaled up by 16x. Smoothness of the terrain was a very important consideration.

I do understand why you would want to be able to tweak it by hand afterward, but I think a high quality outline generation would preclude the need to do so in a lot of cases. I personally would rather have the auto-generation than hand generation if I had to pick. Though that might be skewed to the fact that I dread GUI programming.

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Member
Posts: 260
Joined: 2005.05
Post: #13
Skorche Wrote:What do you mean by "all hard" exactly? Sharp angles and corners?
I thought about sprites with parts that you don't want to count for collisions, like hair. (Sharp angles is another thing that causes problems.)
Quote this message in a reply
Sage
Posts: 1,482
Joined: 2002.09
Post: #14
Ah. That makes sense too. Hadn't thought of that.

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Member
Posts: 65
Joined: 2008.09
Post: #15
This is probably a far cry from what you really want. I was working on this program called "Spriter" a couple months before uDG started. It was my first large software project and suffered heavily from feature creep. At first it started out as a simple program that created sprite sheets. Then animations. Then collision boxes. Then I wanted to be able to draw and edit sprites within the program. Anyway I fell into somewhat of a complexity trap. It was a bit too overwhelming.

Here's what's left of it though:
Spriter Download

If you decide to check it out, I'd suggest loading the test sprite that comes with it. (In the test sprite folder)

Instructions:
From there you can click on an animation from the animation list and hit the "Preview" button at the bottom of the controls window.
Then when the window pops up, hold the control key. (what a pain huh?) The sprite will show up and began animating. From there you can move the sprite by clicking and dragging, and you can close the window by double clicking. If you hold control, it will create multiple sprites in the same window.
If the collision boxes are annoying you, you can delete them by clicking on the collision tab in the controls list and clicking the "remove collision" button. (or you can just cmd-J until you aren't allowed to delete any more collisions)
The menu bar will give a lot of info on what all the symbols do. There's no help and there's no manual (there should have been LOL). Also, several features are half-working and a lot don't work at all.

You may be wondering, why I should post this at all. I was kinda just throwing some ideas out here for people to play with. I think it would be really awesome to have a program similar to this. (obviously a better/easier to use version)Grin
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  'Normalize' normal map after editing in PS NoradNinja 29 16,186 Oct 24, 2007 10:33 AM
Last Post: NoradNinja
  What is a good texture formats for game models? -Rice- 8 5,769 Jan 7, 2004 11:34 AM
Last Post: whogben