Studio › Manual › Sprites and images

Importing pictures as a sprite

File > Import Sprite… (⌃⇧⌘I), Sprite from Image… in the New Asset sheet (⌘N) and in the sidebar's Create ▸ menu, or drop picture files on the Project list (on a folder to put the sprite in it) or on the window. Choose one or more pictures, or a sprite sheet's JSON.

  • Formats: PNG, JPG, GIF (every frame of an animated GIF, with its frame times), BMP and TIFF. Studio reads the file's content, so a wrongly named file still works, and a file it can't read says why.
  • Several files make one sprite with one frame per file, in natural order (walk_2 before walk_10).
  • Strips: a file named like player_run_strip8.png is cut into 8 frames side by side, as GameMaker's own import does.
  • Size: the sprite takes the pictures' size. When they differ it takes the largest and centres each smaller frame (or scales it to fit: Sizes), and the sheet says so.
  • Name: from the file's name (the _strip8 and frame numbers left off), made a valid GameMaker name (letters, digits and _, a letter first) and unique (hero_2 when hero is taken). Type another in Name; a name that can't be used says why.
  • Origin: the one most of the project's sprites use, else Middle Centre. Mask: automatic (the box round every frame's pixels). Texture group: Default.
  • Frame times: GameMaker plays every frame of a sprite for the same time. When a GIF's or sheet data's times differ, frames that show longer are repeated so the timing stays (turn off Keep frame times to use the average speed instead).

Import writes the sprite as GameMaker writes one (its .yy, each frame's picture and layer picture, the sequence keys, the folder and the project's list), so the project still opens in GameMaker; the sprite is selected and opened, and Edit > Undo takes it out, files and all.

A skeleton's JSON chosen or dropped here goes to Import Skeleton (see bones-import-skeleton) instead.

Keys are shown as on the Mac: ⌘ Command, ⌥ Option, ⌃ Control, ⇧ Shift. Studio for Windows shows its own keys beside each menu item.