Ok!

So the main messages:
Server:
Unable to find object: 3 on Server -> it repeats always when i shoot: to 4,5,6..etc.
and an error:
SEVERE: Uncaught exception: Terminating Thread.
java.lang.NullPointerException
at com.captiveimagination.jgn.synchronization.SynchronizationManager.remove(SynchronizationManager.java:321)
at com.captiveimagination.jgn.synchronization.SynchronizationManager.update(SynchronizationManager.java:343)
at com.captiveimagination.jgn.UpdatableRunnable.run(JGN.java:435)
at java.lang.Thread.run(Unknown Source)
2008.04.13. 9:24:12 com.captiveimagination.jgn.UpdatableRunnable run
INFO: JGN update thread 10 terminated
Client:
WARNING: message is not a playermessage: com.captiveimagination.jgn.synchronization.message.SynchronizeRequestIDMessage@123b25cCode:
There are 5 classes:
- ShootTest, the main app, similar to flagrusgtest
- ShootTestServer, ShootTestClient
- ShootTestSOM -> SyncObjectManager
- BulletController -> to control the bullets
The ShootTest get the syncmanager (in client and server side too):
SynchronizationManager clientSyncManager = new SynchronizationManager(client, controller);
clientSyncManager.addSyncObjectManager(this);
JGN.createThread(clientSyncManager).start();
final ShootTest app = new ShootTest(clientSyncManager);
In the ShootTest app, when i click with the mouse, i synchronize bullet with this function:
private void synchronize(Node toSync, long type, long updateRate){
try {
SynchronizeCreateMessage syncCreateMsg = new SynchronizeCreateMessage();
syncCreateMsg.setSyncObjectType(type);
syncManager.register(toSync, syncCreateMsg, updateRate);
} catch (Exception e) {
System.err.println("ShootTest/synchronize");
}
}
And when i update the bullet controllers, i remove the bullets out of range:
for (Iterator iterator = removeBulletControllers.iterator(); iterator.hasNext();) {
BulletController bcontroller = (BulletController) iterator.next();
syncManager.unregister(bcontroller.getTargetSpatial());
bcontroller.getTargetSpatial().removeFromParent();
bulletControllers.remove(bcontroller);/*i remove the bullets own controller too*/
}
I think i post the essentials
