Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

So, you can use it with the screen language by applying it to transforms and then use those transforms when you're constructing your screens.

You can apply transforms to an entire layer to make effects work across all objects on that layer simultaneousl, but it's worth noting that it isn't a true lighting system.  The objects will not cast shadows and the shaders do not have a means of gathering information outside of itself, so it can't accept shadows either.  It's simulated lighting effects, which just provides the illusion of more advancing lighting at play but has its limits when compared to a system with actual light sources.

(5 edits)

Thanks for the quick response, Stella!

Edit: Can ignore what I wrote below. I got it working! Setting back light to 0's, back light direction to 0.5,0.5, and feeding key light a dynamic position did the trick. Now I have a 'night' version with dynamic light sources that I can place where needed.

Thanks for this awesome system! Already tested on a fixed with 3 independent objects and also programmed dynamic shadows to follow my mouse cursor as the light source for testing. Everything is working perfectly. ^^

I have been coding shadows myself dynamically, since those are easy, I can tie them to the object itself and change them relative to the light source. I actually don't need to go that far for what I am doing, though.

However, shader and rendering is something that lies outside of the displayable and I am still not quite certain how to 'apply transforms to an entire layer' the way you described using this system. I work with Alpha Masks and transforms just fine, but I don't understand how to apply the shader.

Let's say the shader I want is a radial light gradient for a torch that is 500x500 px radius (I have a PNG with this design on it). I want it centered on the torch which is located at, let's say an align of 0.5,0.5 (center of the screen for simplicity).

How can I feed the position and size of the shader to the transform relative to the screen? Do I define that in the transform itself, or do I need to use the system to register a new shader?

(Actually, a TL;DR simple case application might just be: How can I use this to make a radial light source follow my mouse cursor? If I can accomplish that, I think I can do the rest myself.)