« Simulation is a competitive advantage! | Main | Debugging Simics -- on Simics »

11/27/2012

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00d83451f5c369e2017d3e388229970c

Listed below are links to weblogs that reference Determinism, Simics, and Flying Piggies:

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

Rich Dubielzig

A good post, but Bad Piggies is not deterministic. I suspected this while playing the game, but I just confirmed it after reading this blog post.

I reran my solution for level 1-35 three times with zero input from me, I just let the cart roll down the hill and fall onto a box of TNT. All three times, the resulting explosion occurred in a different manner.

I think this is due to the way that the Android handles animation, you can see the overview here:

http://developer.android.com/guide/topics/graphics/prop-animation.html

If Bad Piggies ran its own internal timer it could be a deterministic game, but performance could suffer because when the apparent speed of the game would change as the phone's processing load grew or shrank. Instead the game relies on Android to tell it what the system time is when it is time to redraw the screen, and since the outside system load is non-deterministic, the time values at which the screen gets redrawn will be slightly different, and this will blow up into different behavior over time or as the pig cart receives impulse forces like explosions.

The comments to this entry are closed.

Wind River Blog Network

  • The Wind River Blog Network is made up of a variety of voices: executives, technologists, and field engineers. Our mission is to foster direct conversations with our customers, partners, and colleagues in the device software industry.

Syndication

Wind River on Twitter

  •    @WindRiver

Disclaimer

Blog powered by TypePad