Antriel Posted May 17, 2017 Share Posted May 17, 2017 I started developing multiplayer online platformer to get back to things that got me to programming in the first place. I have no idea how it will work out (if at all), but I decided to blog about my progress in a devlog/tutorial fashion. The first entry is about my proof of concept prototype and why it wouldn't work https://antriel.com/post/online-platformer-1/ Quote Link to comment Share on other sites More sharing options...
Antriel Posted May 23, 2017 Author Share Posted May 23, 2017 This week I talk about how seemingly simple things can have not-so-simple issues – AABB physics. https://antriel.com/post/online-platformer-2/ Quote Link to comment Share on other sites More sharing options...
Antriel Posted May 30, 2017 Author Share Posted May 30, 2017 Things are starting to get exciting – moving physics to the server, implementing client-side prediction and server reconciliation. https://antriel.com/post/online-platformer-3/ The end result, with applied 200 ms lag and 15% packet loss: See the post to see a video of how bad it was before the client-side prediction b10b and Raggar 2 Quote Link to comment Share on other sites More sharing options...
Jorasso Posted May 31, 2017 Share Posted May 31, 2017 I am a fan of this series I am not sure if I followed it properly, but it seems to me that demo with only one player shows nothing. If you set 1000ms delay and 50% packet loss, does it still look great in such demo? I would love to see this in action with two players. And how the second player sees the movements of the first player. So simply two windows next to each other. Antriel 1 Quote Link to comment Share on other sites More sharing options...
Antriel Posted May 31, 2017 Author Share Posted May 31, 2017 Thanks! It's always super nice to hear that 1 hour ago, Jorasso said: I am not sure if I followed it properly, but it seems to me that demo with only one player shows nothing. If you set 1000ms delay and 50% packet loss, does it still look great in such demo? Yeah, it would. The reason is that the prediction done on the client is essentially perfect. Which means the prediction will never stray away from what server simulates. The only limitation is length of the `oldInputs` buffer, which I have set up to 2 seconds for now. After which I suppose the server should simply disconnect the user, or maybe allow him to catch up – will see, have to test these things in reality. 2 hours ago, Jorasso said: I would love to see this in action with two players. And how the second player sees the movements of the first player. So simply two windows next to each other. That is planned for the next devlog . Essentially, I will use entity interpolation to achieve smooth movement. That means a client renders other players with a delay. If some of the users lag too much, it will still be noticeable though. Then extrapolation can come into play, but that has its own issues too. Quote Link to comment Share on other sites More sharing options...
Antriel Posted June 14, 2017 Author Share Posted June 14, 2017 Decided that my testing environment is worth a log of its own. It grew pretty big, but it's actually quite simple. If someone wants to know about setting up a virtual machine and simulating latency and packet loss, give this a read. Multiplayer Platformer Log #4 – Testing Environment Raggar 1 Quote Link to comment Share on other sites More sharing options...
Antriel Posted June 15, 2017 Author Share Posted June 15, 2017 This community rocks! 14 hours ago, zeebo said: Yep that's what I'm doing - Note adding a tc rule on ubuntu only effects outbound packets. If you want to more accurately simulate latency you may want to add outbound latency on windows using Clumsy that way you can test 50ms to server, 50ms back rather then ~2ms to server, 100ms back. I updated my article based on this new information. We learn something every day. Thanks zeebo! Quote Link to comment Share on other sites More sharing options...
Raggar Posted June 15, 2017 Share Posted June 15, 2017 I'm using Netbalancer on Windows when adding custom latency. Never got Clumsy to work properly for some reason. Quote Link to comment Share on other sites More sharing options...
Antriel Posted June 15, 2017 Author Share Posted June 15, 2017 Another good looking approach. Although not free. I just tested Clumsy and it worked well for me. I just set filtering to `outbound`. According to clumsy's manual it can't handle inbound loopback and actually processes loopback packets twice. Maybe that was part of your issue? Quote Link to comment Share on other sites More sharing options...
Raggar Posted June 15, 2017 Share Posted June 15, 2017 I don't recall the exact issue. As far as I remember, I had issues with the general latency settings and how they affected Chrome. I quickly changed to Netbalancer, and have used that ever since. As well as TC for packet drops. Got tired of dropping them manually. Quote Link to comment Share on other sites More sharing options...
Antriel Posted June 30, 2017 Author Share Posted June 30, 2017 Another devlog and it's a big one! Multiplayer Platformer Log #5 – Entity Interpolation Explaining entity interpolation. Implementing client-server synchronization using phase-locked loop. Talking about server update loops. And lot of shared code. Finally some worthwhile gif – moving around on a real server with ~200 ms ping: jonforum and b10b 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.