So... since I'm copying a number of .p8.png files to my Picade for on-the-go play, I was going to try and edit the code in them so they contain a software exit... simply put, "start + select" will issue the shutdown console command. Is this something we can do within the game? Like simply...
if (btn(7) is true and btn(8) is true) shutdown()
...or is it messier than that?
Tony, you have the advantage that you're not working with my code. (I hope I said that correctly). :)
By this I mean you have normal coded games use the function _Update(). In this, you could easily check for these two buttons and then issue the command shutdown() or stop().
However, for my games and stuff, you can always insert your shutdown checking code in-between the function nano() which I often use to read the keyboard and in some cases, update the screen.
there's no button you can poll beyond 5. though you could add a 'shutdown' option via menuitem(). problem is, shutdown() & exit() don't work from within code since 0.1.8, for some reason.
I guess your best bet for now would be to start in splore mode ?
having 'shutdown' in the pause menu is a feature that has been asked for numerous times on this board...
Well you can still shutdown PICO-8 using atan2(1,32768) as of 0.1.9b :-)
lol! here's a oneliner then:
function exit_cb()atan2(1,32768)end menuitem(1,'exit',exit_cb) |
(spawns an annoying box on windows though) :)
[Please log in to post a comment]