Sprites

Sprites are generally the visual representations of objects within the game you are creating, although they can be used for many other purposes. A sprite is either a single image, or a set of images that, when played one after another, looks like a looping animation. Sprites can be created in many formats, with the "traditional" sprite being made up of frames of pixel images, imported into GameMaker as *.png files. However you can also import vector sprites that have been saved in the *.swf format, or skeletal animation sprites that have been saved out as *.json files with accompanying *.atlas and *.png files (for more information on these types of image files and how to import them into GameMaker please see the section Importing Non-Bitmap Sprites).

Since sprites are an integral part of any game, GameMaker has a large number of functions and variables that can be used for getting information about specific sprites, or for changing those that are in your game, or even for loading custom sprites at runtime from a source image file. These functions and variables are all explained in the sections listed below: