Building ExploreNet Worlds
Lesson 4

Dinosaur Eggs and other Props

J. Michael Moshell, Charles E. Hughes,
Mark Kilby, Joel Rosenthal
Copyright (c) 1996 - All Rights Reserved
University of Central Florida
Document Lesson4.CS96.6
6 March 1996

Today, you'll learn how to make props - objects that you can pick up, move around, and put into the ExploreNet scenes. We'll also begin working on dino behaviors.

IDEAS: To describe the props in a scene, you need two kinds of files:-
"bit map" files (with name extensions .bmp), just like characters have; and-
"prop" files (with extension .prp) for each scene that has props in it.

The bit-map files are stored in the OBJECTS directory, along with the characters you studied in the last lesson. The prop files are stored in the SCENES directory, along with the scenes they start out in.

OUTCOMES: At the end of this lesson, you will have created a collection of eggs for your dino, and a prop file to install some of your eggs in your world. You will also experiment with the behavior of the Arrow, and maybe use its behavior as a starting point for a new dinosaur behavior.


WHAT YOU NEED: Dino4.wld. Copy it from your WORLDMAS folder if necessary.
Read the instructions, then do each instruction.

PART1: Props and Prop Files

Step 1: Draw some Dino Eggs

Your species of dinosaur will need to be able to hide its eggs. Are they going to be disguised as rocks - grey and lumpy? Will they be green, to blend into the bushes? Will they be sand-colored, and buried in a beach? Or will they just look like chicken eggs?

For props, it is important that you draw them with the right kind of background and size.

If you're using Paint Shop Pro (PSP):

Go to the FILE menu of Paint Shop Pro and select NEW.
Set your new drawing's size to 60 x 60.

Use the magnifying glass to double its size.

Use the COLOR menu; LOAD PALETTE. Go to EXPLORE.NET/WORLDMAS and load up the 'xnet.pal' palette.

In the SELECT menu bar, double click on the foreground color square (it's the one on the top.) This opens up the palette. The black color in the upper left corner is the Official Background Black color to use for the background.

Select the background black color; close the palette window with OK, and use the paint can to pour a solid black background for your egg-making.

Use the marker pen, with a round brush of size 7 or 8, to make eggs. Draw them with a border so that you can see them when they're in a group.

HINT: Select the background square (the one underneath the foreground square) and double click it, and set its color to Official Background Black. This color will be transparent when we load the eggs in as a prop. Now, your right mouse button paints in background color - that is, it's an eraser! And the left mouse button paints in the foreground color.

Draw a group of six to ten eggs. Make them smaller than a dinosaur, but not too much smaller (or they'll be hard to pick up.) Then save the drawing, naming it EGGS1.BMP. To do this, open Paint Shop Pro's FILE menu and select SAVE AS.

Make sure you select FILE SUB-FORMAT as WINDOWS RGB ENCODED. Otherwise ExploreNet cannot read the file!

Save it in EXPLORE.NET\UNIVERSE\DINO4\OBJECTS.
Step 2: Hook the eggs into your World.

Each scene in a world that has props, must have a "prop file". This is a list of the stuff in that scene. We're going to put our eggs into the scene in the dinosaur world, which is called Prairie.

Use the File Manager to locate the file named EXPLORE.NET\UNIVERSE\DINO4\SCENES\PRAIRIE.PRP. Try double clicking on it.

If double-click doesn't open up the NotePad or WordPad editor, then you need to "associate". In Win95's Explorer, you do this by opening VIEW, then OPTIONS, then File Types.

Press the New Types button, then type "Prop file" for the description, and .prp for the associated extension. Click on New; the Action is OPEN and the Application is WordPad. Then click OK several times to get rid of all the windows.

From now on, any file with the extension ".prp" will always open WordPad. If you're using Win 3.11 or Windows for Workgroups, ask your teacher how to Associate an application like NotePad with the files having the .prp extension.

Back to Prairie.prp. In this file is a prop called "kettle". We're going to change that kettle into a batch of eggs. The numbers beside "kettle" have this meaning:

1 - It has only one "pose" or shape. Thus, it can't be animated.

775 - It is located 775 units from the left side of the screen (the whole screen is 1000 units wide.) This is called the X Coordinate.

750 - It is located 750 units down from the top of the screen; this is called the Y Coordinate.

Change the word "kettle" to the word "eggs".

(Why did we name our eggs-picture, "EGGS1.BMP"?)

(The '1' means that this is the first (and only) pose for the eggs. And the .BMP means that it's a "bit-map" - that is, the kind of picture ExploreNet understands.)

SAVE the file. Now - DON'T exit from WordPad or NotePad; we'll need it later. Just use CTRL-ESC to switch back to the Explorer or File Manager for the next step.

Step 3: Test the Eggs

Start up ExploreNet, if you remember how. (Find its icon and click on it!)

From the green screen, click NO NETWORK.
From the worlds that are offered, choose Dino4.

The Dino4 world has four dinos, plus our useful Arrow for measuring the X and Y of things. Take control of your personal dinosaur by clicking its button, go to the Desert scene (do you remember the map of this world?) If things were done right, you will see your eggs there. Try to pick up and move the eggs.

Uh, oh. They can't be picked up. Something's wrong? Indeed there is.

Behavior Files for Props

The eggs don't yet have a "behavior file." They are just sitting there, and cannot even be picked up. We need to go find the kettle.beh file, and change it to eggs.beh.

Use the Explorer to go into Dino4\Objects and find a file named Kettle.beh. Change its name to eggs.beh.

Open the tile (double click on it. If this doesn't work, see Step 2 above on how to Associate the .beh file type with WordPad.)

Notice that the kettle (now the eggs) is described as a "possession". Any prop you want to be able to pick up must be a possession.

Use CTRL-ESC (or ALT-TAB) to return to ExploreNet. Then use the RESTART button and the Reload Scripts command to quickly load up the changes you just made.

Step 4. Multiple Eggs

We wouldn't want to put all our eggs in one basket, would we? That is, we want to plant our eggs in several places, to help prevent raptor capture (that's hard to say...) So, let's go back to the PRAIRIE.PRP file.

QUIT ExploreNet, back to the green screen.

Control-ESC to select your way back to NotePad.

Now, change the file named Prairie.prp in the following ways.

Change the line which said

EGGS 1 775 750

Into three lines, which say

EGGSA(EGGS) 1 775 500
EGGSB(EGGS) 1 775 700
EGGSC(EGGS) 1 775 900

What does this mean? It means we're making three copies of the basic EGGS, and we're putting them in a line down the screen.

Now SAVE that file, CTRL-ESC to get back to ExploreNet, and try out your eggs by clicking RESTART and Reload Scripts.

Step 5: Fitting your Eggs into your Habitat

If you have time today, you need to design eggs and a background scene in which they can be carefully camouflaged. Think about birds' eggs: some are brown, with spots- to blend into twiggy nests. Some are blue (I wonder why?)

How are you going to hide your eggs? Don't let the raptors know your techniques!

Use the Arrow to find the (X, Y) location you would like to use for the eggs. Then make a .prp file for that scene, and locate the copies of the eggs at the places you want them to appear.

Extra Eggsperiences

If you have some eggstra time, investigate these mysteries.

1) Try to pick up the pine trees in the Mountain scene. One of them can be possessed, the others can't. How can you make them ALL able to be picked up?

2) Move the arrow close to the smallest pine tree, then Pick Up the tree. Now move to the desert scene and click on the arrow to get its action menu. Try "Copy my Possessions". What happened? Does this give you ideas about how to make dinosaurs lay eggs? Think about it first! The answer is printed in at the bottom of this lesson's Feedback Form.

FEEDBACK FORM FOR ExploreNet LESSON 4

Coral Springs Middle School - Spring 1996

Student Name:_____________________ Date:____________

1. Please list any problems you had with our lesson worksheets? Did we ask you to do anything that didn't work out as planned? (What page number? What action?)




2. Did the ExploreNet software work correctly? If not, tell us as exactly as possible what you were doing when things went wrong.




3. What did you like best about this lesson?




4. What did you like least about this lesson?



5. What should we add to this lesson to make it better?






Answer for Eggstra Experience #2:

If you examine the Arrow.beh ("behavior") file you will see how we make it possible to Copy my Possessions. Try copying the Arrow.beh file and making a Bronto.beh file (if you're the Bronto.) Change "possessions.clone" to "eggs.clone"; change "Copy my Possessions" to "Lay an Egg" . Save the file, reload the script from ExploreNet, and see what happens. We'll do more of this kind of magic in later lessons.