Home | Customize | Blog | Extras | Log In | Info
Manual | D&D icons | GML Parser | Archive | Iso City
Username: Password:  
About | Features | Directory | Banners | Contact

Designing Games with Game Maker
Designing Games with Game Maker

Defining sprites

Sprites are the visual representations of all the objects in the game. A sprite is either a single image, drawn with any drawing program you like, or a set of images that, when played one after another, looks like an animated motion. For example, the following four images form a sprite for a Pacman moving to the right.

/library/manual/images/sprites1.gif

When you make a game you normally start by collecting a set of nice sprites for the objects in your game. Many collections of interesting sprites can be found on the Game Maker website. Other sprites can be found on the web, normally in the form of animated gif files.

To create a sprite, choose the item Create Sprite from the Resources menu, or use the corresponding button on the toolbar. The following form will pop up.

/library/manual/images/form_sprite.jpg

At the top you can indicate the name of the sprite. All sprites (and all other resources) have a name. it's best to give each sprite a descriptive name. Make sure all resources get different names. Even though this is not strictly required, you are strongly advised to use only letters and digits and the underscore symbol (_) in a name of a sprite (and any other resource) and to let it start with a letter. In particular don't use the space character. This will become important once you start using code.

To load a sprite, click on the button Load Sprite. A standard file dialog opens in which you can choose the sprite. Game Maker can load many different graphics files. When you load an animated gif, the different subimages form the sprite images. Once the sprite is loaded the first subimage is shown on the right. When there are multiple sub- images, you can cycle through them using the arrow buttons.

The checkbox labeled Transparent indicates whether the rectangular background of the sprite image should be considered as being transparent. Most sprites are transparent. The background is determined by the color of the leftmost bottommost pixel of the image. So make sure that no pixel of the actual image has this color. (Note that gif files often define their own transparency color. This color is not used in Game Maker.)

With the button Edit Sprite you can edit the sprite, or even create a completely new sprite.

Search Search


Alternative versions Alternative versions

You can also read this manual on one single long page (± 1.5 mb)

Also available in: Dutch French German

ZIP Download helpfile

Advertisement Advertisement

Game Maker Manual