client and maingameloop updated to have continuous communication with
the server