This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pico-8 cartridge // http://www.pico-8.com | |
| version 16 | |
| __lua__ | |
| --init | |
| _t=0 | |
| dirx={-1,1,0,0,1,1,-1,-1} | |
| diry={0,0,-1,1,-1,1,1,-1} | |
| tiles={16,8,15,7,12,4,11,3,14,6,13,5,10,2,9,0} | |
| function _init() | |
| _upd=upd_game |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pico-8 cartridge // http://www.pico-8.com | |
| version 16 | |
| __lua__ | |
| --init | |
| function _init() | |
| -- hold debug messages | |
| debug={} | |
| particles={} | |
| p_colors = {5,6,7,10,9,5} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pico-8 cartridge // http://www.pico-8.com | |
| version 16 | |
| __lua__ | |
| function _init() | |
| _t=0 | |
| sprites={1,2,3,4} | |
| end | |
| function _update() | |
| _t+=1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pico-8 cartridge // http://www.pico-8.com | |
| version 16 | |
| __lua__ | |
| function _init() | |
| x=-40 | |
| y=64 | |
| body={1,3} | |
| head={5,7} | |
| s={ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pico-8 cartridge // http://www.pico-8.com | |
| version 16 | |
| __lua__ | |
| global_y = 0 | |
| function mt(t1,t2) | |
| local new = {} | |
| for k,v in pairs(t1) do new[k] = v end | |
| for k,v in pairs(t2) do new[k] = v end | |
| return new | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pico-8 cartridge // http://www.pico-8.com | |
| version 16 | |
| __lua__ | |
| function center(width) | |
| return (screen_width / 2) - (width / 2) | |
| end | |
| function _init() | |
| cls() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pico-8 cartridge // http://www.pico-8.com | |
| version 16 | |
| __lua__ | |
| function sleep(s) | |
| for i=1,s*30 do | |
| flip() | |
| end | |
| end | |
| c = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pico-8 cartridge // http://www.pico-8.com | |
| version 16 | |
| __lua__ | |
| function sleep(s) | |
| for i=1,s*30 do | |
| flip() | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "ugui.h" | |
| #include "8bkc-hal.h" | |
| #include "8bkc-ugui.h" | |
| // used later in example | |
| float health = 100; | |
| void app_main() { | |
| kchal_init(); | |
| kcugui_init(); |