victorcrimea Posted 17 hours ago Report Share Posted 17 hours ago (edited) Hey everyone, I've been working on a dedicated server for 0 A.D. and it's reached a point where I'd love to get some community feedback on it. The idea came from two problems that have bugged me (and probably many of you) for a while: players who can't host games and players rage-quitting rated games. What it does (implemented and working): Game hosting - players connect to the dedicated server instead of directly to each other. No more NAT headaches. If you have ipv4, you can play. Lobby integration - the server connects to the lobby and games appear in the game list like any regular hosted game. Player rejoin - If you disconnect (crash, or intentionally), you can rejoin the game in progress. The server keeps the session alive. Rejoining with AI still not supported. Automatic controller assignment - the first player to connect becomes the game controller. Unlimited observers - no cap on how many people can watch a game in progress. Server-authoritative pause - In rated games, the server controls pause functionality rather than leaving it up to players. No more abuse of the pause button to stall or tilt your opponent. Every player has a total budget of 3 minutes. It used both for pause time and disconnected time. Rage-quit detection. When a player disconnects from a rated game without resigning, the server posts a public message in the lobby chat. It won't stop anyone from quitting, but at least there's a visible record. I hope this can be integrated with existing lobby bots. Auto-restart - when last client disconnects, server is pruned and started again from scratch. The server supports following operating modes depending on how you want to integrate with the lobby: - no lobby, for direct IP connection. - single lobby account - use your own credentials to host advertise the game in the lobby. The problem is that you won't see your own game. TBD - multiple lobby account - server can use a pool of lobby accounts. In this case it can host as many games as number of accounts provided. At the moment this is against TOS, to use multiple user accounts. so this mode is a proof of concept only. Technical details for the curious The server is written in Rust. It's a network-only relay, it coordinates packet forwarding between clients but doesn't run the game simulation itself. The actual gameplay still uses pyrogenesis's existing lockstep networking model. the server just sits in the middle instead of one player acting as host. Code is here: https://gitea.wildfiregames.com/victorcrimea/0ad/src/branch/feature/dedicated-server/server What I'm looking for: I'd love to hear from real players what features are especially valuable to you? Would you use this? Any concerns about the approach, reliability, trust, anything really. Edited 16 hours ago by victorcrimea 1 1 Quote Link to comment Share on other sites More sharing options...
Tapothei Posted 13 hours ago Report Share Posted 13 hours ago (edited) I love the idea to observe game with 8 or so players without lagging the host. At some point 8 vs 8 with 16 spactators.... Yoooooo! "Automatic controller assignment" what does this mean? Where does this dedicated server location be? Is it per continent or is it only 1 currently? Do you collect information besides my IP and will it be encrypted? Will this have maintenence fee? How many max players can you accept? Does having too much players cause stress to server? Are you protected against DDOS? Will this follow LAN's rule of modded game(some players play modded and some vanilla)? Features I look forward to is being able to draw in a stale[>60min]/laggy[<5min] matchup. Is all I can think of, goodluck in the further improvement and thank you for your contribution. Edited 13 hours ago by Tapothei Removed most feature request since Replay Pallas solves my Rating needs Quote Link to comment Share on other sites More sharing options...
Dunedan Posted 13 hours ago Report Share Posted 13 hours ago 3 hours ago, victorcrimea said: - single lobby account - use your own credentials to host advertise the game in the lobby. The problem is that you won't see your own game. TBD Please mind that we consider any player operated bots in the multiplayer lobby to be a violation of the Terms of Use. Quote Link to comment Share on other sites More sharing options...
victorcrimea Posted 2 hours ago Author Report Share Posted 2 hours ago 10 hours ago, Tapothei said: "Automatic controller assignment" what does this mean? When you normally host a game, server is created under the hood with random controller secret. Then you connect (locally though) to your server and by prenting that secret you are identified as controller, so you can change match settings and start the game, kick and ban players. As of the rest of the questions: even though I called it dedicated server, it nothing more than "just server". I do not host it for public use. I expect others (and wildfiregames eventually) to use it to host their own games. As of logs, it doesn't store anything but of course it has lots of debug prints. But in general, it doesn't "know" more about you than any other Game howt in the lobby when they host normally. DDOS protection is not implemented. But it is possible to write integration with fail2ban, so that offenders(incorrect auth, impersonation, too much packets per minute) canbe banned on iptables level. I never knew that langames have any rules regarding mods compatibility. But if you host in lobby it shows mods of the controller as usual. 11 hours ago, Tapothei said: Features I look forward to is being able to draw in a stale[>60min]/laggy[<5min] matchup. Is all I can think of, goodluck in the further improvement and thank you for your contribution. Draw in stale somewhat harder to implement without server-side simulation. Draw in laggy game is very much possible, since it is easily observable from ping times. 11 hours ago, Dunedan said: Please mind that we consider any player operated bots in the multiplayer lobby to be a violation of the Terms of Use. Could you please explain how is it a violation of the ToS hosting a single game from single(own) account? It is no different than hosting a game normally. Just server is topologically decoupled from the client. Quote Link to comment Share on other sites More sharing options...
Dunedan Posted 1 hour ago Report Share Posted 1 hour ago 27 minutes ago, victorcrimea said: Could you please explain how is it a violation of the ToS hosting a single game from single(own) account? It is no different than hosting a game normally. Just server is topologically decoupled from the client. I have to admit that the Terms of Use aren't very clear regarding this, but I would argue point 8 and maybe point 10 as well apply. Such bots might also introduce additional security and privacy risks for our users and that's why we generally don't allow them. To be clear: Those are not artificial rules we made up for your bot, but something we have applied in the past as well, whenever somebody added a third-party bot to the multiplayer lobby. One difference of your bot, compared to other bots I have seen in the past, is that it implements functionality I can very well see to be integrated into 0ad itself (albeit I'd prefer a different interface between players and the dedicated server). The correct process is to go through the regular PR review process for that though and get it accepted into 0ad. 1 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.