jME3 - Ship physics, how and where? jBullet? Client/Server?

I am intending to develop a space sim game. The game will be a multi-player game where information is passed through a server to and from the clients.



I will have ships flying about in a 3d environment. These ships will need to have a momentum vector and a rotation.



I am unsure of the best way to implement this. But this is what I am thinking.



I was wondering about the possibility of being able to have the physics running on the server and updating player positions etc from information sent to the clients from the server. However I think that this will be impracticable in the long run as I intend to have many players on the server (not necessarily in the same battle/game) and the players will have say 30 ships each. If I have 1000 players on the server this means 30,000 ships and god knows how many bullets, rockets or plasma shots at once! I could be hitting the millions very quickly, keeping this all lag free makes me lean away from using the server so much.



Do people agree?



Then If I am to run it on the client should I use jBullet or should I create my own simpler physics? (I’m unsure of the overhead)



Also what parts should I try to keep on the server so that cheating is guarded against as much as possible?



Basically I want to get as much of the frame work nailed down as possible so that I can start trying to make code for this all. I’m a novice at this so I’m using it all to learn from and I struggle making one version of code let alone making 20 or 30 iterations and copping and changing too much (I’m not being naive I am fully aware lots of chopping and changing will be required I just need a solid framework to work to for now to give me direction)



Thanks

Lots of these topics have been discussed in depth on these forums and you can find a lot of examples and projects from which you can learn, also theres a lot of documents about game development on the web :google:

You should not even remotely think about storing millions of objects in memory, also using physics requires well balanced design, bullet physics should probably only be used for the “visible” physics on the client side due to its realism and resulting CPU strain.

Cheers,

Normen

well, first of all, you may have 30,000 players online, but only send updates when nessessary. if someone is on another planet by himself and is shooting all kinds of guns, dont worry about telling the other clients because of this because it is a waste of time for the client to know what is happening across the galaxy. Vice versa, this guy on his own planet does not need to know about the rest of the solar system either.



In the end, with proper scene management, you limit the number of connections being sent between clients by increasing the division of the scene. This can easily be done with an octree design.



As far as what should be on the server/client

basically any calculations which can be abused should be on the server. Locations, rotations, speeds, shooting, any kind of harvesting (mining, etc) stupid stuff can be on the client. Conversely, you can have things calculated on the client and double checked by the server. This could save some computation time. Though you will need to test this hypothesis.