Page 2 of 2

Re: How to do cleaner fog of war

Posted: Wed Nov 17, 2021 3:45 pm
by grump
Gunroar:Cannon() wrote: Wed Nov 17, 2021 2:15 pm Oh, I've already got that worked out ... cheaply :ehem: :ultrahappy: . I just need to keep seeing the different types of implementations and see whether one will work for me or whether I should try something else.
Okay... sounds a bit unbelievable but okay. The "coolest" and most flexible way in my opinion to implement 2d shadow rendering is with signed distance fields, but it's also the approach that's most difficult to implement.

https://www.shadertoy.com/view/4dfXDn

Matt's solution with the polar transform that was linked above comes second.

https://github.com/mattdesl/lwjgl-basic ... ct-Shadows

The "no shader" limitation unfortunately means all high-performance GPU implementations are out the window and you have to make do with some sub-par hacky solution that looks and performs worse.

I'd recommend looking into one of the good solutions anyway, because anything else is going to be utter crap in comparison.

Re: How to do cleaner fog of war

Posted: Wed Nov 17, 2021 4:08 pm
by Gunroar:Cannon()
Thanks for the Image
grump wrote: Wed Nov 17, 2021 3:45 pm
Gunroar:Cannon() wrote: Wed Nov 17, 2021 2:15 pm Oh, I've already got that worked out ... cheaply :ehem: :ultrahappy: .
Okay... sounds a bit unbelievable but okay
:rofl:
To be honest I was planning to do a normal POV grid based thing for determining what isn't seen :P

Re: How to do cleaner fog of war

Posted: Mon Nov 29, 2021 8:27 pm
by milon
Gunroar:Cannon() wrote: Wed Nov 17, 2021 2:15 pm ...Does it work with...like...alot of "polygons"(tiles). Which are alot on my screen.
Polygons are actual polygons, drawn with love.graphics.polygon() and "tiles" are usually defined as graphics (or quads of graphics) drawn with love.graphics.draw(). Polygons are generally slow and inefficient compared to drawing tiles. You used both terms - which are you drawing a lot of? ;)

Re: How to do cleaner fog of war

Posted: Mon Nov 29, 2021 8:54 pm
by Gunroar:Cannon()
I just figured tiles are a type of polygon in coding terms (to , like, fit it into the algorithm). So I do mean tiles, but for me to do the method I'll have to treat them as algorithms right?
milon wrote: Mon Nov 29, 2021 8:27 pm a lot of? ;)
:rofl:
Image
Funny thing is that autocorrect says "a lot", but my autocorrect misses words like "platformer" and others and whenever I type "alot" I'm always like "I KNOW this is how it's done. I just KNOW it must be" :rofl: Atleast now it's in my head for good, thanx thanks

Edit: That link seriously made my day :ultrahappy: