0
\$\begingroup\$

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?

\$\endgroup\$
3
\$\begingroup\$

Can you "configure" it? No. You can write an exporter plugin for it however.

\$\endgroup\$
2
  • \$\begingroup\$ Thanks. Isn't that still configuration? \$\endgroup\$ – Paul Manta Sep 25 '11 at 20:58
  • 1
    \$\begingroup\$ @Paul I consider "configuration" to be "selecting something from a drop-down". When you have to actually write code to get an effect, it isn't really configuring anymore; it's writing code. \$\endgroup\$ – Nicol Bolas Sep 25 '11 at 22:14

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.