1. Hey! Guest! The 35th GMC Jam will take place between November 28th, 12:00 UTC - December 2nd, 12:00 UTC. Why not join in! Click here to find out more!
    Dismiss Notice

GMS 2 Steam Leaderboards - Optional Data

Discussion in 'Programming' started by Thomas N, Jul 7, 2018.

  1. Thomas N

    Thomas N Member

    Joined:
    Feb 11, 2018
    Posts:
    14
    Hello,

    I'm using Steam Leaderboards in my project. The Steam web page says:

    I would like to use the optional int32s/data but could not find a way to upload it. It seems not possible with the two available upload functions ... and might be impossible at all with GML?
     
    Last edited: Jul 7, 2018
  2. YellowAfterlife

    YellowAfterlife ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ Forum Staff Moderator

    Joined:
    Apr 21, 2016
    Posts:
    2,427
    steam_upload_score_buffer is the one you want - the buffer can be up to 64*4=256 bytes.
     
  3. Thomas N

    Thomas N Member

    Joined:
    Feb 11, 2018
    Posts:
    14
    Hi YellowAfterlife,

    Thanks for your help. I tried it with steam_upload_score_buffer but I thought it would not work because the uploaded data doesn't appear in Steamworks where the Leaderboards are. But maybe thats my fault and this data is just in the background and not available in Steamworks itself?
     
  4. YellowAfterlife

    YellowAfterlife ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ Forum Staff Moderator

    Joined:
    Apr 21, 2016
    Posts:
    2,427
    I've not checked Steamworks for this but I wouldn't surprised if the site didn't - it is binary data after all. should try displaying score data after downloading scores, as shown in Steam event example in the documentation.
     
  5. Thomas N

    Thomas N Member

    Joined:
    Feb 11, 2018
    Posts:
    14
    Okay, thanks.
    It would be a great help for me to see some data (at least a little bit more than just the highscore entry with int32) outside the game. I guess I have to do some programming to achieve that. ;)
     
  6. FredFredrickson

    FredFredrickson Member GMC Elder

    Joined:
    Jun 21, 2016
    Posts:
    118
    Resurrecting this old topic because I'm curious about this... assuming you've used steam_upload_score_buffer(), how does one later retrieve the data from the leaderboard? Does it come down in the async event under "details"?
     
  7. YellowAfterlife

    YellowAfterlife ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ Forum Staff Moderator

    Joined:
    Apr 21, 2016
    Posts:
    2,427
    If I remember correctly, yes - try displaying json_encode of incoming data. I think the buffer was in base64 format.
     
  8. FredFredrickson

    FredFredrickson Member GMC Elder

    Joined:
    Jun 21, 2016
    Posts:
    118
    Thanks Yellow - I should've pinged you sooner, haha! I actually figured it out this morning with some help from the GM Slack group.

    Basically as you said - it's encoded base64. I had missed the part in the manual where it said it came in a "data" entry in the async_load map for Steam, so I had a fun time figuring that one out on my own. :D

    I summed up what I found that was outside of the purview of the documentation and submitted a bug report/documentation edit for all that. Hopefully it saves people in the future some time!
     
    YellowAfterlife likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice