I can't offer coding help right now (I was thinking of optimizing it myself, but I'm working on other areas of my project atm), but I can try testing your solutions.
Also, the animation support sounds really good

I optimized this now so I make sure that the object is both on screen and within light range. Optimizing it future (i.e. seeing if it is already in shadow) would probably not optimize it much further because the checking would be costly.nfey wrote: @drunken_thor : speaking of optimizations and speed, while nosing around in the code, I think I noticed that the library currently draws all shadows, for all bodies, for each light. From what I can see, it doesn't take into account whether there is something between a body and a light, or whether the body is too far away from the light for it's shadow to be drawn. Is this correct? Are you looking at optimizing this?
I can't offer coding help right now (I was thinking of optimizing it myself, but I'm working on other areas of my project atm), but I can try testing your solutions.
Also, the animation support sounds really good![]()
Please try the new code that I just released. And report back to me because I redid how shine and shadow are calculated. Sorry about making you rewrite.giann wrote: Awesome work ! Thanks a lot !
There seems to be a problem with multiple lights.
I have 2 lights: the first is ok, the second works ok for the shadows but the bodies are not lighted.
Just a update on this, I have been playing around on getting these two libraries working together and have figured out what is the problem, please follow this bug that I have logged with the creator of STI https://github.com/karai17/Simple-Tiled ... /issues/65Jeeper wrote:Just a PSA to anyone who intends to use this library and is using STI, the v2 of Shadow vs light changed the way it uses canvases and does not like STI for that reason. After struggling for a long time with trying to implement this updated version to my current project, I spoke to "drunken_thor" (Who manages the library) and he confirmed that it is not compatible with STI.
The old Shadow vs Light does not have this issue however, so If you intend to use STI then I would recommend using it. A few major improvements made in this version are missing though, but I have managed to fix most of them (Such as scaling and translation, removal of shadow and light bodies etc). So if you intend to do like me and use the older version, feel free to ask for help in case you run into any issues.
Ah yes I see you are right, the whole shadow drawing process was rewritten, I was bound to miss something. I will let you know when I get that back working.giann wrote:The issue with multiples ligths is fixed. But now the shadow aren't blurred. I tried :setShadowBlur with no success.
Okay I push a change that will fix it though when the number gets higher it leaves objects with weird halos I doubt your will see it with normal values but I will try and mitigate it anyways.giann wrote:The issue with multiples ligths is fixed. But now the shadow aren't blurred. I tried :setShadowBlur with no success.
Users browsing this forum: Google [Bot] and 3 guests