I'm developing a game on iOS Sprite Kit and on AndEngine (with Box2d) simultaneously. I want the game's physics to be identical on both platforms. Sprite Kit uses Box2d internally for physics simulation same as in AndEngine.
In AndEngine's Box2d, I use body.SetLinearVelocity(x,y)
where x = y = density/34f(some constant value)
In Sprite Kit, I use ball.physicsBody.velocity = CGVectorMake(x,y)
I similarly use the code below for gravity & impulse in AndEngine & Sprite Kit respectively.
For Gravity :
In AndEngine's Box2d, I use
mPhysicsWorld = new FixedStepPhysicsWorld(60, 1, new Vector2(0, -1f),false, 6, 2);
In Sprite Kit, I use
self.physicsWorld.gravity = CGVectorMake(0, -1);
For Impulse :
In AndEngine's Box2d, I use
body.applyLinearImpulse(new Vector2(2f, 2f),new Vector2(body.getWorldCenter().x, body.getWorldCenter().y));
In Sprite Kit, I use
[ball.physicsBody applyImpulse:CGVectorMake(2,2)];
In AndEngine I give the velocity is given w.r.t the density of the devices so that we can make the gameplay looks same in all android devices like the ball starts and ends at almost the same time in all devices(Mobiles, Tablets)
I want to know what value to be given in sprite kit w.r.t AndEngine so that physics in both platforms looks similar. Also whether we have to give different velocity for different screen sizes like in AndEngine or same velocity should be given for all iOS devices.
Apart from setting velocity, I need to know whether I should keep the Gravity, Impulse variable according to screen sizes.