Skip to main content
edited tags
Link
user1430
user1430
Source Link
Paul Manta
  • 3.2k
  • 3
  • 31
  • 42

Shape editor with custom format?

I'm trying to determine what format the shapes in my 2D game should be stored in and also what software I should use to aid in making the actual shapes.

Up until now I used PhysicsEditor from code'n'web, which saves shape information in XML format. The problem is that the way the file is layed out, it will require a lot of parsing to extract the actual information I'm interested in.

I've made my own "format" for storing shape information (see below). I used JSON instead of XML since it's a lot less verbose. Layed out like this, I require minimal parsing to get the actual information.

{
    "polygons":
    [
        {
            "density" : 1.2,
            "vertices": [
                [0.0, 8.9], [5.6, 7.8], [3.5, 0.0], [3.6, 9.9]
            ]
        }
    ]   
}

My question:
Can I configure PhysicsEditor so that it saves shapes in this format automatically? If not, is there some software that allows that kind of configuration?