Hello,
For my game I am sending a rotation angles of object and its coorinates (x,y,z) - 3 angles sent as float or double are smaller than matrixes.
However I am not saying it is best way to synchronize objects. I have heard that for games such as Quake, instead of sending coords and rotation parameters the action messages are sent (like: object started moving in that way, or object started rotating) and all clients (including server) symulates those moves/rotations by them own. In that case you do not have to send such a much amount of messages, but there is a still problem to synchronize clients timings etc. which may be more difficult ;-)
For the second question I cannot help you yet - in my game, server does not know JPCT models and currently I do not have collision implemented. However, I was thinking of solving it in one of two ways:
* the game client checks collision and when it occurs, it sends info to server - server will have to validate that message somehow and process collision
* server have a very simple models of objects (low polys, no textures etc) and it uses them for collision testing, however I am little afraid if this will work, because server processes much more objects than client and this may kill the server performance or use too much memory (I have many worlds/play arenas where client 'sees' only one at time while server processes all of them....)
I am only using 3ds files so I cannot help you with objs
For loading 3ds files I am using following method (that I have found in some post on forum):
static public Object3D loadObject(String path, String name, int scale)
{
Object3D[] model = Loader.load3DS(path + name + ".3ds", scale);
if (model.length == 0)
return null;
Object3D o3d = new Object3D(0);
Object3D temp = null;
for (int i = 0; i < model.length; i++)
{
temp = model[i];
temp.setCenter(SimpleVector.ORIGIN);
temp.rotateZ((float) (-.5 * Math.PI));
temp.rotateMesh();
temp.setRotationMatrix(new Matrix());
o3d = Object3D.mergeObjects(o3d, temp);
o3d.build();
}
return o3d;
}
I hope my post is helpful,
Thanks,
Wojtek