Skip to content

Allow to gracefully quit the game on demand #59

@hecrj

Description

@hecrj

As of now, the only way to gracefully quit a Game after Game::run is to implement Game::on_close_request and wait for a close request.

However, it is very common in games to have a UI option to "Quit the game". While we can use std::process::exit, it's not ideal as it doesn't gracefully stop the execution.

Therefore, I think we need to rethink the Game API a bit to allow graceful quits on demand.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions