BGA scoring question – low score wins

Game development with Board Game Arena Studio
Post Reply
User avatar
sportomax
Posts: 8
Joined: 22 March 2020, 04:37

BGA scoring question – low score wins

Post by sportomax »

Has anyone implemented a game where the lowest positive score wins, while still displaying the actual positive scores in BGA?

Example:

Player A: 31
Player B: 51
Player A should win because 31 is lower.

My understanding is that BGA normally determines ranking based on the highest player_score, so the workaround I've seen is storing scores as -31 and -51. That correctly makes the -31 player win, but it's confusing because the game then displays negative scores and technically -51 is the lower score.

I've also seen approaches like giving the winner an artificial high score or using 1/0, but I'd prefer to display the game's real scores.

Is there a supported way to tell BGA that lower player_score is better, or to separate the displayed score from the value BGA uses for ranking?

If anyone knows a BGA game that handles this cleanly, I'd appreciate an example I can look at.
User avatar
sportomax
Posts: 8
Joined: 22 March 2020, 04:37

Re: BGA scoring question – low score wins

Post by sportomax »

Found the answer to my own question! 😄

It looks like BGA added native support for reverse scoring through the newer GameResult API. You can keep the actual positive scores in player_score and use reverseScore: true when returning GameResult::individualRanking().

Documentation: https://en.doc.boardgamearena.com/Main_ ... ie-breaker

This should allow BGA to display 31 and 51 while correctly declaring 31 the winner, without needing negative scores or other workarounds.

Leaving this here in case it helps anyone else running into the same issue!
Post Reply

Return to “Developers”