Vehicles get a little trickier… In Unity we use a character controller combined with a series of raycasts to move the player around. This allows us to simulate multiple movements between frames without having to wait for the physics solver. The only thing up until now that the player can control is the player, which runs client side prediction and a few other latency hiding tricks to ensure that input has zero latency. Most moveable objects in the HurtWorld universe are synchronized at a variable update rate with a combination of interpolation and extrapolation. They often run a decent amount of time behind the server because the player doesn’t ever drive them directly. If you are new to multiplayer programming Glenn Fielder has an amazing series of in depth articles on everything you need here. This post assumes you already understand basic networking concepts. The first problem we had to figure out is how to network them. This week I got sick of waiting and I’m pretty glad I did. I put them off thinking it would be too much work and we would just patch them in later. Vehicles are something I’ve been itching to do since day one.
0 Comments
Leave a Reply. |