Post

trying another #playdate idea: guy with a candle/lantern quite noisy, but it has soft shadows with correct penumbra behavior, and runs at a stable 30fps on the device!

a clip showing the penumbras more clearly - the shadow's edge is softer when standing very close to the shadowcasting corner, and gets sharper as the light gets farther away. it's a "real" area-light!

0 reposts11 likes

for some reason i can't post video replies in this thread anymore lol. maybe just a bug in the site, will try again later. here's a screenshot for now: normal mapping for floors, highlights for lit faces of walls, ambient light for the more relaxed scenes

whoa that's awesome. What's the FPS on device? I was tinkering with a grid/dungeon game for Playdate but wasn't sure how much lighting i could get away with. Nice work in case, this is inspiring me to pick it up again

aiming for 30FPS in general - for most of the thread, it's using between 50% and 60% of that 30FPS CPU budget in that latest clip with the AO, it's pretty much maxed out, but i'm swapping in a faster AO method to bring it back down again

making a map editor, partly to make it faster to set up rooms, but also so i can auto-generate these red sectors... sectors are always rectangles, so any two points inside the same sector are guaranteed to have line-of-sight to each other. this should allow a much faster raycasting strategy!

trying some ambient occlusion - i'm doing it in an unusuable bruteforce way for now, but i like how it looks enough that it feels like it'll be worthwhile to find a smarter way to do it