Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Perfect physics equivalence between Corona and Gideros — Gideros Forum

Perfect physics equivalence between Corona and Gideros

DrixDrix Member
edited December 2012 in General questions
Dear friends,

I'm converting a game from Corona to Gideros and everything has been working fine, except the physics. For this game, it would be very important I could set the right parameters in order to produce the same physics behavior it was in Corona. A minimal difference on the trajectory of objects can make the level not be solvable.

OK, in Corona this game uses:

- content = {width = 320, height = 480, scale = "letterbox", fps = 30}
- physics.start() -- default value (body.isSleepingAllowed = true)
- physics.setScale(100)
- physics.setGravity(0, 9.8) -- default value
- physics.setPositionIterations(8) -- default value
- physics.setVelocityIterations(3) -- default value
- physics.setTimeStep(-1) -- default value (must be 1/30 for this case, right?)

In Gideros this game uses:

- Scalemode = Letterbox, Logical dimensions = 320 x 480 px
- application:setFps(30)
- b2.setScale(100)
- b2.World.new(0, 9.8, true)
- b2.World:step(1/30, 8, 3)

This produces very approximate results, but still not enough to generate a satisfactory equivalence. Is there anything I'm missing?

@atilim, would it be possible to achieve a perfect physics equivalence between Corona and Gideros?

Sorry for my bad English and thanks in advance

Comments

Sign In or Register to comment.