Original Post
I am having a dilemma at the moment, I am unsure as to which is the best way to implement my client/server architecture.
The game I intend to make (that is still in the concept stage) will hopefully be a space sim rpg with MMO elements to it.
Anyway the problem that I am having is that I do not know what is going to be the best way to implement the synchronisation of player movements/health/etc.
I know that I could do it all on the server and send all the data to all the necessary players once a cycle or whatever. But this is not a point and click, I intend to have the player in control of the ship(s) (eg speed and direction) and have it work that way. It strikes me that to have the server calculate all this for all the possible players and their ships would need way too much overhead and use of the server CPU.
So what I was thinking was to have the clients in control of their own ship(s) and have them tell the server where they are and what he is doing and then all of the remaining ships current coordinates and orientations sent to the clients and keep it all updated and in sync like that. Therefore meaning that the clients will be responsible for collision detection not only of their own ships but of their bullets and enemy ships (the cheats ensue lol).
Is my proposal the best way to accomplish what I want to do?
A problem I can see is that when there is a collision of two player ships, they will both report the collision and if they are out of sync at all the server will treat it as two separate collisions, I don't know what to do about this. Maybe someone has an idea?
Thanks
The game I intend to make (that is still in the concept stage) will hopefully be a space sim rpg with MMO elements to it.
Anyway the problem that I am having is that I do not know what is going to be the best way to implement the synchronisation of player movements/health/etc.
I know that I could do it all on the server and send all the data to all the necessary players once a cycle or whatever. But this is not a point and click, I intend to have the player in control of the ship(s) (eg speed and direction) and have it work that way. It strikes me that to have the server calculate all this for all the possible players and their ships would need way too much overhead and use of the server CPU.
So what I was thinking was to have the clients in control of their own ship(s) and have them tell the server where they are and what he is doing and then all of the remaining ships current coordinates and orientations sent to the clients and keep it all updated and in sync like that. Therefore meaning that the clients will be responsible for collision detection not only of their own ships but of their bullets and enemy ships (the cheats ensue lol).
Is my proposal the best way to accomplish what I want to do?
A problem I can see is that when there is a collision of two player ships, they will both report the collision and if they are out of sync at all the server will treat it as two separate collisions, I don't know what to do about this. Maybe someone has an idea?
Thanks