Jump to content


Photo

Simple? Light shading question.


  • Please log in to reply
3 replies to this topic

#1 snorgar

snorgar

    GMC Member

  • GMC Member
  • 291 posts
  • Version:Unknown

Posted 28 March 2016 - 06:54 PM

So what I want to do is add some lights/fake lights.

 

Simple put once a light is placed in an area it illuminates so far out. I do this by jus drawing a filter that shades over the whole area making the illusion of light where I am actully just making parts darker. My problem is adding more than 1 light. Since GM only lets you darken and not lighten areas I have to draw 8 other squares that are full dark around the one that has the ellipse imitating the light. Adding more than one light when these can collide with each other or even moving light say with a flash light become more difficult.

 

Can anyone give me an example of a way to make this work? Thank you.


  • 0

#2 cdrdub8

cdrdub8

    GMC Member

  • GMC Member
  • 518 posts
  • Version:GM:Studio

Posted 28 March 2016 - 10:19 PM

Are you using surfaces?

If not, do you know how to use them?

If not, I recommend you take a look at the gamemaker-included tutorial about surfaces, you might

find your answer just by following that tutorial.

 

If you know surfaces, then what you could do is have a surface drawn above everything, completly black.

And when you want a light, just "erase" a part of this black surface, letting the illusion that there is light

there.

 

Hope this helps ~

- Cdrdub8


  • 0

I am building awesomeness, wait for it!


#3 -A-

-A-

    GMC Member

  • GMC Member
  • 24 posts
  • Version:GM:Studio

Posted 28 March 2016 - 10:40 PM

Maybe this tutorial helps.


  • 0

#4 anomalous

anomalous

    GMC Member

  • GMC Member
  • 295 posts
  • Version:GM:Studio

Posted 28 March 2016 - 11:52 PM

Since GM only lets you darken and not lighten areas



 

 


  • 0