.oO  |  List directory  |  History  |  Similar  |  Print version
Projects 
   ScummC 
   php edna 
   nixshare 
   concede 
   Orewar 
   AEval 
Portable Coding 
   Shell scripts 
   Standard C 
Random stuff 
   Slackware and UTF-8 
   Bit tricks 
Wiki 
   Links 
   Impressum 

Projects > ScummC > Howto make a room

 
rw-rw-r--   albeu   scummc
Table of contents:

Howto make a room

1. The graphics

Any tool can be used to generate the graphic resouces. All you need is some BMP files in paletteized (indexed) format. However, the following supposes that you are using the GIMP.

The GIMP is sadly pretty deficient in regard to indexed images. So it's recommended to draw everything in RGB mode, and then convert and export to indexed BMP.

1.1 The background

This is the simplest: just draw some stuff. However, if your room will need several Z planes (i.e., there are things that should be in front of the actors) then it might be a good idea to draw them on separate layers.

1.2 The objects

In SCUMM all objects are by default in state 0 and display nothing. With a door, for example, the background image will show the closed door. You need to create a picture that will be put on top of the background, showing the opened door. Again, the simplest way to do this is to use layers.

1.3 The Z planes

Z planes allow actors to be behind parts of the background or objects. For this you need to create a mask; a simple black and white layer will do the trick. If the different parts of the background are already split into layers then you can just duplicate it, fill the parts that should be hidden with some color, and clear the rest.

Note that despite their name, Z planes don't "stack up". Actors are only hidden by a single Z plane at a time. If you need an actor to be hidden by more than one layer of objects at a time, make a mask combining all of them. For example, if you have a tree behind a fence, you might make one mask with just the shape of the fence (for when the actor is standing in front of the tree), and another with the combined shapes of the fence and the tree together (for when he's behind the tree).

1.4 Exporting from the GIMP

Now you have a nice RGB image with a lot of layers. The first step is to convert the image to indexed format. This will create the base for the room palette. Choose a palette size of about 200 to leave some room for the actors, etc. Import the palette into the GIMP (Color palette dialog -> Edit -> Import) then merge the newly created palette with your actor palette. Now load the RGB version again and convert it using the merged palette. Make sure to uncheck the "Remove unused colors from final palette" button. Finally, split the layers into files: one for the background, one for each Z plane, and one for each object. Save these as BMP. The Z planes must be converted to 2 color bitmaps first, however.

2. The boxes

This part is easier. Basicaly you need to define where the actors can walk. Fire up the box editor:

 $ boxedit -img back.bmp

This will directly load your background BMP. The user interface is quite specific; see the README for more details. When putting the boxes around, remember that boxes can only be connected with vertical or horizontal sides. Each box also defines the scaling and Z plane to use for actors inside it. They should therefore be split according to Z planes and perspective, so depending on your room complexity, it might not be trivial.

2.1 Doors

To make a door, or any other path that should exist but be disabled (off-limits) by default, check the "Invisible" box. Your scripts will be able to change the box flags later to open the door, etc. You must name all boxes that you intend to reference from the scripts.

2.2 Scaling

Actor scaling comes in two forms: a fixed value, or a linear function of the actor's Y position in the room (a.k.a. a scaling slot). Each room can only have up to 4 scaling slots. Sadly, there is no preview in the box editor currently, a much wanted feature.

3. The voices

You just need to record the samples you want. However, you must use a specific outdated format: Creative voice file -- a.k.a. VOC. The samples must be in 8-bit unsigned mono at 22 or 11 kHz. Anything else won't do.

4. The script

The script binds everything together. Look at the examples and other documents on this wiki, starting with ScummC Grammar.



Reference http://alban.dotsec.net/Projects/HowtoMakeARoom

Comments: 0 New comment

Prev. ScummC Screenshots   ScummC Grammar Next