ChrisNZL / Tallowmere2

Changelog, issue tracker, and development knowledge for Tallowmere 2.
https://tallowmere2.com
13 stars 0 forks source link

Steam Leaderboards: Make submissions pass through secure server first #1057

Closed ChrisNZL closed 2 years ago

ChrisNZL commented 2 years ago

Would allow a secure Tallowmere 2 server to save a copy of a savefile with the submission, store further details, etc, rather than submitting from client-to-Steamworks directly blindly.

ChrisNZL commented 2 years ago

Done for 0.3.6.

Steam

Scores for the Steam leaderboards now get submitted to Tallowmere 2's web server, and the web server submits the scores to Steamworks. This allows copies of the saved game file, and a screenshot, to be able to be saved for investigation later on if needed (for the best scores, anyway).

Ruleset 0.3.6 is now the default ruleset, though it's exactly the same as Ruleset 0.3.1 (unless I make any last-minute changes) -- needed to be done to cater for this leaderboard refactor.

In the event the web server or Steamworks fails to submit, the pending entry will remain on the client's account file to submitted again later.

iOS & Google Play

In a similar manner, leaderboard score submissions for Google Play and iOS will also pass through the web server before being submitted to Google Play / Game Center.

If the user has purchased the Core Supporter Pack, the web server will save the entry.

Regardless if the user has or hasn't purchased the Core Supporter Pack, the score will still be submitted to Google Play or Game Center.

Leaderboard webpage (future feature)

Issue #1067: Leaderboards: Create public webpage for scores

With the web server retaining scores in a database, I plan to allow this to become publicly-visible as a webpage.

This also paves the way for daily and weekly runs later on, by using my own leaderboard system. Will be able to integrate such lookups into the game as well.