Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abstract game space & config lists #257

Open
wants to merge 11 commits into
base: 1.19.3
Choose a base branch
from
Open

Conversation

Gegy
Copy link
Member

@Gegy Gegy commented Dec 3, 2022

A prototype at preparing for Delta's work on setting up Plasmid with a proxied server network: mostly, we need to be able to have the core /game commands be able to work with games that might exist remotely on another server. Currently, the GameSpace and GameConfig interface are entirely built around the idea that the games are local, but most accessors don't need that level of information.

This PR introduces a ListedGameSpace and ListedGameConfig interface which exposes a smaller surface area for server network support. Plasmid still does not support this natively, but it at least is one step in that direction. It is however possible for external mods to in theory hook-in to add custom game space / config lists which can be used through certain commands. Ideally, in the future, we can support server network setups out-of-the-box, but that's very future work.

Not all commands will work with this setup, for example anything that operates on a player entity will naturally fail due to the player entity not existing on a remote server. Most of these I don't think are super important, but maybe some of them we would like to support in the future.

Easiest to review commit-by-commit.

@Gegy Gegy changed the base branch from 1.19 to 1.19.3 December 3, 2022 23:45
@Gegy Gegy force-pushed the refactor/abstract-game-list branch from 7e065d7 to a861ccb Compare December 3, 2022 23:48
@D3lta-2-1
Copy link

I think you need to know that the proxy and a server can only communicate each other be using a player connection, if there is no player on a server, it's like we don't know if it's down or not, we must use netty or faked playerConnection to communicate with other servers.

I think choosing an host server is the responsibility of the proxy, because it's him which catch any connection error. I thought plasmID as a simple slave that only process proxy requests.

But you're right, the proxy needs to know where games are instaciable, and what game is available. Concurrently they just are hardcoded in the proxy plugin.

Next, the proxy is able to handle and process directly commands, we don't need any server-side code to remake the /game command or /locate

@D3lta-2-1
Copy link

but I think it will be necessary to separate the code of a gameSpace and how to join a gameSpace

This exposes a limited surface-area which ideally can be used to represent game configs present on different physical server instances (e.g. a proxied server network)
@Gegy Gegy force-pushed the refactor/abstract-game-list branch from a861ccb to d4175d0 Compare December 10, 2022 09:40
@Gegy Gegy force-pushed the refactor/abstract-game-list branch from d4175d0 to cc584e9 Compare December 10, 2022 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants