hoffhoff
27-11-2007 01:11:48
Hello,
Well, my question is not directly related to ogrenewt, but I think that this is a good place to open this discussion. If not, I am sorry for this thread then.
I am building a game using Ogre+Ogrenewt+Newton, and I want to implement the newtorking part now.
Has someone here ever created a networking game using ogrenewt?
I am still planning it, but I am not sure of what is the best way for making it.
I was wondering about implementing all the physics stuff in the server. So, the clients would send to the server the pressed keys, and the server would interpret it (just like in the singleplayer mode). Then, every period of time, the server would send to the clients the position and orientation of all the objects in the scene. So, the clients would not have any physics implementation at all: they would be just rendering the screen and updating the position of the objects to the positions received from the server.
Is it a good aproach?
Another solution I thought: the clients would send only the pressed keys, and the server would broadcast it to all other clients. Then each server would calculate, in it's own world, the affects of that key.
So, if one press "ahead" button, all the clients would apply a force to move that player ahead.
I think that this solution would economize network band, because the messages sent between client and server would be smaller, but I think that lost packages would mess the synchronization of the clients.
Have someone worked on network games?
And again, sorry if this is not the right place to ask this.
Thank you
Well, my question is not directly related to ogrenewt, but I think that this is a good place to open this discussion. If not, I am sorry for this thread then.
I am building a game using Ogre+Ogrenewt+Newton, and I want to implement the newtorking part now.
Has someone here ever created a networking game using ogrenewt?
I am still planning it, but I am not sure of what is the best way for making it.
I was wondering about implementing all the physics stuff in the server. So, the clients would send to the server the pressed keys, and the server would interpret it (just like in the singleplayer mode). Then, every period of time, the server would send to the clients the position and orientation of all the objects in the scene. So, the clients would not have any physics implementation at all: they would be just rendering the screen and updating the position of the objects to the positions received from the server.
Is it a good aproach?
Another solution I thought: the clients would send only the pressed keys, and the server would broadcast it to all other clients. Then each server would calculate, in it's own world, the affects of that key.
So, if one press "ahead" button, all the clients would apply a force to move that player ahead.
I think that this solution would economize network band, because the messages sent between client and server would be smaller, but I think that lost packages would mess the synchronization of the clients.
Have someone worked on network games?
And again, sorry if this is not the right place to ask this.
Thank you