Stackless Coroutines for Gamedev in ~200 Lines of C++: Write Your Own Before Reaching for a Library
The Problem: Your Game Loop Is a Callback Nightmare The sequence sounds simple when a designer describes it: “wait two seconds, then spawn the enemy wave, then trigger the cutscene.” The code that implements it is where your sanity goes to die. Here’s what that looks like in a typical game loop without coroutines: // … Read more