Last active
June 5, 2024 15:39
-
-
Save kometbomb/9a644e9814330ee067b72e051c7d1965 to your computer and use it in GitHub Desktop.
#PutAFlipInIt! #pico8
This file contains 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
-- 1. Paste this at the very bottom of your PICO-8 | |
-- cart | |
-- 2. Hit return and select the menu item to save | |
-- a slow render gif (it's all automatic!) | |
-- 3. Tweet the gif with #PutAFlipInIt | |
-- | |
-- Notes: | |
-- | |
-- This relies on the max gif length being long | |
-- enough. This can be set with the -gif_len | |
-- command line option, e.g.: | |
-- | |
-- pico8.exe -gif_len 30 | |
-- | |
-- The gif is where it would be when you hit F9. | |
-- Splore doesn't play nicely with this, you | |
-- need to save the splore cart locally and load | |
-- it. | |
-- | |
-- You might need to remove unnecessary | |
-- overrides to save tokens. pset() override | |
-- flips every 4th pset() call. | |
-- | |
-- This doesn't always play nicely with optional | |
-- parameters, e.g. when leaving out the color | |
-- param. | |
-- | |
-- Name clashes might happen, didn't bother | |
-- to namespace etc. | |
function cflip() if(slowflip)flip() | |
end | |
ospr=spr | |
function spr(...) | |
ospr(...) | |
cflip() | |
end | |
osspr=sspr | |
function sspr(...) | |
osspr(...) | |
cflip() | |
end | |
omap=map | |
function map(...) | |
omap(...) | |
cflip() | |
end | |
orect=rect | |
function rect(...) | |
orect(...) | |
cflip() | |
end | |
orectfill=rectfill | |
function rectfill(...) | |
orectfill(...) | |
cflip() | |
end | |
ocircfill=circfill | |
function circfill(...) | |
ocircfill(...) | |
cflip() | |
end | |
ocirc=circ | |
function circ(...) | |
ocirc(...) | |
cflip() | |
end | |
oline=line | |
function line(...) | |
oline(...) | |
cflip() | |
end | |
opset=pset | |
psetctr=0 | |
function pset(...) | |
opset(...) | |
psetctr+=1 | |
if(slowflip and psetctr%4==0)flip() | |
end | |
odraw=_draw | |
function _draw() | |
if(slowflip)extcmd("rec") | |
odraw() | |
if(slowflip)for i=0,99 do flip() end extcmd("video")cls()stop("gif saved") | |
end | |
menuitem(1,"put a flip in it!",function() slowflip=not slowflip end) |
Really? I thought that was somehow disabled in Pico-8. Need to check on that, thanks!
Is this available for reposting elsewhere under some license?
MIT license applies.
pe 7. helmikuuta 2020 klo 0.33 sparr <[email protected]> kirjoitti:
… Is this available for reposting elsewhere under some license?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<https://gist.github.com/9a644e9814330ee067b72e051c7d1965?email_source=notifications&email_token=AAIIV2OZR5MYOF4AWZDQKI3RBSF23A5CNFSM4KRFDI7KYY3PNVWWK3TUL52HS4DFVNDWS43UINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQAGBNGA#gistcomment-3168864>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIIV2LAH5ENZ3CBTTCOQFTRBSF23ANCNFSM4KRFDI7A>
.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use lua's varargs instead of specifying each parameter to have cleaner wrappers and avoid trying to fix optional parameters