Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Thanks :) Glad you enjoyed it!

I’m using 2d signed distance fields and exponential smooth minimum.

https://www.iquilezles.org/www/articles/distfunctions2d/distfunctions2d.htm

https://www.iquilezles.org/www/articles/smin/smin.htm

The cool thing about the exponential smooth min is you can add an arbitrary number of sdfs together smoothly and very efficiently.

The parts of the rings are vesica sdfs transformed by the first part of exp smoothmin with additive blending into a framebuffer. I then do a second pass to “decode” the framebuffer, applying the last part of exp smoothmin and colorizing it.

Sorry if that was a very dense explanation.

Btw, I almost ended up not submitting the game because I spent most of the game jam fiddling with those sdf rings and had no idea what to use them for until the very last hours.

(1 edit)

That is seriously awesome.  That's what I expected, since I've been experimenting with distance functions recently as well!  (Raymarching is pretty much what you did but in 3D)  Don't worry, I understand what you're talking about ;) Funnily enough, I used the exact same website when researching how to implement my raymarching code (https://replit.com/@01000001/Raymarching#main.py).  It's cool to know others find the same things interesting!  Also, thanks for the resource on the smooth min function.  I might be able to improve that bit of my code (you can try it out in my code by setting blendObjects to True).