Your first game! Part 1: Moving Around

Posted on: March 1, 2015 at 5:42 pm,


The Player Sprite

The next thing we need is a sprite for the player’s spaceship! We’re just going to make something very quick and simple. So go ahead and make one. I’m going to name mine spr_player.

Click the “edit sprite” button to bring up the sprite editor, then simply click the little white sheet of paper icon in order to add a new frame to the sprite. As this is the first frame you’re adding GM will ask you what size the sprite should be. 32 x 32 pixels is the default, and is good enough for what we want, so just click ok.

Double click on your new empty animation frame to bring up the image editor. This is where you can actually draw your spaceship using simple paint-like image editing tools. It’s important based on the way GameMaker handles direction to draw your player spaceship initially facing to the right. This just makes things easier for us later. Obviously you can import your own images into GameMaker if you have artwork produced in other tools such as Photoshop, and GM also supports PNGs and alpha transparency, but for now just drawing ourselves a crude spaceship will do!

After finishing your masterpiece, go ahead and click the tick button to close the image editor and then do the same in the sprite editor to return you to the overview screen for the sprite. Once here you may notice a box in the bottom corner labelled “origin”. It’s very important that you click “center” (or just type in 16 for x and y) in order to properly center your spaceship.

Otherwise when our spaceship turns, it will turn around it’s top left corner instead of about it’s center as the below gif demonstrates:

Once you’ve made the sprite for our spaceship and centered the origin, it’s time to actually make a spaceship we can fly!

Pages: 1 2 3 4