Physics Randomness

New releases and general discussions.

Post » Wed Jul 30, 2008 9:31 pm

If you start the same physics demo over and over, physics will react differently.

This sucks for phyiscs puzzle games.
B
2
S
2
G
5
Posts: 512
Reputation: 2,674

Post » Wed Jul 30, 2008 9:35 pm

I think Linear/Angular Dampings can fix this.
B
4
S
2
G
4
Posts: 719
Reputation: 2,938

Post » Wed Jul 30, 2008 9:56 pm

It's because the physics engine relies on TimeDelta, and TimeDelta has inaccuracies. In two executions of your game, the sequence of values for TimeDelta will usually vary somewhat. This has knock-on effects, and like the fluttering of a butterfly's wings causing a hurricane, the physics engine will sometimes play out a different sequence of events.

I can't make the physics engine framerate dependent (ie. force it to play out identically each time) - that would cause more problems than it solves - as the article on TimeDelta explains.

However, I don't think it sucks for Physics games. It does introduce an element of randomness - but in a game like this physics game - it is nearly impossible for the player to set up an identical game twice in a row - so you'd never notice. You should still be able to design physics puzzle levels that are easily possible - a realistic setup will result in the ball rolling to the target every time, for example. It's only if the whole thing hangs by a thread that any element of randomness might prevent, for example, the ball rolling down the slope to the destination.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Wed Jul 30, 2008 10:03 pm

Agreed. In any physics puzzle game there has to be a certain degree of "forgiveness" designed into the puzzle to allow for randomness. There might be a "perfect" or "optimal" way to complete the puzzle, but there should be some small amount of leeway on either side of that line. Just try to incorporate that into the design and you'll be fine.

It's like when Jeff Goldblum is flirting with that chick in Jurassic Park... dripping water down her hand, and explaining that it will never follow the exact same path. Chaos Theory, man.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Wed Jul 30, 2008 11:37 pm

[quote="deadeye":esaawtte]It's like when Jeff Goldblum is flirting with that chick in Jurassic Park... dripping water down her hand, and explaining that it will never follow the exact same path. Chaos Theory, man.[/quote:esaawtte]
I though the Chaos Theory is about that everything is in regular order but you cant see it with your own eyes becouse its too complicated for a human mind.
B
4
S
2
G
4
Posts: 719
Reputation: 2,938


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 4 guests