My netcode is working, but I have a question
Posted: Wed May 06, 2015 6:12 am
Ok so I am making a mini multiplayer game
https://github.com/cohadar/tanks-of-harmony-and-love
Using lua-enet for networking.
Never made multiplayer game before, but I think I did netcode right, just not sure.
It works like this:
Love FPS is 60, I sample and send user commands to server at 30 FPS, server works at 60 FPS but updates clients at 10 FPS.
Clients and servers are in lockstep, they all have tick counter updated every 60 FPS.
When state on client and server gets different a resync is forced on client ( I display sync text on screen for debugging )
So far it is working fine, I just thought to ask nevertheless.
Am I doing something wrong? Could I be doing something better?
https://github.com/cohadar/tanks-of-harmony-and-love
Using lua-enet for networking.
Never made multiplayer game before, but I think I did netcode right, just not sure.
It works like this:
Love FPS is 60, I sample and send user commands to server at 30 FPS, server works at 60 FPS but updates clients at 10 FPS.
Clients and servers are in lockstep, they all have tick counter updated every 60 FPS.
When state on client and server gets different a resync is forced on client ( I display sync text on screen for debugging )
So far it is working fine, I just thought to ask nevertheless.
Am I doing something wrong? Could I be doing something better?