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!

P#60083 2018-12-18 18:47

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

P#60086 2018-12-18 20:15
:: GabeD

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

P#60088 2018-12-18 21:06

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?

P#60089 2018-12-18 21:11
:: GabeD

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

Thanks for helping either way :)

P#60090 2018-12-18 21:14
2

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.

P#60093 2018-12-18 23:46 ( Edited 2018-12-18 23:47)

[Please log in to post a comment]

About | Contact | Updates | Terms of Use
Follow Lexaloffle:        
Generated 2019-06-17 06:40 | 0.014s | 4194k | Q:24