Neat Trick! (Inside)

Posted by fprefect111 on Oct. 5, 2008, 8:35 p.m.

I've worked out a little trick to give a surface an alpha layer, after trying my best to understand extended blend modes and checking out GearGod's metaball example.

Created a "light" system where they don't brighten up the contents, but bring them into color!

Of course, it requires you to draw the screen twice and with different backgrounds/sprites etc. so (although I'm not sure) the effect seems kinda expensive.

Still, pretty neat :D Also, reckon that background's style is OK? I'm not sure about it…

Comments

OBELISK 16 years, 2 months ago

At first I was hoping you found a way to do it without different backgrounds and sprites. Curses.

SquareWheel 16 years, 2 months ago

Okay, that's pretty damn cool.

fprefect111 16 years, 2 months ago

Yeah I'm sure there's some way to do it somehow but for now it's not too bad. The extra trouble's worth it though, at least because I want to base my next project around the effect :)

Juju 16 years, 2 months ago

All efficient graphical methods use a screen buffer, something that you can't access directly in GM. However, there is a solution. You can turn off automatic drawing and commit all graphics to a surface the size of the display. Then using that surface, you can apply graphical effects to your heart's content. This removes the need for so-called dual drawing. Expect an 80% increase in frame rates.