Take the 2-minute tour ×
Arqade is a question and answer site for passionate videogamers on all platforms. It's 100% free, no registration required.

I was watching video-review and reviewer said you can get different results with the same input which is weird since from what I know Rovio uses Box2D in their games and that it is deterministic.

So did they use different physics engine this time or did they screw something up?

share|improve this question
    
All computer RNGs are strictly deterministic, unless the computer is hooked up to a geiger counter or something. Is there something about Box2D that prevents it from being seeded with the microsecond, or some other quickly-changing input that makes the results infeasible to predict? –  octern Oct 4 '12 at 21:26
    
@octern It's not that Box2D is deterministic, it's that Angry Birds doesn't have any random elements to the physics calculations - it's incredibly precise (so hard to get the exact same results each time) but not random. –  Raven Dreamer Oct 4 '12 at 23:51
1  
@octern The "randomness" in both of these games comes not with the physics engine, which is strictly deterministic, but with the fact that user input is imprecise and the complexity of the simulation is such that even a small difference such as few pixels in positioning can cause wildly different results. See: gaming.stackexchange.com/questions/44595/… –  Private Pansy Oct 8 '12 at 16:27
    
@yi yang: in bad piggies it's easy to produce exact input, and still the result differst frustratingly from run to run. –  peter Oct 14 '12 at 9:45
    
It is possible to introduce non-determinism between different phones due to different instruction sets or micro-architectures. If the engine is threaded, there is also the possibility that context switches, which occur at (from the view of the game/player) non-deterministic times may affect the outcome. And finally, bugs like uninitialized memory or a variable time step may make the result of a computation non-deterministic. So it is quite possible that the game is non-deterministic even without any RNG. –  user2640 Oct 16 '12 at 20:49

2 Answers 2

There is an element of randomness in the Box2D engine. This is easily tested. In the Sandbox area, place a piggy up high and have him drop on something asymmetric, such as a wheel, that will cause him to fall down the cliff. You'll notice that he'll bounce in different places and come to rest in slightly different locations each time.

share|improve this answer
    
this is exactly what i am experiencing. @kotekzot: why? –  peter Oct 17 '12 at 13:05
    
@kotekzot, that is incorrect. The link you provided accounts for the case where the user has input. I carefully described a scenario in which the user does not have input. This is something that you couldn't do in Angry Birds but can be done in Bad Piggies. In Bad Piggies you can set up the environment and just let the machine run the scenario several times without touching anything. The Box2D engine accepts random numbers to generate this affect. –  user959690 Oct 17 '12 at 17:12
    
I stand corrected, I made some false assumptions regarding the game. –  kotekzot Oct 17 '12 at 19:30

From my experience (100% completed the game) it is deterministic. Without interaction, the same input will always get the exactly same result. So if you didn't reach an objective but got very very close with a certain vehicle, there is no need to try it again and again. it will always fail.

But in later levels you have to interact a lot (launching rockets, pop balloons etc.), which can of course create totally different results, even if you don't modify your construction. Perhaps that's what they meant in the video.

share|improve this answer
1  
this answer is just plain wrong. take level 1-8, pig in box in middle, wooden wheel left right and bottom. every time i let it runt it's different. if i'm really lucky, it doesnt crack and i get the star. first i thought it might be due to the single core processor in my cheap phone, like doing less calculation points, a coarser interpolation and therefore different results depending on background activity. but a friend with an S2 reports the same, and i cant think that this is too slow too. –  peter Oct 14 '12 at 9:33
    
@peter hm, perhaps there really is a difference between different phones/machines (as stated above by Joe Wreschnig). I played it a lot on the iPad (3rd gen) and the behavior was ALWAYS the same (just as I wrote it in my answer). I never noticed randomness when no human interaction was required. –  moeTi Oct 17 '12 at 9:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.