Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1075932 Posts in 44152 Topics- by 36119 Members - Latest Member: Royalhandstudios

December 29, 2014, 04:14:09 PM
TIGSource ForumsDeveloperTechnical (Moderators: Glaiel-Gamer, ThemsAllTook)Dark levels in spelunky
Pages: [1]
Print
Author Topic: Dark levels in spelunky  (Read 390 times)
Noogai03
Level 6
*


WHOOPWHOOPWHOOPWHOOP


View Profile WWW Email
« on: December 11, 2012, 11:04:23 AM »

Anyone have any idea how the dark levels in Spelunky (never played the XBLA one, so the original) work (flares, etc)? (This doesn't have to be Game Maker specific) I had a look at the source code, and I couldn't find anything to do with dark levels...  Embarrassed

More to the point, if anyone knows any other way of doing 2D platform game shadows...  Smiley
Logged

So long and thanks for all the pi
Evan Balster
Level 10
*****


I live in this head.


View Profile WWW Email
« Reply #1 on: December 11, 2012, 11:21:00 AM »

Have a surface whose color is white in fully lit places and darker (perhaps a bit bluish too) in shadows.  This surface should match up with whatever view is being used.  (don't make it as big as the level!)  Draw this over the screen with multiplicative blending and it will darken things.

I believe you can set a multiplicative blend mode like so:
Code:
draw_set_blend_mode_ext(bm_dest_color, bm_zero);

Just be sure to set it back to normal after drawing your surface.
Logged

Creativity births expression.  Curiosity births exploration.
Our work is as soil to these seeds; our art is what grows from them...


Wreath, SoundSelf, Infinite Blank, Cave Story+, <plaid/audio>
Noogai03
Level 6
*


WHOOPWHOOPWHOOPWHOOP


View Profile WWW Email
« Reply #2 on: December 11, 2012, 12:29:41 PM »

Right, thanks. That makes sense.
Logged

So long and thanks for all the pi
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic