|
Post by vreden on Feb 8, 2015 14:32:26 GMT
How come the exact same design has different outcomes on different "plays" and with different playback speeds.
I have noticed that a design that when tested sometimes breaks at one point while other times breaks at different places or not at all.
|
|
|
Post by doglock on Feb 8, 2015 14:59:08 GMT
Just goes to show that the laws of physics are working. You can't pitch the same fastball twice. Sometimes you're high and away and sometimes you're low and inside.
|
|
|
Post by vreden on Feb 8, 2015 16:10:00 GMT
well shouldn't the exact same design in the exact same environment have the exact same results?
|
|
|
Post by goran10gp on Feb 8, 2015 17:03:45 GMT
i guess its some RNG (random number generator)
|
|
|
Post by Zeblote on Feb 8, 2015 17:08:50 GMT
The physics engine isn't deterministic and will likely never be.
|
|
|
Post by shark1669 on Feb 8, 2015 22:43:47 GMT
I love the inconsistent nature of this game, it makes for some hilarious moments.
|
|
|
Post by doglock on Feb 9, 2015 2:17:28 GMT
well shouldn't the exact same design in the exact same environment have the exact same results? If the physics engine is attempting to make real life calculations. Why would you get the exact same results? Fire a canon in real life. ( 12 pound naval gun or Napoleon ) Same set up every time? Not really. There are always different stresses and and other factors that affect the shot. Never hit the same spot twice. Looks like the physics engine that is being used for this game is successfully emulating real life. Makes it a heck of a lot more fun.
|
|
|
Post by Arlekin on Feb 9, 2015 12:51:04 GMT
Well, actually i think u guys are contradicting yourselves. I mean for all we know (up to the quantum physics level) world physics is rather deterministic (lots of technology is based on assumption some thing will happen in some ways, after all). The example with cannon is perfect: IF you would have EXACT SAME conditions (placement of mass in cannonball and forces acting on it) it should give exact same result. Each half-inch derivation is caused by something, as Einstein said "God doesn't play dice". (im atheist) So im no physicist, but i think that for all reasonable levels of details there is finite and deterministic set of forces in play. Of course game engine may use some RNG to emulate some of the conditions (its hardly reasonable to expect it to simulate ALL of the phisic properties) so this is justified. However, despite what i said above, i understand vreden - sometimes things happen differently right after i begin siege - so basically only my machine was placed, and sometimes things works sometimes they dont. But well.... what you gonna do i guess...
|
|
|
Post by zodium on Feb 9, 2015 16:08:41 GMT
It's deterministic if you have the exact same conditions every time, but machines can't have that because they don't exist in a vacuum. The developers can do this by actively modeling tons of microprocesses (computationally expensive), or just including some randomness (very cheap) for essentially the same effect.
|
|
|
Post by icars3g on Feb 10, 2015 19:07:52 GMT
If you drove two of the same cars into the same wall at the same speed (everything is the same) there will be two different dents. I have no idea why this is but who cares.
|
|
|
Post by leafy on Feb 11, 2015 14:10:26 GMT
Its sometimes flustrating though. I've got a very nice catapult design with a janky reloader but sometimes on the first shot it flings the holder off with the bomb. And I have to reset, then its fine, and after a couple more tests, the holder seems to not attach to the arm again. Its weird.
|
|
|
Post by pdcwolf on Feb 12, 2015 5:42:50 GMT
Well, hello everyone, this is my first post so yeah, pretty new here. We were having this discussion back at /v/ (normally I wouldn't even name the place but you know, it's already well known here) and this thread got referenced. Now I'm no pro at this nor do I even know if I'm right, but I do have experience with the area. This is what me and other guy were discussing. As I said, I'm in no way pro at this, but this is, I guess, the explanation everyone is looking for. Even when the game shows the exact same conditions, results may vary because inside the physics engine the numbers vary a small bit.
|
|
|
Post by Arlekin on Feb 12, 2015 8:45:05 GMT
Oh thats right, how could i forget about that. It is true that floating point operations are... well, weird - so that must be it! Especially since many constant values in physics has a lot of decimals...
Very good point man!
|
|
|
Post by Zeblote on Feb 12, 2015 10:25:24 GMT
Floating point operations should still produce the same inaccuracy every time on the same computer. I think the problem here is unitys implementation.
|
|
|
Post by pdcwolf on Feb 12, 2015 14:53:15 GMT
Floating point operations should still produce the same inaccuracy every time on the same computer. I think the problem here is unitys implementation. Not really. When you have multiple type changes (say float to int and for some weird reason back to float again) you are losing precious precision AND given the first float value could be an actual variable gathered either from the physics environment or direct user input (that's why its a variable and not a constant in the first place, like gravity would be), it gets rounded differently each time. As I said, the easiest way to prove this is to play with the timescale above 100% or just having less than 30 fps, you'll realize calculations are now much more crude (mostly turning to truncating instead of rounding) and the results are way more unpredictable. Again, I'm not saying this is the definite explanation, but your case doesn't hold, there's no reason at all to produce the same results twice if you go from 2.569735497384773 to 2.5 or 2.6 or even 2 when the engine is trying to calculate as fast as possible to keep the game from being a slideshow. I do agree, however, that unity's implementation could be making the problem more extreme.
|
|