Yesterday I thought alot about Cell and how it should aid physics, I just realised that I cant figure out a way to actually do physics without either being accurate to death (and therefore potentially killing even nextgen Consoles) or having alot of possible "Ooops"-Situations. Im wondering how its done in current games and what approach next-gen Games are taking, anyway this are the algorithms I could come up with:
1) The easiest approach:
Compute movement of each Object without caring for collisions. Then check any combination of 2 Objects (translated with their already computed movement) for collision, calculate position and 'refraction' angle at the time of collision. Adjust both objects so they represent their final speed and direction after the collision. Pick next 2 Objects.
Pros: Complexity is n!/2 (ignoring complexity of Objects); Can use -atleast partially- 'Streaming'
Dodgy Situations:
*) Fast moving Objects could "jump" over Collisions
*) Outcome is dependand of ordering of Pairings, suppose a marble is shot onto 2 others, hitting both, but not at once. Would need some kind of depth-ordering to fix this, which would need random access.
*) Similar to last Point, but suppose 2 Marbles (a,b) are moving. The Marble a would hit both b and c, but b could still hit something on its way to collision point, if b`s Path would be corrected before looking at a, a might not collide with b at all.
2) An more exact approach:
Compute a movement-hull of each Object without caring for collisions. Test every pairing of 2 hulls for collision, if colliding adjust movement of both correctly, recalculate hulls. take next 2 hulls
Pros: Fixes fat moving objects, Can still -atleast partially- 'Streaming'
Cons: More intense than the easy approach, especially since hulls could get quite complex (nonlinear movement or irregular shaped objects)
Dodgy Situations:
*) Outcome is dependand of ordering of Pairings - see easy approach
3) Deadly exact approach:
Compute a movement-hull of each Object without caring for collisions, create a list of Object-Pairings. Test every pairing of 2 hulls for collision, if colliding store the Pairing in the list, sorted by collision-time. take next 2 hulls
For each Pairing (a,b) in the list do:
adjust movement of both correctly, recalculate hulls, remove all Pairings in the list which contain either a or b, then test all Pairings (a,n) and (b,n) for Collision, store coliding Pairings in the list, sorted by collision-time.
Pros: Fixes all Dodgy Situations - should be VERY accurate
Cons: Complexity can (and will) explode. heavy Random Access.
Sorry for the longish post and my limited english, but Im really curious how this is being dealt with.
1) The easiest approach:
Compute movement of each Object without caring for collisions. Then check any combination of 2 Objects (translated with their already computed movement) for collision, calculate position and 'refraction' angle at the time of collision. Adjust both objects so they represent their final speed and direction after the collision. Pick next 2 Objects.
Pros: Complexity is n!/2 (ignoring complexity of Objects); Can use -atleast partially- 'Streaming'
Dodgy Situations:
*) Fast moving Objects could "jump" over Collisions
*) Outcome is dependand of ordering of Pairings, suppose a marble is shot onto 2 others, hitting both, but not at once. Would need some kind of depth-ordering to fix this, which would need random access.
*) Similar to last Point, but suppose 2 Marbles (a,b) are moving. The Marble a would hit both b and c, but b could still hit something on its way to collision point, if b`s Path would be corrected before looking at a, a might not collide with b at all.
2) An more exact approach:
Compute a movement-hull of each Object without caring for collisions. Test every pairing of 2 hulls for collision, if colliding adjust movement of both correctly, recalculate hulls. take next 2 hulls
Pros: Fixes fat moving objects, Can still -atleast partially- 'Streaming'
Cons: More intense than the easy approach, especially since hulls could get quite complex (nonlinear movement or irregular shaped objects)
Dodgy Situations:
*) Outcome is dependand of ordering of Pairings - see easy approach
3) Deadly exact approach:
Compute a movement-hull of each Object without caring for collisions, create a list of Object-Pairings. Test every pairing of 2 hulls for collision, if colliding store the Pairing in the list, sorted by collision-time. take next 2 hulls
For each Pairing (a,b) in the list do:
adjust movement of both correctly, recalculate hulls, remove all Pairings in the list which contain either a or b, then test all Pairings (a,n) and (b,n) for Collision, store coliding Pairings in the list, sorted by collision-time.
Pros: Fixes all Dodgy Situations - should be VERY accurate
Cons: Complexity can (and will) explode. heavy Random Access.
Sorry for the longish post and my limited english, but Im really curious how this is being dealt with.