Skip to main content

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

I asked it on the GM forums, but figured I'd ask here too. The "castle" scene in the demo is almost exactly what I need, but the transition from "in front of light" to "behind light" is really jarring, going from fully dark to fully lit immediately.

Is there anyway to utilize something like the "light penetration" feature to give it a 1px edge light while the light is behind or beside the sprite? Or maybe more than 1px, depending on light angle, so that as the sprite comes up alongside the light, it lights it more fully, rather than just snapping to a lit state?

If there was a way to do this, I might be convinced, but $60 is a high price tag to experiment with, you know?

(Also the "toggle dithering" feature on the castle demo doesn't work. Nothing toggles on or off for me.)

Hello!

Regarding the depth change, this is because I'm using depth = -y for depth sorting, and since the game is still 2D, the light is just a "plane," and they're organized into layers, like other things. You can simulate smooth transition by applying a shader that darkens the tree depending on the light's position (but this isn't included).

I need to make it clear that it's more difficult to deal with depth in 2D if you're trying to imitate 3D perspective, like in top-down Zelda-like games, but it's possible to get good results.

Yes, you can change litType to LIT_ALWAYS. This will make the light always stay on regardless of the depth. You could also experiment "normal maps".

What graphics card do you have? AMD or NVidia? I can try to fix that.

I understand the price issue. I sometimes offer discounts, so you can follow me to be notified. You can get a refund if Crystal does not deliver what was described.

I guarantee you won't regret getting Crystal, it's currently the most complete library for GameMaker, and you have complete freedom with it.

Thanks for the quick reply! And the pricing would completely be worth it if it solves what I need. I'm on NVIDIA, if that helps.

I'm definitely not good enough with shaders to write something that would give that gentler lighting effect I'm after. Shaders are hard as hell, so kudos for what you've written.

Is it possible to toggle both "plane" lighting and put a normal map edge lighting effect on top of it, like you demonstrate in the docs you sent? I know that often times these different draw methods are organized as separate functions in libraries like this.

(3 edits)

You're welcome

Yes, it is completely possible to combine both methods. Edge lighting is a property of the light (light penetration), and normal map is a property of the material

What is your specific GPU model if I may ask? I have a GTX 1050 TI and it works fine

(+1)

RTX 2060, but the laptop version. (My understanding is that desktop and laptop version of graphics cards differ slightly.)