Log In  


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!



Do they not close out the executable, or not close out Pico-8 itself? Also what type of computer do you have?


Neither, but the goal is to close the executable. I'm using a surface pro 3 (Windows 10)


I don't know how to get it to work then. It doesn't seem like a working feature/command even though the editor colors it green and recognizes it. Maybe this is a bug or an intended feature that never was completed?


Seems like it. People also thought so in the Discord.

Thanks for helping either way :)


3

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.


any update on this?


@celeste

extcmd("shutdown")



[Please log in to post a comment]