Skip to content

Refactor/Improve event handing #2

Description

@devinsmith

All event handling (outside of the initial title screen) is handled today in engine.c (within sub_28B0) but this is not ideal because this code is only invoked via script execution and we would prefer to decouple script execution and event handling.

It is preferable for the main game loop to invoke event handling outside of script execution such that events and scripts are handled separately like traditional game loops.

while (keep_going) {
   process_events();
   process_timers();
   // ....
   execute_scripts();
   update_display();
   sleep(...);
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions