Using Algodoo as a tool and not a toy: Better export options
4 posts • Page 1 of 1
Using Algodoo as a tool and not a toy: Better export options
I searched the suggestions subforum for export and format, but i found nothing, so excuse me if this has already been requested.
If algodoo had some sorts of XML export option, that would save shapes and constraints in a easy to exchange XML format, maybe we could use it game development along with the opensource Box2D engine (Could be really useful for level development), I know that Algodoo and Box2D might not be 100% identical, but the differences is small at least in appearence.
The format could be something along with:
Then it would be up to developers to take the initative write parsers.
I guess you could argue that one could just use the existing format, but I think that a more easy to use format is needed for algodoo to be useful.
If algodoo had some sorts of XML export option, that would save shapes and constraints in a easy to exchange XML format, maybe we could use it game development along with the opensource Box2D engine (Could be really useful for level development), I know that Algodoo and Box2D might not be 100% identical, but the differences is small at least in appearence.
The format could be something along with:
- Code: Select all
File structure:
MyExportedSceneName
- scene.xml
- textures
- 0.png
- 1.png
XML Format:
<scene>
<group id="grpNameOrId">
<shape id="0">
<svg>
<!-- SVG XML ? -->
</svg>
<properties>
<!-- Physical propertes goes here,
Density, Mass, Friction, Restitution,Attraction, center of Mass, velocity, position etc. -->
</properties>
<appearance>
<!-- Colour, Texture, texture position, Opacity etc. -->
</appearance>
</shape>
<spring constant="100" damping="0.1" targetlength="0.5">
<for id="0" x="2" y="2" />
<for id="1" x="2" y="2" />
</spring>
<!-- etc. with other constraints -->
</group>
</scene>
Then it would be up to developers to take the initative write parsers.
I guess you could argue that one could just use the existing format, but I think that a more easy to use format is needed for algodoo to be useful.
- EJTH
- Posts: 3
- Joined: Fri Jan 18, 2013 12:49 pm
Re: Using Algodoo as a tool and not a toy: Better export options
more easy to use? what is more easy to use than
Function -> {
Parameter1 = Value1;
Parameter2 = Value2;
Parameter3 = Value3;
Parameter4 = Value4;
Parameter5 = Value5;
};
surely not
<function><Parameter1>Value1</Parameter1><Parameter2>Value2</Parameter2><Parameter3>Value3</Parameter3><Parameter4>Value4</Parameter4><Parameter5>Value5</Parameter5></function>
Function -> {
Parameter1 = Value1;
Parameter2 = Value2;
Parameter3 = Value3;
Parameter4 = Value4;
Parameter5 = Value5;
};
surely not
<function><Parameter1>Value1</Parameter1><Parameter2>Value2</Parameter2><Parameter3>Value3</Parameter3><Parameter4>Value4</Parameter4><Parameter5>Value5</Parameter5></function>
- jon_joy_1999
- Posts: 233
- Joined: Fri Dec 09, 2011 12:51 am
Re: Using Algodoo as a tool and not a toy: Better export options
Yes actually XML would be way easier to work with than that. also an unpacked format (Some enviroments don't have means of unpacking binary or compressed data, like flash, it can however read XML)
How many languages do you know with build in parsing of what you described? Let me take a guess, none!
XML has the bonus of being usable in ANY enviroment as well as being selfdescriptive.
How many languages do you know with build in parsing of what you described? Let me take a guess, none!
XML has the bonus of being usable in ANY enviroment as well as being selfdescriptive.
- EJTH
- Posts: 3
- Joined: Fri Jan 18, 2013 12:49 pm
Re: Using Algodoo as a tool and not a toy: Better export options
You can write your own .phn <-> xml converter if you need it, why should Algodo care about Box2d ?
Dream of Algodoo as game development engine...
-
Kilinich - [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
4 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 9 guests