GameMaker Tutorial - Manipulating Sprites in GML

3,814 views · Published 21 January 2014 · 4:52 · Indexed 1 October 2026

Channel: GravityShift Games · 2014 · Education

Watch on YouTube

Get Element Earth ▶ http://tinyurl.com/hgadglg
Support This Channel ▶ http://tinyurl.com/jetb43t

Follow me on Facebook ▶ http://tinyurl.com/opjtvq4
Follow me on Instagram ▶ https://instagram.com/jp_damstra
Follow me on Twitter ▶ https://twitter.com/SlasherXGAMES
Follow me on Google+ ▶ https://plus.google.com/+SlasherXGAMES

In this tutorial I'll show you how to manipulate sprites using the DRAW event and the useful function draw_sprite_ex(). This method will save on time and effort as little manipulations don't require one to directly recreate the sprite.

Here is a quick  reference for common sprite manipulations:
Rotation: Just set the rot argument to whatever rotation you desire. Remember, negative values rotate clockwise about the origin and positives anti-clockwise.
Transparency: Just set image_alpha  to whatever amount to a value beween 0 (fully transparent) to 1 (fully opaque).
Flip Left or Right: Just set image_xscale to negative.
Flip Up or Down: Just set image_yscale to negative.
Scale: Alter image_xscale and image_yscale. A value below 1 scales down the image while a value above 1 scales up.

▼ Useful Links and Resources ▼
GM 8 Project ▶ http://tinyurl.com/zctbwqd
GM Studio Project ▶ http://tinyurl.com/hwpwskj

▼ More ▼
General Game Maker Playlist ▶ http://tinyurl.com/omg4xxs
Game Maker Networking ▶ http://tinyurl.com/oauqu5y

Happy Coding :D

More from this channel