Tutorial: Box2D Level Creation with Curves

kakku wrote:
Now i want to ask: Why did you use the b2EdgeChain to begin with?


I don't quite understand- do you mean you're parsing sensors or shapes into the world with it?
It's certainly possible, but I've been using it to create "terrain" for a circle to roll across, which would've been a pain to do with polygon definitions.
I find it difficoult to figure out proper svg image proportions .
As a matter of fact there is no apparent relation between screen width/height and svg metrics ..
Or am I missing an obvious step ?
Ezion wrote:
kakku wrote:
Now i want to ask: Why did you use the b2EdgeChain to begin with?


I don't quite understand- do you mean you're parsing sensors or shapes into the world with it?
It's certainly possible, but I've been using it to create "terrain" for a circle to roll across, which would've been a pain to do with polygon definitions.


i'm using it to create a "terrain" as well. and i also use it to add sensors to that terrain.
it's easy to draw them straight on top in inkscape using a different layer. just so they are positioned correctly.
and then when reading in the svg file i check for the layer names. and use either b2svg.as for a static body or Mycustomizedb2svg.as which makes them sensors and uses b2Polygon.
Pardon me for replying to an old thread..
But i made a motorcycle game a couple of months ago and used the SVG parser here: http://www.ezqueststudios.com/blog/box2 ... er-curves/

The game worked fine.
However, today I just downloaded the 2.1a version of box2dAS3 from: http://sourceforge.net/projects/box2dflash/ (yes, I know I'm a bit late) in hopes to take advantage of whatever new optimizations or features the new version has.

The thing is, I'm now wondering if the SVG parser will still work for this "updated" version of box2d. I have yet to even try the 2.1a version of box2dAS3.. though I understand it has a slightly different way of handling things compared to the older box2dAS3 versions.. and this might affect the way the SVG parser works.

Haven't tried it yet myself, but I just wanted to ask if anyone here has already tried this parser with the new 2.1a version of Box2d?
Or if there are any links to updates to the SVG parser that I do not know of. Either that or if there are any other SVG parsers out there that will accomplish the same thing..

Worst comes to worst, I'm just going to have to revert back to the old box2d version I used a couple of months ago in order to get it to work..
I'd really like to start using 2.1a though...

Original thread: https://box2d.org/forum/viewtopic.php?t=3073