Closed DanVanAtta closed 6 years ago
@DanVanAtta I thought about this multiple times now, and here are my thoughts: I believe the main hurdle for hosting is port forwarding. So we'd need a way to connect 2 or more clients to each other without them having to reroute their ports. The most easy-to-implement option is to route all the traffic through some kind of public access point (could be the lobby itself), but the problem with this is that this is probably not going to scale well and all connections will be interrupted if the server crashes or something. I don't know how to achieve this (mostly because I don't know what exactly they're doing), but Steam somehow manages to enable everyone to host their own game and have their friends join them without any further setup. This is probably what we'd want to. I heard about a technique called UDP hole punching and TCP hole punching, but I really don't know how feasible they are to implement for us
I found the relevant steam documentation for this: https://partner.steamgames.com/doc/features/multiplayer/networking It seems like they first try a hole punching technique, and then use a relay server if that fails. Might be worth trying if theres a java library somewhere.
Don't most games these days use some sort of 'bot' to host the actual game. Not sure I necessarily agree with the direction or removing bots and moving towards all games hosted by individual players. Especially for tournaments/competitive matches, I would prefer to play on a bot to remove any potential dice cheating. Only way I see this as an option is if you also moved dice rolling to use MARTI for lobby games as well.
Good pt but if not a tourney it would be great if anyone could host. Just my two cents.
@prastle Agree with making it so anyone can host but just not onboard with removing the concept of some sort of 'bot'.
@ron-murhammer I agree keeping bots for competitive games is a reasonable argument. But as @prastle already mentioned it would be nice if every player had a host button that would just work out of the box. Even if we end up using relay servers to workaround NATs, they would still be very lightweight and require less server power in exchange for bandwidth.
or a works out of the box with it all through marti?
Off topic but either way I sent ya both an invite to a New Council discussion please join.
@ron-murhammer suggestion is to make a bot completely transparent. The server would likely need to spin up some resources if the "hoster" can't host. Hopefully, we can do something that is pretty lightweight and only be botteleneck by network IO, (and not CPU). Presumably for those that could host, we could add an option for 'verified dice', so dice are rolled on server and we do the 'virtual bot' configuration anyways.
@DanVanAtta Yeah, I'm fine with making bots transparent and having a verified dice option would be great. I think we are on the same page now.
Closing this for now as not immediately actionable. To some extent I wanted to communicate idea/direction that bots become transparent.
Task:
Specific task:
Desirable outcomes
Question to solve as a team
For games that do not allow direct hosting, how can we allow them to host a game?