Log In  

A small piece of code to dynamically create a functional cart from another cart and load it.

Why is this useful? Well, obviously this opens the door for somebody to write an alternative code editor for pico-8 carts! (j/k)

function _init()
    printh("pico-8 cartridge\n\n__lua__\n"..
[[
-- your cart code here
function _draw() 
    cls(7)
    print("hello world",60,60) 
end
]],"dynamic.p8",true)
    load("dynamic.p8.p8l","back")
end 

Caveats:

  • Generated cart has ".p8l" extension, but it seems to load just fine
  • It doesn't work for carts embedded on the BBS or loaded with Splore
P#62671 2019-03-08 01:58


[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-28 08:04:29 | 0.006s | Q:9