In my earlier topic here: Trying to Learn How Richard Builds Engine-Level Code like controller.ts I’ve been asking about building engine-level systems like controller.ts.
This time, I’m curious about prompt.ts — specifically, the function that asks the player for a string (game.askForString()).
I’m not asking how to use it — I want to understand how the internal logic was implemented:
How does it store the prompt state?
How is it hooked into the game’s update loop?
How does it capture input events and draw the UI?
How does it finish and return the value to the caller?
If possible, I’d love a simplified breakdown or pseudo-code showing how you designed it so it feels like a built-in engine feature.
Yeah, I am still learning how they code prompt file with a lot of lines in just an hour as well, but I just hope that @Richard or @Jwunderll one day can do it.