Exclusive modes
An exclusive menu/test mode should own the whole cycle:
int menu_open;
main {
if(menu_open) {
block_all_inputs();
menu_tick();
} else {
gameplay_tick();
}
}
function menu_tick() {
// menu-only state and output
}
function gameplay_tick() {
// normal logic
}Suppressing a few menu buttons is not equivalent to skipping gameplay logic. A later gameplay block can still mutate state or overwrite outputs.
Last updated

