The Dave's Game Maker Guide

The Dave's Game Maker Guide is a compilation of tutorials requested by Game Maker users. If you would like to submit a request, visit this thread at Starmen.net.

I. Get a Sprite Sheet
Find a sprite sheet before you start this tutorial! What is a sprite sheet you ask? A sprite sheet is usually a set of animations inside one non animated image. RPG Maker uses this type of setup and sprite rips are usually in this format as well. For this tutorial, I'll be using the sprite sheet shown below.
Sprite Sheet
Each frame in that animation is 16x24. The dimensions of a frame are good things to know when using sprite sheets - otherwise you'll have to guess and check.


II. Loading the Sheet
Now we step into Game Maker. I'll be using version 6.1 for my tutorials, so what your screen looks like may be different, but the steps should be the same. What we'll do first is add a new sprite by clicking the red pacman icon in the toolbar. You'll be presented with this screen:
Sprite Properties Window
Now click the Edit Sprite button under the name input box. When the next window appears, click File > Create from Strip. Select your sprite sheet from the dialog box that appears. When you select your image, you will be presented with this screen:
Loadin a Strip Image

III. Setup
As you can see, I've already filled out the information on the left. I'll run through each one and give a description.
  • Number of images: This is how many frames or images you want to take from the sheet. I typed 8 because there are 8 frames in this animation.
  • Images per row: In a larger sprite sheet, there may be multiple rows of images. This number tells Game Maker how many are in a row so it can loop down to the next one if it needs to. There are 8 images per row in my sheet.
  • Image width & height: These numbers represent the dimensions of each frame or image that you're selecting. Each frame of the animation in my sprite sheet is 16x24 pixels.
  • Horizontal cell offset: You would use this if you wanted to select some images or frames, but the ones you wanted were a few frames over from the left. I left this zero because I my frames started on the left, so I didn't need it.
  • Vertical cell offset: This is the same as the above, only it works vertically from the top.
  • Horizontal & vertical pixel offset: These are used if your images are offset from the top-left of your sprite sheet. Say the top-left of the first image in the sprite sheet was 10 pixels from the left and 23 from the top. Your values would be 10 and 23 respectively.
  • Horizontal & vertical seperation: These are used if there is space between each frame of your animation. I didn't use these because each frame of my animation put together takes up the entire sprite sheet. Had I changed the dimensions around to fit just the stickman then I would have used these settings, as well as the others I didn't.
You'll need to fill in these values yourself. The values will be different with each sprite sheet.

IV. Finishing Up

After you finish setting things up, click okay. You will then be taken back to the sprite animation window, and it should look something like this:
Finished Product
And there you have it! An animation from a single file. Beats copying an pasting, huh?

If you have an comments or questions, please let me know.
© 2008 David Arnold. Game Maker is a copyright of Mark Overmars and YoYoGames, Inc.