Skip to main content
added 482 characters in body
Source Link
kochol
  • 182
  • 6

I recommend you use lock step peer to peer architecture.

You start by counting your game frames after the game starts. One client render the 1st frame then send the ready message to other clients and wait to receive ready message from other clients.

Now all clients can go for 2nd frame. Render the frame, send and receive commands, update world, update physics and ... after that sending ready message to each other.

This solution is very good for LAN games and all of your clients will be in sync.

with this type of networking you can be sure all of your clients are in sync so you can test the best way that suits your need.

1st way is only send the inputs to others and each client simulate running, firing , collision detection and etc the 2nd way is each client send the information about his character to others like position, rotation, state, animation frame and etc so other clients only calculates their stuff and send them over network but first way is more secure.

I recommend you use lock step peer to peer architecture.

You start by counting your game frames after the game starts. One client render the 1st frame then send the ready message to other clients and wait to receive ready message from other clients.

Now all clients can go for 2nd frame. Render the frame, send and receive commands, update world, update physics and ... after that sending ready message to each other.

This solution is very good for LAN games and all of your clients will be in sync.

I recommend you use lock step peer to peer architecture.

You start by counting your game frames after the game starts. One client render the 1st frame then send the ready message to other clients and wait to receive ready message from other clients.

Now all clients can go for 2nd frame. Render the frame, send and receive commands, update world, update physics and ... after that sending ready message to each other.

This solution is very good for LAN games and all of your clients will be in sync.

with this type of networking you can be sure all of your clients are in sync so you can test the best way that suits your need.

1st way is only send the inputs to others and each client simulate running, firing , collision detection and etc the 2nd way is each client send the information about his character to others like position, rotation, state, animation frame and etc so other clients only calculates their stuff and send them over network but first way is more secure.

Source Link
kochol
  • 182
  • 6

I recommend you use lock step peer to peer architecture.

You start by counting your game frames after the game starts. One client render the 1st frame then send the ready message to other clients and wait to receive ready message from other clients.

Now all clients can go for 2nd frame. Render the frame, send and receive commands, update world, update physics and ... after that sending ready message to each other.

This solution is very good for LAN games and all of your clients will be in sync.