Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Identical Physics on different devices
Started by prographodeveloper Nov 28 2018 09:03 AM

2 replies to this topic

Best Answer davebollinger , 28 November 2018 - 09:20 AM

"exactly"?  no, definitely not.

the problem is the word "exactly" (because it has only one "pure" meaning, and admits no "fudge factor")

 

"nearly identical"?  probably.  (if all initial conditions and subsequent inputs are identical, then simulation results will be nearly identical)  but box2d is not deterministic (covered here) and cannot be made so.

 

plus, the default when used in Corona is to use variable (framerate-based) time steps - which greatly affects the integration quality over time.  in fact, with variable time steps you can't even get exactly same results on same device!

[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

prographodeveloper

[GLOBAL: userInfoPane.html]
prographodeveloper
  • Contributor

  • 281 posts
  • Corona SDK

If I set up a scene exactly the same on iOS, Android and HTML5 will they all behave exactly the same?



[TOPIC: post.html]
#2

davebollinger

[GLOBAL: userInfoPane.html]
davebollinger
  • Corona Geek

  • 1,259 posts
  • Enterprise

  Best Answer

"exactly"?  no, definitely not.

the problem is the word "exactly" (because it has only one "pure" meaning, and admits no "fudge factor")

 

"nearly identical"?  probably.  (if all initial conditions and subsequent inputs are identical, then simulation results will be nearly identical)  but box2d is not deterministic (covered here) and cannot be made so.

 

plus, the default when used in Corona is to use variable (framerate-based) time steps - which greatly affects the integration quality over time.  in fact, with variable time steps you can't even get exactly same results on same device!


  • prographodeveloper likes this

[TOPIC: post.html]
#3

prographodeveloper

[GLOBAL: userInfoPane.html]
prographodeveloper
  • Contributor

  • 281 posts
  • Corona SDK

Wow, thank you, that is really good to know. You are very knowledgable. 




[topic_controls]
[/topic_controls]