Background game maker




















Backgrounds are another form of image asset that you can use in GameMaker: Studio , and are split into two general categories: background images and tilesets. Background images are generally the large, static images that are used to form the back of a room, with all other things being drawn over them, although they can have other uses, while tilesets are background images that are "cut up" into smaller pieces and used to add low cost graphical images to a level.

For example, in a platform game you may have only one single floor object and then use a series of background tiles to hide them and give each an individual "look". The following global variables are built in to GameMaker: Studio and can be used to get information about a background asset as it is currently used within a room.

Most of these variables can be set as well as read and so can be used to change the way backgrounds are displayed within the room, but any changes that they make to the background are not permanent and will be reset if the player leaves and enters the room again, or the game is restarted unless the room is persistent. Either of those will cause the following window to open: As with all resources, you must give a name to your backgrounds for reference within GameMaker: Studio and so you can identify them easily, although you should note that the actual name itself is really just a variable which holds a number that "points" to the resource, in this case a background.

It's best to give each background a descriptive name so that you can identify at a glance whether a particular resource is a background or an object or anything else, and many people do this by prefixing or suffixing the resource with the letters "bck". Below the "Name" section are the buttons that enable you to load, save or edit a background image.

Once you have selected the file and the options, clicking the "Open" button will load the background into GameMaker: Studio ready to be used in your games. Editing the background can be done within GameMaker: Studio too, and we have a whole section in the Advanced Use part of the manual that deals with this here. Be careful with using large backgrounds, especially if your target device is HTML5 or one of the smaller mobile devices, as large backgrounds need more memory and this could be a problem later when you try to compile your game.

You should also be aware that backgrounds in GameMaker: Studio are designed to tile and this means they have overlapping pixels on either side, so if you see any strange artefacts transparent lines, extra pixels, etc. For editing backgrounds, GameMaker: Studio has its own included Image Editor which is quite powerful, although not as complete as many dedicated art packages available.

For information on how to use it, please see the section More About Sprites: Editing Subimages as there is exactly the same set of tools available for backgrounds as for sprites.



0コメント

  • 1000 / 1000