PhysX Not Working Properly in MultiPlayer Mode
by Philip J. Stroh · in Torque 3D Beginner · 01/27/2011 (6:09 am) · 5 replies
When I create a host and a client for the Physics demo, the physics objects are jittery. The physics objects are constantly shifting positions. It is worse on the client side.
Also, when firing the rocket launcher at the physics objects, I see the physics objects reacting to the explosion, but there is a delay in the projectile, the sound, and the particle effects.
Also, when I look at the other character, it's position does not change smoothly, but seems to change from one location to another instantaneously.
Does anyone have any ideas how to fix these problems using PhysX in a multiplayer environment? Thanks.
Also, when firing the rocket launcher at the physics objects, I see the physics objects reacting to the explosion, but there is a delay in the projectile, the sound, and the particle effects.
Also, when I look at the other character, it's position does not change smoothly, but seems to change from one location to another instantaneously.
Does anyone have any ideas how to fix these problems using PhysX in a multiplayer environment? Thanks.
About the author
Companies I worked for: VTSG: F16 simulations. Simigon: Primarily F16 simulations. Veraxx: 2D simulation called the TEN. Valador: DON, plus new Torque projects. I served in U.S. Marine reserves for a little more than 9 years in an infantry unit.
Recent Threads
#2
Unless what you're using it for would absolutely require the physics reaction to be exactly the same across a network, it's better to make the reaction a client side effect. So everyone sees a stack of boxes explode apart but they may not all see it happen in exactly the same way.
01/27/2011 (10:09 am)
The Physics demo isn't really intended for use in a multiplayer environment. It'll work for the most part but as you've seen it's not very performant which is pretty much due to the nature having PhysX networked. Unless what you're using it for would absolutely require the physics reaction to be exactly the same across a network, it's better to make the reaction a client side effect. So everyone sees a stack of boxes explode apart but they may not all see it happen in exactly the same way.
#3
Do you have any suggestions besides using PhysX, or is that the best solution for Torque and I just need to figure it out? I don't mind, but suggestions are welcome.
01/27/2011 (5:12 pm)
I was hoping to make a Gary's Mod-type application, but Gary's Mod has both single player and multiplayer.Do you have any suggestions besides using PhysX, or is that the best solution for Torque and I just need to figure it out? I don't mind, but suggestions are welcome.
#4
@Scott: With making it a client side effect there wouldn't be any problems?
01/31/2011 (9:21 am)
Interesting. We are intending on using PhysX as well. But we are also planing a co-op multiplayer for maybe two players.@Scott: With making it a client side effect there wouldn't be any problems?
#5
@Alexander
In theory, I haven't tried it myself before in Torque but it's a common trick used in games these days. It would need to be for only physics effects that don't affect gameplay as the reactions will be slightly different on each machine.
For instance, you have a section of a wall that is destructible. How those pieces fly apart doesn't matter as much as the wall is destroyed in the end.
01/31/2011 (9:46 am)
We have support for Bullet, but it's not as much a question of which API as much as the overhead of networked physics in general.@Alexander
In theory, I haven't tried it myself before in Torque but it's a common trick used in games these days. It would need to be for only physics effects that don't affect gameplay as the reactions will be slightly different on each machine.
For instance, you have a section of a wall that is destructible. How those pieces fly apart doesn't matter as much as the wall is destroyed in the end.
Torque Owner David Jauregui
Curiosity Killed the Cat Productions