Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Life cycle #3

Open
Apostolique opened this issue Mar 28, 2020 · 0 comments
Open

Life cycle #3

Apostolique opened this issue Mar 28, 2020 · 0 comments

Comments

@Apostolique
Copy link
Owner

Here is my current ideal life cycle:

  • Setup
  • Game loop:
    • UpdateSetup
    • UpdateInput
    • Update
    • UpdateCleanup
    • Draw
    • DrawUI
  • Cleanup

Setup: is where everything is put in place for the game loop.

UpdateSetup is meant to update stuff before user inputs are processed.
UpdateInput: should only be doing things that are related to user inputs. This step might not happen during the update phase if inputs are disabled.
Update: is for things that need to be updated regardless of user inputs. For example, animations can still happen even if inputs are disabled.
UpdateCleanup: gives the opportunity to cleanup variables before the next update phase.

Draw: is for drawing objects that belong in the game world.
DrawUI: is for drawing objects in screen space like UIs.

Cleanup: is called before something is destroyed. For example, in an in game map editor, this would be called when switching back to the game.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant