Hi! I'm developing a short little game in PICO-8 and plan to export it as an executable. The problem is, I would like the game to close itself after something happens. I've tried using the 'shutdown', 'exit' and 'stop' functions but none of them closes the window at the end of the game.
Is there even a way to do this? Or perhaps I'm using the previously mentioned functions in a wrong way?
Thanks for the help!


It looks like the shutdown API call is intended to not work from running carts. Here's an excerpt from the changelog (from version 0.1.18) in the manual:
Changed: exit() / shutdown() have no effect while running cart |
...which makes sense to me, since PICO-8 is supposed to be a "console", and a cartridge being able to turn off a console would be kind of strange. However, it might make sense for an exported binary to be able to do it (at the time of that changelog entry, binary exports did not exist) since those are kind of a standalone thing, so maybe it's worth asking zep about it.
[Please log in to post a comment]