R2Northstar / Northstar

Repo for packaged Northstar releases
https://northstar.tf/
MIT License
1.69k stars 131 forks source link

Add support for Agones (kubernetes based gameserer hoster/scaler) #334

Open GeckoEidechse opened 1 year ago

GeckoEidechse commented 1 year ago

Agones is a tool for deploying and scaling gameservers using Kubernetes.

Basically the idea would be to use this to allow for easy scaling of gameservers for someone using Kubernetes clusters to host their servers. Especially deploying new servers based on which gamemodes are being played is something we wanna look into. E.g. if all current Live Fire servers fill up for a regions, it should be possible to auto-deploy new ones for that specific gamemodes without having to manually monitor global state of available servers for a certain gamemode.

We'd need to do some initial research first on how it could be used to deploy new servers in case initial ones are considered full.

Of course if this tool doesn't/cannot really help us in that regard we should drop idea of adding support for it again ^^

cpdt commented 1 year ago

Very interested in this for when FD becomes stable. In my opinion this would mostly be useful with the matchmaking ideas floating around, but it could certainly work within the server browser architecture.

For example, following the Reusing GameServers integration pattern:

To that end, we would need:

Agones also has an experimental Player Tracking feature, which could let it autoscale servers based on the number of empty player slots. Doesn't look like there's builtin autoscaler support for this yet though, see https://github.com/googleforgames/agones/issues/1034.

cpdt commented 1 year ago

Some alternatives to Agones that I've found:

GeckoEidechse commented 1 year ago
  • A self-contained Docker container that can run a dedicated server (so including the game files).

Hmm, adding them as volume is not an option? Cause while certainly doabled (*cough* *cough* nsfetch.sh), we cannot officially release a Docker container that contains game files, so that would need to be a "community effort".

This could be built as a plugin - in fact it seems like even the current plugin API has enough functionality for this?

Yet another "plugins need a rewrite first" victim xD

cpdt commented 1 year ago

Hmm, adding them as volume is not an option?

It doesn’t sound like it, the recommended approach is certainly to just use large Docker images. There’s a discussion on alternatives in https://github.com/googleforgames/agones/issues/683.

This could just be something that each host has to set up for themselves.

Yet another "plugins need a rewrite first" victim

Is there a reason this can’t be done with the current plugin API? At least from the header file it looks like the capabilities we would need are there - checking if the game has loaded and checking the number of players.

GeckoEidechse commented 1 year ago

Yet another "plugins need a rewrite first" victim

Is there a reason this can’t be done with the current plugin API? At least from the header file it looks like the capabilities we would need are there - checking if the game has loaded and checking the number of players.

Not sure about current capabilities of plugin system but the consensus was to do plugin system properly before doing more plugins / docs / etc. On the other side, with plugin system rewrite being delayed until unknown period of time, it might be wise to just write plugin for current system already if its current state suffices for Agones SDK ^^