So, who's going to Reinvent next week?
HN user
ross-squires
@kevincox and @g_hn_liaison have it right. There's a set of parallel workers that test different button inputs. The "output" is the last frame rendered to the screen after extra few frames to let the game respond. Those button outputs are compared with an "idle" output to determine if pressing any input could change the output. If not, then continue to autoplay until an input matters.
Added!
I spent a few weeks building a Discord bot that allows you to play NES/SNES/GB/GBA games over chat. Think “TwitchPlaysPokemon”, but with GIFs. It accepts button presses, emulates the result, and encodes a GIF to view!
I have read this article sooooo many times. It's an awesome resource. Without it, Hex Kit (https://coneofnegativeenergy.com/hexkit/) would have never existed.
I'm a huge fan of mbed OS. The build system adapts to any environment, and you can "eject" if you want to tweak a specific build style. I personally use VS Code with the "mbed compile" workflow.
The official libraries are well-documented and easy to use. I've had to fight a couple vendor-specific oddities when adapting third-party components from their online community, but everything else seem to work as expected.