Contents Up Previous Next

Advanced room features

This section describes slightly more advanced things you can do with the rooms.

Character scaling
Scrolling
Importing a file as the walkable area mask
Animating background scenes
Lighting effects
Exact palette import


Character scaling

AGS supports scaling of characters, where the character can appear to get smaller as he walks away from the screen. Character scaling is supported as part of the walkable areas in a room.

The reason why you have multiple colours available for the walkable areas is because you can set a zoom level for each colour, which defines how large the character will be while he is in that area. The default for all walkable areas is 100%, ie. full size. However, you can adjust it using the "Walkable Areas" mode to anywhere from 10% (one-tenth size) to 200% (double size).

The scaling settings can effect all characters and objects in the game. For characters, it is on by default but you can disable the scaling for an individual character by checking the "ignore room area scaling" box in that character's properties. For objects, it is off by default but you can make a specific object obey scaling levels by checking its "Use walkable area scaling" box in the editor.

If you check the "Use continuous scaling" box, then rather than just specifying a zoom level for the whole walkable area, you specify a min and max zoom level. These specify the scaling at the top and bottom of the walkable area. When the game is run, AGS will interpolate these values to make the character smoothly scale down from one value to another as he walks towards the back or front of the screen.


Scrolling

If you've been wondering, I'll tell you now: Yes, you can create scrolling rooms, like the ones used in Lucasarts games like Monkey Island (tm) and Day of the Tentacle.

To create a scrolling room, just import a scene that is larger than 320x200. For example, 500x200 is a good size for Lucasarts-type rooms. When you import the scene, a message box will appear asking you what resolution the picture is drawn for - this is because the picture could either be a scrolling room at 320x200, or a single non-scrolling screen at 640x400. So, with a 500x200 room you would click the "320x200" option.

That's all you have to do. Draw on the walkable areas, hotspots and so on, as normal, and then save the room. The screen will follow the main character around.

TIP: You can also have scrolling hi-res rooms. Just import a scene which is larger than 640x400.


Importing a file as the walkable area mask

AGS has the ability to import an external BMP or PCX file to use as the walkable-area, hotspot or walk-behind area mask. If you don't like the way you have to draw these in the editor itself, you can draw them in another program and then import them. This is also useful if you are converting a game you were making with another game-creation system into AGS.

To use the feature, click the "Import Mask" button in the relevant mode of the Areas editor. There are some restrictions to how this file must be drawn: it must be the exact same size as the background scene, and it must be in 16-colour (4-bit) or 256-colour (8-bit). Then, colour 0 on the bitmap signifies transparency and colours 1-15 are used as the respective hotspot/walk-behind/walkable area numbers.

NOTE: For hotspots and walkable areas, the mask must be the same size as the background, but at 320x200 resolution. So, if you had a normal sized 640x400 room, the mask should be 320x200. For walk-behind areas, the mask is the exact same size as the background image.

IMPORTANT: Do NOT use any colour numbers above 15 on the mask bitmap. Use only palette indexes 0 to 15.


Animating background scenes

If you want to have a lot of animation on the screen, you will come across two problems if you try to do it using objects: The solution to these problems is to use an animating background scene.

How it works is this: Each room can have from 1 to 5 backgrounds. Normally, each room just has one background. However, you can import up to four extra backgrounds in each room, and if you do so then the game will cycle through them, giving the effect of animation.

This gives two main advantages - you can animate the entire screen, and due to the way the engine works, it doesn't slow down the game at all.

To import a second background for a room, load the room into the editor, then go to the Room Settings pane, and click the "Animating Backgrounds" button. A screen appears, which lists the current backgrounds for the room. To import a new background, click "New frame". To delete a background, click the "Delete" button on the relevant row. That's all there is to it. To leave the background editor, click OK.

You can adjust the speed of the animation by changing the "Animation delay" textbox. Smaller number means faster animation, and the default is 5.

NOTE: All the background scenes must be the same size.

NOTE: (256-colour only) The backgrounds frames each have their own palette (unless you select "Share palette with main background" before importing). This means that when the current frame switches in-game, the palette will get reset - therefore you can't use special palette effects such as CyclePalette or SetPalRGB on screens with animating backgrounds.


Lighting effects

You can control the brightness of your characters, courtesy of the "Light levels" option in the Region settings (under Areas in the editor).

By default this is 100%, but you can change it from 0% to 200%. This number is the light level in the current walkable area. Smaller numbers are darker, so that 0% is pitch black and 200% is very bright.

This feature could be useful if, for example, you have a street lamp on your scene so when the character walks under it they get brighter, or if a wall is shading the character from the light they can get darker.

You can alternatively use a colour tint for the region. If you select this, then you can enter Red, Green and Blue values as numbers from 0-255, which reflect the colour you want the area to be tinted to. The Amount setting determines to what extent characters will be tinted, and is from 0-100.

NOTE: Light levels only work when the character's graphic is at the same colour depth as the background (ie. a 256-colour character in a hi-colour game won't get lightened).

NOTE: In a 256-colour game, only darkening areas (light level < 100%) will work. Also, depending on the room palette the quality of the darkening will vary in 256-colour games.

NOTE: Light levels affect characters and objects (depending on the individual character "Ignore room area lighting" and object "Use region tints and lighting" settings). They do not affect overlays or the background scene.


Exact palette import

If you have drawn a 256-colour background scene which you want to do palette effects with (for example using the CyclePalette script function), you may find that the editor remaps the colours to different slots making it difficult to do these effects.

To counteract this, AGS now has an "Exact pal import" feature, which will simply take the palette slots as they are from the source image and replace the corresponding background slots with them in the room. This means that your colours will be in the exact slots that you put them in, but you must make sure that the scene only uses the palette slots that you have allocated to the background in the Palette editor.

To import a background using Exact Pal Import, just choose the "Import background (exact pal)" option instead of the normal Import Background option.