I suppose I would have expected a userdata pointer here as is common with callbacks in C. (in general, and also with other callbacks in the C Playdate API)
let's say I call getPersonalBest() for two boards concurrently. How do I know for which board I received a result?
From some testing, it seems the callbacks are called in the order of requests, so if you store the callbacks in a FIFO (first in first out) list and take one callback from the list when a response comes in, that might work reliably on 2.6.0 beta5 at least
Thanks for the practical suggestion; however I'm looking at 30+ scoreboards. Also, since I'm programming in Nim, I'm not directly calling the playdate API but rather the Playdate-Nim API and that nim api will require some generic callback arg.
I also happen to be working on implementing Scoreboards in the Nim api, so I do have that flexibility at least.
so in the callback for the level1 result you create a request for level2, right? I vaguely remember you mentioning somewhere that sequential requests complete faster than parralel?
Exactly. In my experience the difference was pretty substantial. I've fine-tuned my method over the course of a few games and with Bender 2 it's as good as I can get it.