ZeroK-RTS / Zero-K-Infrastructure

Website, lobby launcher and server, steam deployment, .NET based tools and other vital parts of Zero-K infrastructure
GNU General Public License v3.0
49 stars 51 forks source link

Make it possible for someone to make planetwars #2935

Open GoogleFrog opened 1 year ago

GoogleFrog commented 1 year ago

I don't think we're going to see planetwars anytime soon if it has to be built on existing infrastructure. It seems to be too much for anyone new to come in and modify. But what we have seen from time to time is people with their own web sites making tools that scrape the ZK website to achieve something. For example, esainane's 1v1 replay stats page.

My proposal is that we add a the minimally required API to infra that would allow any web developer to make and host whatever form of planetwars they want. I doubt they would benefit from all we have learnt over the last two dozen or so rounds, but that doesn't seem vital. What's more important is to make anyone able to implement whatever, quickly. The goal is the transform infrastructure mana costs into other types that seem to exist.

Here is what we could let an "external web thing" (idk the name) do. I would want some sort of admin control panel for adding these permissions to an "external web thing", they shouldn't just be open to whoever can send requests to ZK infra. This is important so that any moderator can disable the permissions if something breaks and starts forcing people into rooms that did not request it.

The niceties of UI integration for planetwars can be achieved via the bot communicating to players via private messages, and me adding detection for those messages to chobby (since that mana exists). But such niceties aren't even required for basic planetwars. The minimum that the bot has to be able to do is have players type a ZK name into a website, and then have the bot send them an ingame link that gives them permission to control what the player is up to on that website. All the faction and attack choice stuff can then happen on the website.

Technically this all might just be possible with someone operating a normal account as a bot, as long as the bot has the tourney control flag set. But it would be a bit janky to rely on using the tournament control web page rather than a simpler API, and the tournament control webpage seems to lack modoption support. So some infra support for an API rather than a puppeteered player account would be good.

sprunk commented 6 months ago

The original form of PW is already possible I think, where there is just an single "lobpot" type room with the bot as the boss and who just works with whoever happens to be in the room at the time.