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

Game version not properly set #209

Open
SebastienGllmt opened this issue Aug 31, 2023 · 0 comments
Open

Game version not properly set #209

SebastienGllmt opened this issue Aug 31, 2023 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@SebastienGllmt
Copy link
Contributor

SebastienGllmt commented Aug 31, 2023

When games that are live are using Paima, they need to ensure that the version the user is running locally matches the version running in the server (and throw an error otherwise)

The way this is done now is done by setting the game version in two places:

  1. In the backend, where in paima-runtime, we have an endpoint /backend_version that returns the version used when Paima Engine was initialized.
  2. In the middleware, we have a initMiddlewareCore function that takes in a version number of the app

Now, when a game calls userWalletLogin, we check if the two versions match

Issue

For the backend, the game version is set by ENV.GAME_NODE_VERSION. However, this is simply a constant that never gets updated. Probably we forgot to set this

static get GAME_NODE_VERSION(): VersionString {
    return '1.0.0';
  }

Why hasn't this been an issue so far?

The localRemoteVersionsCompatible function only checks if the major versions match, and all Paima games have the major version set to 1 so this has never been an issue

@SebastienGllmt SebastienGllmt added the bug Something isn't working label Aug 31, 2023
@SebastienGllmt SebastienGllmt added this to the Bug bash milestone Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant