Page 1 of 1

How do I make an Artsoft API account?

Posted: Tue Nov 09, 2021 8:29 pm
by SLAPPYHAPPY2000
Hello, everyone!

To Holger: Congrats on the new update! It's super cool that the new high score server is finally here.

How do I get tapes uploaded onto Artsoft API, though? When I opened the game on the new version it gave me the automatic prompt to upload all of my tapes to the high score server, but they did not show up on the website. Do I need to log in to submit them? Also, how do I activate the prompt to upload the tapes again?

Thanks a billion.

Re: How do I make an Artsoft API account?

Posted: Tue Nov 09, 2021 11:40 pm
by filbo
When tapes are uploaded, the server plays those tapes against the corresponding levels to verify that they actually solve. So they appear on the server a few minutes later. You should recheck whether yours are now present.

Tape uploading is controlled by serversetup.conf in your account's game directory (~/.rocksndiamonds on *ix, I can't speak for Windows or others). The key entries are:

Code: Select all

ask_for_uploading_tapes:                off
provide_uploading_tapes:                off
'off, off' is how the game leaves them after it has completed the initial upload. If 'ask' is turned on, it will again prompt you to upload all tapes. If 'provide' is on, Setup > Game & Menu will have an 'Upload all tapes to server' item.

I'm not sure why 'provide' gets turned off. Well, I suppose it's because currently there's nothing else to tell the game that it's already uploaded your tapes and shouldn't go through the whole potentially long process again; and once all tapes have been uploaded, it's supposed to reach a steady state where every time you complete a level, that tape is immediately uploaded. But of course things can go wrong (network errors, you were in airplane mode, server was down, etc.) Holger's going to add some stuff so the game will know on a per-levelset basis, then I suspect he'll leave 'provide' turned on. (In fact, once those flags exist, it will be able to know pretty easily that there are some un-uploaded tapes at startup time, left over from whatever network issues prevented them last time; so maybe then it will prompt again: 'Upload previously unsent tapes?'

Re: How do I make an Artsoft API account?

Posted: Wed Nov 10, 2021 10:32 am
by Holger
Thanks, filbo, for the detailed explanation of how things work.

Yes, after uploading all tapes, I should add another info dialog telling the user that scores will not show up immediately, but after they have been validated, which may take some time (usually something like 5 to 10 minutes -- the cron job for this runs every five minutes).

And yes, the setup entry for manually uploading tapes will be hidden once all tapes have been uploaded successfully. As long as the tape uploading ends with whatever error, it stays there for another try.

And yes, the next version (hopefully released within a few days) will improve robustness of tape uploading a bit -- both for the initial upload process (not starting all over again if it failed at 90 % progress), and for later failures (like not being able to upload a new solved level score while sitting offline in a plane). In such cases, R'n'D will remember this and ask again upon next start.

Re: How do I make an Artsoft API account?

Posted: Thu Nov 11, 2021 1:40 am
by filbo
My experience was, when my 24K upload first failed, the option to manually trigger the upload was not in Setup; I had to edit it back on in serversetup.conf. Check for some bug in that logic?