| Level Design / Level Background Design / Standard Backgrounds
| A standard level background does not incorporate tiles. Instead, it consists of a single image encompassing the entire level, and a series of one or more parallax layers, which are displayed when Parallax Scrolling is enabled in the game's preferences. Since the player may have parallax scrolling enabled or disabled, it is important to implement both of these standard background elements.
Non-Parallax Backgrounds | When Parallax Scrolling is disabled in the game's preferences, non-parallax backgrounds are visible in levels that do not use tiled backgrounds. Both parallax background images and non-parallax background images must be created in an image editing application such as Photoshop and then later imported into Power Game Factory. A non-parallax background image must be at least 768 pixels in width by 448 pixels in height (the minimum allowable level size.) Since the width and the height of a level must be multiples of 64 pixels, the dimensions of non-parallax background images should also be multiples of 64. First, the completed background image should be saved to the desktop in a non-lossy file format, preferably TIFF or PSD. The file's name does not matter. Before the background can be imported, the Levels Window must be in Normal Mode (command-Y.) Make sure that no objects in the level are selected. The Properties floating window should be visible (command-0.) Ensure that the Background Type is set to Standard in the Properties floating window. Uncheck the Show Parallax Layers option in the Level menu (command-P). Now the background image can be imported into Power Game Factory. Make sure that the icon of the background image is visible on the desktop, and drag it into the Background well in the Properties floating window, as shown below. Power Game Factory must remain the active application while the image is being dragged, because if the Finder becomes active, the Properties floating window will temporarily disappear. Another way to add a background image is to control-click on the Background well and choose Select New Image... from the contextual menu that appears, as shown below. Then select an image file from the Open dialog box. Whenever a non-parallax background image is added to a level, the level is automatically resized to the dimensions of the image (rounded down to the nearest multiple of 64 pixels.) The level's size may then be readjusted in the Properties floating window, but a level can never be larger than its non-parallax background image. If a level's size has been reduced, it can be reset to the size of the non-parallax background image through the use of the contextual menu shown above.
Parallax Background Layers | Like the non-parallax background, parallax backgrounds must be created in an image editing application and imported into Power Game Factory. The opacity of each background layer is determined by an associated grayscale mask image. Normally every layer except for the one furthest in the background may contain at least some transparent areas, which allow more distant layers to show through. As with non-parallax backgrounds, parallax backgrounds can only be assigned to a level if the Levels Window is in Normal Mode (command-Y.) The Properties floating window should be visible (command-0), and no level objects should be selected. Ensure that the Background Type is set to Standard in the Properties floating window. Also, check the Show Parallax Layers option in the Level menu (command-P). The Properties floating window will expand to display a list of parallax layers and controls for editing layer properties.
Adding New Parallax Layers | To add a new parallax background layer, click the New Layer button in the Properties floating window. The new layer will contain a generic image that can be replaced by dragging a new image into the Selected Parallax Layer Image list box. There is no limit to the number of parallax background layers that may be created, but for performance reasons their number should be kept to a minimum.
Deleting Parallax Layers | A parallax layer may be deleted by selecting it in the Parallax Layers list box and clicking the Delete Layer button. There must be at least one parallax layer at all times.
Assigning Images to Parallax Background Layers | To assign an image to an existing parallax layer, first select the layer in the Parallax Layers list box as shown below. The selected layer's image and mask will appear in the wells below the list box. Make sure that the icon of the new parallax background image is visible on the desktop, and drag it into the Background well in the Properties floating window, as shown below. Do the same for the mask image. Parallax layers may also be imported into Power Game Factory through the use of a contextual menu in the Selected Parallax Layer Image well. Control-click on the well and choose Select New Image... from the contextual menu that appears, as shown below. Then select an image file from the Open dialog box.
Setting Parallax Layer Properties | The location of a parallax layer can be changed by dragging it in the Levels Window while holding the Command key. Note that unlike other objects, parallax layers can only be dragged when the Command key is down. (This makes it easier to select and manipulate characters, scenery, and other foreground objects while leaving backgrounds unaffected.) The location of a parallax layer, in addition to its scrolling speed and display order, can all be changed through the use of the fields at the bottom of the Properties floating window, shown above. The contents of the X and Y location fields determine a layer's placement relative to the top left corner of the level in which it appears. Since a parallax layer may scroll at a nonstandard speed, however, its X and Y location are subject to change as level scrolls. The Layer Scrolling Speed field is used to enter the speed at which a parallax layer scrolls relative to the speed at which the level itself scrolls. The layer depicting the terrain over which the player traverses (which is called the main layer) should have a Layer Scrolling Speed of 1.0. Background layers should have somewhat lower Layer Scrolling Speeds. (If a layer is assigned a Layer Scrolling Speed of 0, it will not move at all.) Conversely, a parallax layer with a Layer Scrolling Speed greater than 1.0 will scroll more quickly than the main layer. The Layer Display Order field is used to determine which layers overlap other layers. Layers with higher Layer Scrolling Speeds should always be assigned higher Layer Display Order values than layers with lower Layer Scrolling Speeds. If this value is greater than 600, the background layer will overlap the player. Although a parallax layer with a sufficiently high Display Order will overlap particular objects in a game level, the Levels Window always displays the parallax layers behind these objects. This makes it easier to locate and manipulate small level objects.
Animated Parallax Background Layers | Much like scenery, parallax background layers may be animated. When a background layer is animated, its animation sequence is set to that of a particular animated scenery type. To animate a parallax background layer, check the Parallax Layer is Animated checkbox, which is found in the middle section of the Level Properties Window. When this box is checked, the Parallax Layer Image wells are replaced with a pop-up menu containing the names of each animated scenery type, as shown below. Selecting an animated scenery type from this list assigns that scenery's animation sequence to the background layer. The frame rate of the parallax layer's animation sequence is equivalent to that of the associated animated scenery type. To modify the selection of available animation sequences, click the Edit button to the right of the pop-up menu.
Parallax Background Design Techniques | When designed successfully, Parallax layers can work together to add a sense of depth to the level's background. A layer can be made to recede visually through the use of desaturated colors or smaller visual elements. Likewise, a layer can be made to appear closer to the viewer by using stronger colors and a larger scale. Unlike non-parallax background layers, parallax layers do not need to be as large as the level itself. Layers that scroll at a speed of less than 1.0 in particular need not be very large at all; a parallax layer that scrolls at a speed of 0.5 needs to be only slightly more than half as wide as the level itself to remain visible under all conditions. Similarly, a parallax layer that scrolls at a speed of 0.0 needs only to be as large as the game screen itself, since the layer will never scroll far enough to leave the screen. Very small layers can be used to achieve interesting effects. For example, a small layer sandwiched between two large layers could move at a speed greater than that of the more distant layer but less than that of the foremost layer. In the level pictured below, the water tower is a small layer that scrolls at a speed of 0.6. The buildings in the front scroll at a speed of 1.0, and the mountains in the back scroll at a speed of 0.1. To sustain the illusion of depth, more than one layer should be visible at any given time. Avoid creating areas where the only visible layers scroll at speeds of less than 1.0, since this would remove the points of reference that the player needs to gauge his location and speed. The use of parallax background layers consumes a lot of video memory and may reduce game performance. For information on streamlining a game through the strategic use of parallax layers, see the Limiting Parallax Layer Quantities part of the Optimizing Game Performance section.