Comment

Comment by actionfromafar

Sort of ... but I think it's easier to do the disk access as usual, but move your real-time game code (updating graphics, taking care of input) to a timer interrupt.

Edit: then you effectively have your main loop doing IO and such, while your game loop is a co-routine in modern parlance. The game loop can write a global variable which the main code takes as a hint to start loading file data.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton