Skip to content

Instantly share code, notes, and snippets.

@amiantos
Created November 22, 2020 23:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amiantos/b41614c7156927a487f753fd2e0011f3 to your computer and use it in GitHub Desktop.
Save amiantos/b41614c7156927a487f753fd2e0011f3 to your computer and use it in GitHub Desktop.
Pico-8 Project Starter Template
pico-8 cartridge // http://www.pico-8.com
version 29
__lua__
function _init() menu_init() end
function menu_init()
_update=menu_update
_draw=menu_draw
end
function menu_update()
if (btnp(🅾️)) return game_init() --play the game
end
function menu_draw()
print("menu!")
end
-->8
function game_init()
_update=game_update
_draw=game_draw
end
function game_update()
if (btnp(🅾️)) return gameover_init()
end
function game_draw()
print ("game!")
end
-->8
function gameover_init()
_update=gameover_update
_draw=gameover_draw
end
function gameover_update()
if (btnp(🅾️)) return menu_init()
end
function gameover_draw()
print("game over!")
end
__gfx__
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00700700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00077000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00077000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00700700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment