Bullet File Format?
-
- Posts: 3
- Joined: Sun Apr 29, 2007 1:34 pm
Bullet File Format?
Not a really brilliant question, but I wanted to know if you use only collada as the physics format or is there a specialized bullet file format that is loadable, preferably binary?
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Bullet File Format?
grizzley90 wrote:Not a really brilliant question, but I wanted to know if you use only collada as the physics format or is there a specialized bullet file format that is loadable, preferably binary?
Right now, Bullet supports COLLADA Physics. In the future, dependent on feedback, a contribution for binary (zlib) compressed files will be supported.
-
- Posts: 198
- Joined: Mon Sep 04, 2006 5:31 pm
- Location: Switzerland
You can simply bzip2 the XML file. I made some tests some time ago comparing binary file formats with equivalent XML files both compressed and uncompressed. The compressed XML file won in nearly all cases. Has the advantage that once you have a file reader you simply have to make a wrapper for bzip2 decoding and plug it in between resulting in nearly zero programming overhead and fully compatible.
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Zipping XML would be one possibility.
But many developers don't want to include libxml and COLLADA-DOM just to load some data into a run-time / game. So a light-weight serialization or perhaps memory dump of the classes might be better for them.
I expect that most game engines already have a serialization mechanism for other data (graphics etc), so perhaps not too much demand for this binary file format feature.
But many developers don't want to include libxml and COLLADA-DOM just to load some data into a run-time / game. So a light-weight serialization or perhaps memory dump of the classes might be better for them.
I expect that most game engines already have a serialization mechanism for other data (graphics etc), so perhaps not too much demand for this binary file format feature.
-
- Posts: 3
- Joined: Sun Apr 29, 2007 1:34 pm
-
- Posts: 198
- Joined: Mon Sep 04, 2006 5:31 pm
- Location: Switzerland
Binary formats always have the caveat of byte order dependency and other troubles. The good news about XML and company is that they are ASCII only which is easy to export and import and very error proof. Many say binary files are smaller and quicker. The smaller argument doesn't hold as I noticed some time ago with my compression tests where ASCII files under compression ( which is usually the case in game content like PAK files ) had been much smaller. What goes for speed this is correct that you can read the files quicker but if you want to read a binary dump that quick you need to adapt your program to expose the exact memory layout as in the file. This on the other hand requires overhead for re-processing data in memory to fit your internal layout. Usually the game code is already done to a large extend, especially what goes for the internal API hence parsing an ASCII format is much easier than having to deal/convert a binary format. Granted if you can design your code from the beginning with a given format in mind this problem can be worked around but then you are locked to one file format and using others becomes a pain. Due to those reasons in my opinion I would stick to XML files or other ASCII files. This has been just my humble experience and of course does not have to mean anything in the end.