Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[Tutorial] PNG Alpha Channels (short but simple)

Because the makers of Game Maker were lazy, they didn't code alpha channels into the game editor. This means by default any images you use with alpha channels (opacity etc) will just show as normal images.

You can fix this by adding a controller object with (or adding into your controller object) the following event:

Event: CREATE
Execute code

sprite_replace_alpha(sprite_name,'original_image.png',1,true,true,0,0);


Make sure all images are kept in your game folder, and that if they are in subdirectories you include that in the file path.

Simples!
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top