Simple 2D Lighting - GameMaker Tutorial

Sdílet
Vložit
  • čas přidán 7. 09. 2024

Komentáře • 34

  • @AL-lh2ht
    @AL-lh2ht Před rokem +4

    Great video. Easy to understand and practical without much filler.

  • @Greeny_Official
    @Greeny_Official Před 9 měsíci +3

    Very helpfull tutorial, thanks!
    Took some fiddling around myself to get it to fully work, but in the end it all came out great! 🙂

  • @Weusneus
    @Weusneus Před 2 lety

    Great video on simple lighting, I like the chill pace. Keep up the good tutorials!

  • @TripleKenshi
    @TripleKenshi Před 10 měsíci +1

    FINALLY I FOUND IT

  • @__TV33__
    @__TV33__ Před 4 měsíci

    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 ?

  • @siennas254
    @siennas254 Před měsícem

    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

    • @DragoniteSpam
      @DragoniteSpam  Před měsícem +1

      it's in the global code file called "particles"

  • @tomgola3
    @tomgola3 Před 9 měsíci

    Thank you!

  • @cheesestack2587
    @cheesestack2587 Před 4 měsíci

    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?

  • @stilt2209
    @stilt2209 Před rokem

    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

  • @puresoulx
    @puresoulx Před 8 měsíci

    It worked but my game has levels and when I go to the next room the surface still there , how I can fix that ?

  • @nuclearbeeberman
    @nuclearbeeberman Před rokem

    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.

    • @DragoniteSpam
      @DragoniteSpam  Před rokem

      you can: czcams.com/video/KqDe2JYxukA/video.html
      still undecided if i like the way multiply looks for this though

    • @nuclearbeeberman
      @nuclearbeeberman Před rokem

      @@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.

  • @salvatorealiotta7221
    @salvatorealiotta7221 Před rokem

    Tankyou so much!

  • @ToasterCat0622
    @ToasterCat0622 Před 3 měsíci

    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

    • @Starbula
      @Starbula Před 2 měsíci

      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);}

    • @fireenderboy
      @fireenderboy Před měsícem

      @@Starbula not working for me

    • @Starbula
      @Starbula Před měsícem

      @@fireenderboy please be much more specific about your problem then that

    • @fireenderboy
      @fireenderboy Před měsícem

      @@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.

    • @Starbula
      @Starbula Před měsícem

      @@fireenderboy alright what is the actual problem you are having

  • @carlacastrodasilvasantana6960

    everything works fine but for some reason only instances in a certain layer can create "light"

  • @hanspuhenshaimers6223
    @hanspuhenshaimers6223 Před 2 lety +1

    Hola, funciona igual en gmk studio?

  • @happy_cris95068
    @happy_cris95068 Před 2 lety

    When I start up my game, the camera appears in the corner and doesn’t go full screen. A problem with viewports?

  • @fierorecensione5828
    @fierorecensione5828 Před 8 měsíci

    TOP!

  • @ciaranseymour31
    @ciaranseymour31 Před 9 měsíci +1

    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

  • @stilt2209
    @stilt2209 Před rokem

    My game has levels and for the next one the effect needs to be turned off anyway on how to do that

  • @JordanPost-zd6eb
    @JordanPost-zd6eb Před 4 měsíci

    This is simple?

    • @DragoniteSpam
      @DragoniteSpam  Před 4 měsíci

      compared to most other lighting tricks, yeah

  • @PaffcioStudio
    @PaffcioStudio Před 2 lety

    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.

    • @DragoniteSpam
      @DragoniteSpam  Před 2 lety +2

      This works in all versions of GameMaker. You really shouldn't use a version that hasn't been supported in about 4 years though.

    • @PaffcioStudio
      @PaffcioStudio Před 2 lety

      @@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 ;)