informa
/
2 MIN READ
Featured Blog

GMTWEEKLY: Downwell-style Motion Trail

Game Maker Tutorial of the week! Today I discuss my first tutorial request: a Downwell-style motion trail.

[NOTE: This turtorial is content from my personal blog and may seem incomplete when taken out of context]

Requests

I am always accepting requests for these tutorial segments! Feel free to send me ideas if/when you have them! The first email that I received after tweeting about a tutorial series was in regards to a motion trail effect found in the recent Steam release, Downwell. It was the very first request that I had received AND I believe that it flows fairly easy from last week's blend mode example.


Subtractive Blending

The Downwell motion trail is pretty simple aside from the fact that the trail is both blended with a different color from the player sprite, as well as every other row of pixels becoming transparent.

There are numerous ways to accomplish this, but I feel that using subtractive blending (bm_subtract) is by far the simplest. You draw the motion trail images to a surface, then set the blend mode to subtract, then you draw a grid of white lines. Instead of actually drawing the white lines, this blend mode will instead erase (essentially) the overlapping pixels. This will leave every other row and/or column of pixels transparent.

From there you can just change image_blend or use other tinting methods to draw the surface using a color other than the player's color. In my example, I set image_blend to an every changing color by using make_color_hsv(hue, 255, 255) and manually increasing some hue variable each frame.

Result

I changed the example to erase horizontal lines instead of vertical. I also iterate through the vertical lines and arbitrarily erase a few of those to make it look a bit more chaotic.

However, it should be simple enough to look through the attached example and mess with the effect to get your own desired result.

GMTWeekly1.gmx.rar

Enjoy,
Z

Latest Jobs

IO Interactive

Hybrid (Malmö, Sweden)
3.02.23
Gameplay Director (Project Fantasy)

Arizona State University

Los Angeles, CA, USA
2.27.23
Assistant Professor of XR Technologies

IO Interactive

Hybrid (Copenhagen, Denmark)
3.02.23
Animation Tech Programmer

Purdue University

West Lafayette, IN, USA
3.02.23
Assistant Professor in Game Design and Development
More Jobs   

CONNECT WITH US

Explore the
Advertise with
Follow us

Game Developer Job Board

Game Developer

@gamedevdotcom

Explore the

Game Developer Job Board

Browse open positions across the game industry or recruit new talent for your studio

Browse
Advertise with

Game Developer

Engage game professionals and drive sales using an array of Game Developer media solutions to meet your objectives.

Learn More
Follow us

@gamedevdotcom

Follow us @gamedevdotcom to stay up-to-date with the latest news & insider information about events & more