I Wanna Community
News:
I Wanna Community
»
Fangames
»
Game Design
»
Programming Questions
»
Spotlight Effects From Kill The Guy?
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Spotlight Effects From Kill The Guy? (Read 2114 times)
Realtime911
Wannabe
Posts: 44
Deep Inside The Darkness,There Is One Truth Folded
OS:
Windows 10
Browser:
Chrome 49.0.2623.110
Playstyle: Keyboard
Spotlight Effects From Kill The Guy?
«
on:
April 06, 2016, 03:57:29 AM »
How do I make the spotlight effect like in kill the guy, it seems very flexible. Up until now, I use sprite as an spotlight effect, but that doesn't help me if there's two or more light sources
Any help is appreciated!
Logged
The world will once be inverted, from the colorful world into the Monochrome world, the only color is white and black, you'll never see any color, except the 255 sub color they have.
And you'll be keep falling and falling and falling.
Until you reach the end of the world, a place where darkness is.
L4Vo5
Cherry Eater
Posts: 59
OS:
Windows 7/Server 2008 R2
Browser:
Chrome 49.0.2623.110
Playstyle: Keyboard
Re: Spotlight Effects From Kill The Guy?
«
Reply #1 on:
April 06, 2016, 10:06:26 AM »
I tought about making a surface where everything is black (with low alpha if you want) and somehow making whole sections (the sections where the light would be on) be removed, but i don't know if you can really remove sections like that (maybe with shaders?)
Logged
I have to admit, i still haven't beaten IWBTG
WetWookie
Cherry Eater
Posts: 90
OS:
Windows 7/Server 2008 R2
Browser:
Firefox 45.0
Playstyle: Keyboard
Re: Spotlight Effects From Kill The Guy?
«
Reply #2 on:
April 06, 2016, 11:14:25 AM »
You're just about right. You create a surface and draw a black rectangle. The alpha you use when drawing the rectangle determines how dark it is where there is no light. Alpha of 1 is pitch black. Alpha of 7 is gloomy but visible. You then set the draw mode to subtract
draw_set_blend_mode(bm_subtract);
and draw your 'light' sprites at the location of all your light sources which removes the blackness of the rectangle you drew earlier. Set draw mode back to normal and draw your surface.
Logged
lawatson
The Kid
Posts: 331
I do things and I make things.
OS:
Windows 7/Server 2008 R2
Browser:
Chrome 49.0.2623.110
Playstyle: Keyboard
Re: Spotlight Effects From Kill The Guy?
«
Reply #3 on:
April 06, 2016, 02:42:35 PM »
Just be wary that bm_subtract likes to be a bitch with certain effects, so things like draw_set_blend_mode_ext(bm_dest_alpha,bm_inv_src_alpha) might work better assuming you have surface code which would work with it correctly.
Logged
(click to show/hide)
smoke weed everyday
Realtime911
Wannabe
Posts: 44
Deep Inside The Darkness,There Is One Truth Folded
OS:
Windows 10
Browser:
Chrome 49.0.2623.110
Playstyle: Keyboard
Re: Spotlight Effects From Kill The Guy?
«
Reply #4 on:
April 06, 2016, 07:49:07 PM »
ah, I'm sorry but I'm still new to these draw codes so I'm still a bit confused, can you make an example for it?
Logged
The world will once be inverted, from the colorful world into the Monochrome world, the only color is white and black, you'll never see any color, except the 255 sub color they have.
And you'll be keep falling and falling and falling.
Until you reach the end of the world, a place where darkness is.
chalenged
Wannabe
Posts: 1
I play games and have fun.
OS:
Windows 7/Server 2008 R2
Browser:
Chrome 49.0.2623.110
Playstyle: Keyboard
Re: Spotlight Effects From Kill The Guy?
«
Reply #5 on:
April 07, 2016, 08:58:02 PM »
Here's a nice example for Studio:
https://zackbellgames.com/2015/01/19/simple-lighting-surfaces/
Logged
Realtime911
Wannabe
Posts: 44
Deep Inside The Darkness,There Is One Truth Folded
OS:
Windows 10
Browser:
Chrome 49.0.2623.110
Playstyle: Keyboard
Re: Spotlight Effects From Kill The Guy?
«
Reply #6 on:
April 09, 2016, 06:57:25 PM »
Aah yes, it's working!. Thanks everybody, I appreciate it!
Logged
The world will once be inverted, from the colorful world into the Monochrome world, the only color is white and black, you'll never see any color, except the 255 sub color they have.
And you'll be keep falling and falling and falling.
Until you reach the end of the world, a place where darkness is.
Print
Pages: [
1
]
Go Up
« previous
next »
I Wanna Community
»
Fangames
»
Game Design
»
Programming Questions
»
Spotlight Effects From Kill The Guy?