Closes the game.


GML Code Example


Returns: N/A


With this function you can end the game (and the Game End Event will be triggered). This will not happen instantaneously, but rather at the end of the current step, so any code you have in the same step after this function has been called will still run. Please note that this function has the following restrictions:

  • It will report an error on the Windows 8 and iOS modules as it is against the conditions of their respective Marketplaces.
  • It will silently fail on the HTML5 module.
  • It will work on Windows (including Steam Workshop), Windows Phone, Android, Linux and Mac.


GML Code Example

if keyboard_check_pressed(vk_escape) game_end();

This would end the game if the player presses the "escape" key.

No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here