This section deals with all those functions related to the games assets.
In Game Maker: Studio you can define various types of game assets (or resources), like sprites, sounds, fonts and backgrounds and each asset type has its own selection of codes for modifying them, using them and moving them during your game. Many even have functions that permit you to load and save these resources into your game while it is running, but be warned though - Changing resources easily leads to serious errors in your games! As such it is a good idea to follow the following rules when changing resources:
If you have changed an included asset of your game (for example, you have replaced a sprite with a loaded image), when you restart the game using the game restart function, the changed assets are NOT restored to their original shape. In general, when you manipulate included assets you can no longer use the action or function to restart the game.
Changing assets from a file can be a relatively slow process, so try not to use it mid game, but rather save it for moments in which any possible pause will not interrupt the game-play.
Make sure you delete the created assets you no longer need, otherwise you can end up with a memory leak which will slow down and eventually crash your game
In general, you should try not to change any resources during game play, and it is better create and change the resources at the beginning of the game or even at the beginning of a room.
Information on resources can be found in the following pages:
There are two extra functions related to the handling game assets. These functions can be used to find the unique index value for any given asset and the type of asset that it is, which opens the door to dynamically creating game assets from strings .