I know this is an older video now, but I want to say how helpful this is. The only thing is the light doesn't want to shrink or grow / bob despite me fiddling with the code to try to get it to. Any idea why ?
How is the global._part_system defined at the beginning of the video so I can launch the game without it crashing for this not being referenced? Tried doing this during the bit where you first test the opaque black surface
In my project i have the viewport X offset by -600 in the viewport properties so that it appears on the left side of the screen at all times. This is causing a black bar to appear on the right side of the screen. do you know what could be causing this?
@@DragoniteSpam thanks for the super fast answer. how do you think do other games solve night time (for example stardew valley)? When I use photoshop I can get a kinda good night time color multiply but in game maker it's tough. Also because I still don't fully understand surfaces. Always when I think "this must work like this" it doesn't :D.
How do I delete the lighting effect after applied. In my game I want this effect to work for 1 room but every room after that becomes pitch black even though I don't have the object
you need to add the clean up event to the lighting object and write this code in the cleanup event if (surface_exists(light_surface)) {surface_free(light_surface);}
@@Starbula surface_free never changes anything, when the object is deleted or I activate that from anywhere else, it doesn't do anything. All my other rooms are pitch black and nothing else.
Hi i cant seem to figure out why this doesnt work for me, ive got a camera obj that follows the player (just mentioning it incase its the cause, but i dont think it is) I typed the code the exact same as you did, but the light is never centered on the torch, it seems to move based on the torch's position in the world, with the further left it is, the further left the light is. and when i make it follow the player too, the light is just fixed to the left of the head, rather than being centered. My light cutouts origin is the center of the light, the torch's origin is the center of the flame, and the players origin is the center of the character
Great video. Easy to understand and practical without much filler.
Very helpfull tutorial, thanks!
Took some fiddling around myself to get it to fully work, but in the end it all came out great! 🙂
Great video on simple lighting, I like the chill pace. Keep up the good tutorials!
FINALLY I FOUND IT
I know this is an older video now, but I want to say how helpful this is. The only thing is the light doesn't want to shrink or grow / bob despite me fiddling with the code to try to get it to. Any idea why ?
How is the global._part_system defined at the beginning of the video so I can launch the game without it crashing for this not being referenced? Tried doing this during the bit where you first test the opaque black surface
it's in the global code file called "particles"
Thank you!
In my project i have the viewport X offset by -600 in the viewport properties so that it appears on the left side of the screen at all times. This is causing a black bar to appear on the right side of the screen. do you know what could be causing this?
I have done this but my game has no camera. The screen works fine but it condenses the window and doesnt go fully to all edges
It worked but my game has levels and when I go to the next room the surface still there , how I can fix that ?
great video once more. I wonder If it's possible to have the dark blue area in some sort of photoshop multiply effect over everything else.
you can: czcams.com/video/KqDe2JYxukA/video.html
still undecided if i like the way multiply looks for this though
@@DragoniteSpam thanks for the super fast answer. how do you think do other games solve night time (for example stardew valley)? When I use photoshop I can get a kinda good night time color multiply but in game maker it's tough. Also because I still don't fully understand surfaces. Always when I think "this must work like this" it doesn't :D.
Tankyou so much!
How do I delete the lighting effect after applied. In my game I want this effect to work for 1 room but every room after that becomes pitch black even though I don't have the object
you need to add the clean up event to the lighting object and write this code in the cleanup event
if (surface_exists(light_surface)) {surface_free(light_surface);}
@@Starbula not working for me
@@fireenderboy please be much more specific about your problem then that
@@Starbula surface_free never changes anything, when the object is deleted or I activate that from anywhere else, it doesn't do anything. All my other rooms are pitch black and nothing else.
@@fireenderboy alright what is the actual problem you are having
everything works fine but for some reason only instances in a certain layer can create "light"
Hola, funciona igual en gmk studio?
When I start up my game, the camera appears in the corner and doesn’t go full screen. A problem with viewports?
Probably
TOP!
Hi i cant seem to figure out why this doesnt work for me, ive got a camera obj that follows the player (just mentioning it incase its the cause, but i dont think it is)
I typed the code the exact same as you did, but the light is never centered on the torch, it seems to move based on the torch's position in the world, with the further left it is, the further left the light is. and when i make it follow the player too, the light is just fixed to the left of the head, rather than being centered.
My light cutouts origin is the center of the light, the torch's origin is the center of the flame, and the players origin is the center of the character
My game has levels and for the next one the effect needs to be turned off anyway on how to do that
Same
This is simple?
compared to most other lighting tricks, yeah
It is a great pity that it is GMS 2 and not GMS 1.4.
I gave up on GMS 2 because of the interface and the mess that reigns in the interface.
This works in all versions of GameMaker. You really shouldn't use a version that hasn't been supported in about 4 years though.
@@DragoniteSpam That's great. I really appreciate GM 1.4 for its simplicity and functionality. And it will stay that way ;) I have a nice day ;)