Rednas_N Posted December 23, 2016 Share Posted December 23, 2016 (edited) Hi, Yesterday I bought Rollercoaster Tycoon 2 for 2,50 at Steam (nice price) and I immediately installed OpenRCT2. I also joined a mutliplayer game, which was very nice and fun. But I am struggling with the input lag/authoritive server. When I am building a new coaster, path or whatever it is, it seems that the server has to accept it before it's being build. Is there a preference available which says; build, send it to server+ display on screen at the same time, if it's not possible remove the added part. Something like client side prediction. Sander Edited December 23, 2016 by Rednas_N Link to comment
X7123M3-256 Posted December 23, 2016 Share Posted December 23, 2016 My understanding of game networking is gleaned entirely from this website, so I could be wrong, but I believe this would be difficult to implement. The way multiplayer works in OpenRCT2 is, all clients send the server their inputs, then once all inputs have been recieved, all clients advance the game state simultaneously. The complete game state is not transmitted to clients except when they first join the game, so if they get out of sync, they remain out of sync unless the client leaves and rejoins. Implementing client side prediction means the clients will get out of sync with the server. If two people tried to build on the same tile, for example, the local action would succeed before the one from the remote player, so each player would think they were first and end up with a different object on that tile. Therefore, the server must be able to transmit corrections to clients to resynchronize them. The complete game state for OpenRCT2 is quite large, so transmitting the entire thing several times a second would presumably use too much bandwidth. You could save bandwidth by only transmitting the differences between the current state and the last update received from the server, but this requires the server and client to keep track of the last state the client has recieved. Given the number of global variables currently permeating the codebase, I think it would be very difficult to implement this reliably - there are problems with desynchronization already with the existing networking code. 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now