Hello atilim and gorkem!
I have a some special problem...
I was writing a game in some mexican beer engine and all was good, but than I discovered Gideros and loved it!
After porting my code I saw that my main game character which built on physics (it's using a lot of bodys and joints - near 100) is moving some different and wrong that crashes my gameplay. All physics parameters are identical as in corona version. After playing for a while with them I understood that there is nothing I can do with that. I think that the reason in Box2D version: Gideros uses 2.2.1 and corona 2.1.2 (May be developer of Box2D made some optimizations to the engine and that very influenced my physics model).
I don't want to come back to corona, it's much slower than Gideros and show 10 FPS less! Plus I love Gideros for a plugin system, offline builds, player and other nice things...
I just wanted to ask, is it possible to do for me special build with Box2d 2.1.2? I know that I'm asking too much and you guys have a lot of work to do, but maybe it's possible.. I just don't know what to do.. my game just unplayable with 2.2.1.
Also I hope that Gideros will be not slower on 10 FPS with the old version of Box2D.
Thanks.
Comments
2.2
- The dynamic tree is now self-balancing, leading to significant speed improvements for large worlds.
- Added wheel joint, friction joint, and rope joint.
- Implemented b2ChainShape with smooth collision support.
- The gear joint no longer requires static bodies to be used.
- Many bug fixes.
2.2.1
Bug fixes
Premake build system
Custom Visual Studio 2010 and XCode 4 projects
b2World::Dump to dump the world to a testbed compatible text file.
Soft weld joint
And I've seen some differences between Gideros and Corona:
- While creating a fixture, Corona named it as "bounce" but we named it as "restitution"
- Also some default values are different:
Corona:
* density = 1.0 (dynamic body)
* friction = 0.3
* bounce = 0.2
Gideros (we're directly using the default values of Box2D):
* density = 0.0 (static body)
* friction = 0.2
* restitution = 0.0
Other than velocityIterations and positionIterations are same. And physics scale is same (30).
I hope this information helps you.
Likes: JuanZambrano
Thanks atilim.
I didn't know about "bounce" and "restitution", but I was using bounce = 0.0 which is identical to restitution = 0.0 (while "bounce" is not recognized by Gideros, it sets "restitution = 0.0 by default).
I have found an interesting thing..
The default value positionIterations in corona is 8 and velocityIterations is 3. (http://developer.anscamobile.com/content/game-edition-box2d-physics-engine)
But in Gideros it's 3 for positionIterations and 8 for velocityIterations - like Box2D defaults ("The suggested iteration count for Box2D is 8 for velocity and 3 for position.")
It looks like corona is wrong...
Position and velocity iterations is the main parameter that is very influence my character behavior. May be there is some mistake with this values...
If I increase velocity and positions iterations then my game became slow.
btw, there is a property "collideConnected" in joint definition table. You can set this field as false so that the attached bodies doesn't collide. Maybe you want to try it:
I think it's became a little better.. They colliding anyway (but I need this). Plus I've changed some parameters and it's became better.
Anyway I'll continue testing and I'll not come back to Corona