Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark Physics & Dark A.I. & Dark Dynamix / Ageia PhysX inconsistency

Author
Message
CNETECH
17
Years of Service
User Offline
Joined: 9th Feb 2007
Location:
Posted: 9th Feb 2007 23:56
I have a Dark Basic Pro Online application running with the latest PhysX driver on four different Windows XP Pro machines and two of the machines get a different result for the physics of dice rolling than the other two. They are wrong in the same way. Anyone have any idea why the physics is not the same on them?
Hoozer
18
Years of Service
User Offline
Joined: 8th Sep 2006
Location: Bremerhaven (Germany)
Posted: 10th Feb 2007 17:49 Edited at: 10th Feb 2007 17:50
@ CNETECH: I don't know what exactly do you mean with "get a different result for the physics of dice rolling"?

How do you "throw" them, maybe it's depending on this!

Maybe you can give us a smal example-code, so we can test it and see what is happening on our machines!

I allways thought that the physics are calculated in "real-time", meaning that the "results" of the simulation be can different, depending on the "problem" simulated! The objects inside a scene never behave exactly in the same way, that's what I mean.

(I might be wrong with my thoughts!)


Hoozer

AMD 64X2 4800+ (939); 2GB; GF 6800LE (@12PS, 6VS; 380 MHz, RAM: 434 MHz)
DP-Sw-Mode-Comp-Entry (updated to V. 1.2):
http://forum.thegamecreators.com/?m=forum_view&t=93582&b=5
CNETECH
17
Years of Service
User Offline
Joined: 9th Feb 2007
Location:
Posted: 10th Feb 2007 19:49
Here is how the dice is "thrown":

LOAD_AND_THROW_DICE:
`*** dice texture
load image "media\3d\Dice_Cube01.bmp", DICE_TEXTURE_ID

`*** die 1

load object "media\3d\Dice_Cube01.x", DIE_ONE_ID
scale object DIE_ONE_ID, 3, 3, 3
SET ALPHA MAPPING ON DIE_ONE_ID, 90
SET shadow shading ON DIE_ONE_ID
SET OBJECT SPECULAR POWER DIE_ONE_ID, 0
SET OBJECT AMBIENT DIE_ONE_ID, 0
SET OBJECT LIGHT DIE_ONE_ID, 0


`*** die 2
load object "media\3d\Dice_Cube01.x", DIE_TWO_ID
scale object DIE_TWO_ID, 3, 3, 3
SET SHADOW SHADING ON DIE_TWO_ID
SET ALPHA MAPPING ON DIE_TWO_ID, 90
SET OBJECT SPECULAR POWER DIE_TWO_ID, 0
SET OBJECT AMBIENT DIE_TWO_ID, 0
SET OBJECT LIGHT DIE_TWO_ID, 0


hide object DIE_ONE_ID
hide object DIE_TWO_ID

`Use predetermined physics to control outcome of dice roll
rotX1 = centerDieResultParamsColl(dieOneVal,dieTwoVal).rotX1
rotY1 = centerDieResultParamsColl(dieOneVal,dieTwoVal).rotY1
rotZ1 = centerDieResultParamsColl(dieOneVal,dieTwoVal).rotZ1

rotX2 = centerDieResultParamsColl(dieOneVal,dieTwoVal).rotX2
rotY2 = centerDieResultParamsColl(dieOneVal,dieTwoVal).rotY2
rotZ2 = centerDieResultParamsColl(dieOneVal,dieTwoVal).rotZ2

`force die result
rotate object DIE_ONE_ID, rotX1,rotY1,rotZ1
rotate object DIE_TWO_ID, rotX2,rotY2,rotZ2

show object DIE_ONE_ID
show object DIE_TWO_ID

phy set rigid body linear velocity DIE_ONE_ID, 0, 0, 50
phy set rigid body linear velocity DIE_TWO_ID, 0, 0, 50

haveDiceBeenThrown = 1
throwStartTime = timer()

GOSUB LOG_THROW
RETURN

The physics was predetermined to give the desired outcome. If the physics is set exactly the same then is should yield the same results on all machines.
CNETECH
17
Years of Service
User Offline
Joined: 9th Feb 2007
Location:
Posted: 12th Feb 2007 04:33
After extensive research I have not located the problem. Before throwing the dice I call an external application using EXECUTE FILE. For some reason using EXECUTE FILE is altering my physics outcome. Any ideas?
CNETECH
17
Years of Service
User Offline
Joined: 9th Feb 2007
Location:
Posted: 12th Feb 2007 15:12
After extensive research I have located the problem. Before throwing the dice I call an external application using EXECUTE FILE. For some reason using EXECUTE FILE is altering my physics outcome. Any ideas?

Login to post a reply

Server time is: 2024-11-24 17:58:46
Your offset time is: 2024-11-24 17:58:46