yes, you should remove the blocking code from the rendering thread. with your current way you are consuming your most valuable cpu time by just waiting response from server. using nio or putting blocking code into a seperate thread will both do the job
and your ship's speed isnt determined by how frequently it gets data from server. server should only say your ship's position, direction and maybe speed, accelaration etc. for instance:
frame 1: server said your ship is moving to D direction with S speed
frame1-10: you should move the ship toward that direction
frame 11: server reported some other D and S
frame 11-20 move to that direction
..
and of course you will not receive responses at perfectly regular intervals. the next response may come at 25th frame, the other one at 40th, next one at 41 etc
i see 3 chocies:
* you ship does exactly what your server says at that time, and nothing else. that means your ship will respond after some lag since you wait for server's approval and it also wont move smoothly
* move your ship without waiting for server's response. if server says something different than you expect correct your ship's position accordingly. this will cause your ship jump from here to there during correction
* do the second thing but instead of making your ship jump to corrected position, modify its path to reach the corrected position smoothly. this is a bit complicated but commercial games do it
hope this helps
![Wink ;)](https://www.jpct.net/forum2/Smileys/default/wink.gif)
r a f t