Blend modes are a quick and easy way to add stunning visual effects to your GameMaker projects. In this post we’ll take a look at some of the effects which can be produced using blend modes, explain how to use blend modes in your games, and provide resources for extended use of GameMaker blend modes.
Basic Blend Modes
There are four basic blend modes: normal, additive, subtractive, and max blending.
Normal blending is the default blend mode. Normal blending produces a standard effect when transparent sprites overlap.
Additive blending combines the luminosity values of overlapping light areas. This creates a unique effect. Additive blending can be used to create impressive lighting effects and more.
Subtractive blending subtracts the luminosity values of overlapping light area. Using subtractive blending, you can create a ‘fog of war’ effect as commonly seen in real-time strategy games.
Max blending is similar to additive blending, and is used less often than the other basic blend modes.
How To Use Blend Modes
Using the basic blend modes is simple. Each blend mode is represented by a constant value: bm_normal, bm_add, bm_subtract, and bm_max. Using the function draw_set_blend_mode() you can define which blend mode is active. Blend modes work in both desktop and mobile games, excluding non-WebGL HTML5 games.
Typically, you will set a blend mode, draw something, and then reset the blend mode to normal. To produce more refined effects, try using gradients. You can create gradients with graphics editing programs like Photoshop or Gimp.
It is very easy to change blend modes and create varied visual effects with minimal effort.
Extended Blend Modes
Extended blend modes allow you to refine the effect you want to produce. Extended blend modes can be difficult to understand and are outside of the scope of this article, however you can read a detailed explanation of extended blend modes here »
GameMaker user Phantom107 demonstrated how extended blend mode sources and destinations can be combined in a post on the GameMaker community forums.
GameMaker blend modes are powerful and easy to use. Try them out in your next project!
- [Post of the Month] End of an Era: GameMaker 1.X Sunset coming at end of July 2018
- [Made In GameMaker] PurpleBit Surfing Cow by Heavy Sheep Games
- [Indie Interview] Heavy Sheep Games with Luiz Gustavo
- [Made in GameMaker] GameDevDan vs Life Launches on Steam
- [Made in GameMaker] Bounce Rescue by Bitecore Studios