Hi,
what is the current status of this proposal? I'm using JBox2D, the Java port, and the serialization there is implemented using Google ProtocolBuffers.
For me personally there are three limitations with this approach:
1. There's no IDE support for the TextFiles you can generate with this
2. It doesn't yet support the latest features in the development versions of JBox2D (e.g. ChainShapes)
3. It's not cross platform (although it could be)
I like the approach of having an XML-Serialization format instead, especially for reasons 1 and 3. As discussed in the JBox2D-Forum, it might help a lot to have a format that has a valid XML-schema:
1. There will be IDE support out of the box, so you can use any IDE supporting XML to manually inspect the files with auto-completion, syntax-highlighting etc.
2. You can easily validate the files
3. It's very easy to implement the serialization(marshalling/unmarshalling) by generating the required code from the schema. In Java, e.g. there's JAXB for this. I assume other languages have similar frameworks.
I just started to create a schema for my NetBeans-based Box2D-Editor (https://github.com/eppleton/JBox2D-Support) . If there would be a cross-platform default schema/format available I would gladly support this instead and generate my classes from it. It would be great, since my Editor could then be used for all languages. Here's the current version of my schema: https://github.com/eppleton/JBox2D-Support/blob/master/World%20Editor/src/de/eppleton/jbox2d/persistence/Box2d.xsd
Maybe we can use this as a starting point.
--Toni
what is the current status of this proposal? I'm using JBox2D, the Java port, and the serialization there is implemented using Google ProtocolBuffers.
For me personally there are three limitations with this approach:
1. There's no IDE support for the TextFiles you can generate with this
2. It doesn't yet support the latest features in the development versions of JBox2D (e.g. ChainShapes)
3. It's not cross platform (although it could be)
I like the approach of having an XML-Serialization format instead, especially for reasons 1 and 3. As discussed in the JBox2D-Forum, it might help a lot to have a format that has a valid XML-schema:
1. There will be IDE support out of the box, so you can use any IDE supporting XML to manually inspect the files with auto-completion, syntax-highlighting etc.
2. You can easily validate the files
3. It's very easy to implement the serialization(marshalling/unmarshalling) by generating the required code from the schema. In Java, e.g. there's JAXB for this. I assume other languages have similar frameworks.
I just started to create a schema for my NetBeans-based Box2D-Editor (https://github.com/eppleton/JBox2D-Support) . If there would be a cross-platform default schema/format available I would gladly support this instead and generate my classes from it. It would be great, since my Editor could then be used for all languages. Here's the current version of my schema: https://github.com/eppleton/JBox2D-Support/blob/master/World%20Editor/src/de/eppleton/jbox2d/persistence/Box2d.xsd
Maybe we can use this as a starting point.
--Toni