Hi, I'm the maker of Mash Gadget. I recently, finally got a real Playdate, and the game doesn't run as well as in the simulator! Shocking, right?
The main gameplay mode is where you press A or B as rapidly as you can to increment a score (int), but playing this on device is jankier than expected. I would like the number to update at least as fast as the Shooting Watch it's mimicking (here's a video of ideal performance), but ironically, it appears that the faster the button's pressed, the less often the number updates -- to the naked eye, every other press or so.
The game modes run in update() states, and originally I had an if-then inside this mode that checked buttonJustPressed then just adds 1 to the score. (I realize that's per update, but again, it was fast enough in the simulator...!) On device, if you press A & B alternately, the score increases as rapidly as I'd like it to be with one button (though that's for novices anyway!) Similarly, if we try the if-then with buttonIsPressed and I hold the button, the score's naturally increasing every tick, so I imagine this can be done on a single-rapid-press basis.
An attempted solution was moving the score-changing outside update() to an AButtonDown() function, which might be more efficient but didn't change anything. I then tried a test script with the bare essentials -- AButtonDown changing a number and a three-line update() -- but no change. Using buttonIsPressed and checking button states that way also wasn't working.
There were some other dead-end tries that maybe I did or didn't do correctly, but I'm out of theories. Is this a hardware issue? Do we need to integrate C? I'm very much a neophyte as you can tell by the simple game, but any insight here would be helpful. This is Lua on Windows, btw. Thanks.
(Attached is my test script. )
buttontest0.lua.zip (480 Bytes)