Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

thank you! I’m quite proud of those shadows

part 1: bitplanes! basically it’s a pico8 feature that lets me write colors to the screen without completely overwriting the old colors. earlier in the code poke2(-15-😐,...) sets up the palette that makes this work

part 2: flr(63-😐) happens to be equal to 0x5f5e, which is the address I need to poke to configure the bitplanes

putting it together:

poke2(0x5f5e,0x00f4)  --enable bitplanes. (poke would make more sense, but poke2 works and we have it saved as a single-letter-variable)
rectfill(x-1,y-1,x+width,y+height,4)  --draw the shadow
poke2(0x5f5c,0xffff,0xffff)  --disable bitplanes (also disable btn() repeat -- we need to do that anyway, and here is convenient)