I have a project where two objects are falling down:
Falling from top to bottom of the layout lasts:
As we can see, Bullet speed (400) was the same in all browsers. But Block speed (default physics) was completely different in IE+FF versus Chrome+Opera.
Is there any good way to make the physical speed of falling down the same for all browsers? (the correct speed I think would be FF+IE)
Unfortunately, I can't post a url to the project file on this forum.
When Box2D only uses a simple Fixed time step then code execution speed impacts the results. It's the reason I don't like Box2D much, the official box2d has never implemented cross platform and code speed execution handling. Now not all browsers are made the same. IE browser has slow JS execution speed though improved these days.
But there are a few things to check out first.
1. Go to your project properties.
2. Check under physics engine. You have 3 optiosn. Webbrowser, ASM.js and CocoonJS. try out Web and asm options and see if helps at all.
If that doesn't work. you can work on creating an improved manual timestep in C2 physics option. If the above doesn't work, this one will.
I have no physics option in my project properties, to choose cocoon.js, asm etc.
I added an action on the Block object to change the Physics world stepping mode to "frame independent" (there is a tutorial titled "Delta-time and framerate independence"). I also displayed the system dt variable.
After doing this the speeds are more equal:
So the speed in Chrome is now more like FF+IE. In Opera it's still slow. I don't know, maybe the programmatic solution that you linked would further improve the speed in Opera - but I don't know where to put that code.
Develop games in your browser. Powerful, performant & highly capable.
But on a different computer.... it's 3 times slower. omg :(