Captive Imagination
September 10, 2010, 03:47:12 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Check out the teaser site for the first official game by Captive Imagination: http://www.galaxiesbeyond.com
 
   Home   Help Search Calendar Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Synchronizing location and rotation  (Read 513 times)
0 Members and 1 Guest are viewing this topic.
Ion
Newbie
*
Offline Offline

Posts: 6


View Profile
« on: December 12, 2008, 04:01:14 PM »

I have a strange problem with synchronizing the physics in my game.
My game perfectly synchronizes the linear and angular velocity of the nodes, but don't seem to update the actualy location or rotation of them at all, or if at all, very seldom.
I seem to be lucky if it synchronizes the location and rotation once every 10 seconds.

When controlling the rotation and location of my nodes, I use the addForce and addTorque methods.
As I understood it, it's preferred to manipulating the location/rotation directly.

It seems to me that either the absolute values does not get piked up when a sync message is being created, or that the node on the other side doesn't receive them properly once they arrive, while the delta values are.

This is particularly apparent when a player has to respawn, meaning I have to set the coordinates manually, and one client thinks he's at position A, while he thinks he's at position B.

I'm thinking that perhaps I'm using setLocalTranslation/Rotation improperly, or that I have to somehow tell the system that I've updated them manually for them to be transmitted or something?

Logged
darkfrog
Administrator
Inspired Imagination
*****
Offline Offline

Posts: 2650


View Profile
« Reply #1 on: December 12, 2008, 05:59:45 PM »

Are you using the physics synchronization functionality in the API or did you write your own?
Logged
Ion
Newbie
*
Offline Offline

Posts: 6


View Profile
« Reply #2 on: December 12, 2008, 08:26:06 PM »

Yes, I use the same code as in the Flagrush game.
Logged
darkfrog
Administrator
Inspired Imagination
*****
Offline Offline

Posts: 2650


View Profile
« Reply #3 on: December 13, 2008, 08:38:04 AM »

Flagrush doesn't use the physics API, it is just jME synchronization.  Take a look at the jME-Physics-Networking extension:

http://jgn.googlecode.com/svn/synchronization/jme-physics-networking/
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.159 seconds with 20 queries.