Skip to content

networking: Add optional version check for hosts/clients #7

@thomasboyt

Description

@thomasboyt

web games have the potential for a lot of bugs around weird caching issues and out of date clients, so it'd be good to ensure clients and hosts have the same version

this could be a param added to either the connect() fn or the Networking component params:

new NetworkingHost({
  prefabs,
  maxClients: 2,
  version: "1"
});

implementation of the "version" should be left up to the games, but could be a SHA stamp from the git repo or something, or maybe webpack could handle hashing the bundle?

as for the actual check, client should send it on initial connect and server should send back a new VersionMismatchError message

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions