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

Adds highscore feature to multiplayer #79

Merged
merged 6 commits into from
Jul 9, 2024

Conversation

ComputasAlex
Copy link
Collaborator

Multiplayer will be an own game mode in terms of highscore. This is backed by the fact that configuration is different for multiplayer than singleplayer. In the db this is reflected in an own identifier for the multiplayer mode in the difficulty_id column on Scores. Added DifficultyId enum to utilities to have this under control.

Some of the code for high score fetching from db is very similar to singleplayer backend and this highlights the need to refactor the whole architecture, but this is a bigger scope than for the last 3 weeks of the summer project.

New websocket endpoints:

  • postScore:
    • Every multiplayer game now also posts scores to db with the Multiplayer DifficultyId 4.
  • viewHighscore
    • Essentially the same as in singleplayer backend

@ComputasAlex ComputasAlex requested a review from andreasrberg July 8, 2024 13:05
@ComputasAlex ComputasAlex merged commit b5cad25 into develop Jul 9, 2024
1 of 2 checks passed
@ComputasAlex ComputasAlex deleted the SP24-390-highscore-difficulty-multiplayer branch July 9, 2024 06:58
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