Island Creator/Creating Your First Island
From Croquet Consortium
This manual is part of the Consortium's Community Supported Documentation service. The views expressed in this portion of the wiki are those of some of our community members and may not represent the views of the Croquet Consortium or its other members. These wiki pages are dynamic/living documents with the support of many authors. Thanks to all the members of our community for keeping our documentation up to date!
At the previous lesson we have learned many things about how to create an script for Cobalt.
Now you know that an script is a sequence of lines of code having functions.
But you need to know also that:
1 - A function is also a sequence of lines of code having functions of other Classes or of the same Class.
2 - Functions are executed, usually, in the sequence they are inside an script but, some functions (we call them functions-events) are executed only when the computer's user does something like to click a key or press the button of the mouse or select an option in the Menu Bar etc.
3 - If a Class has a function whose name is initialize, when is created a prefix for the Class it will be executed.
4 - The main Class of Cobalt is the: CobaltWorld. This Class has an initialize function. A prefix of this Class is created when the user tries to drag the "Cobalt Ball" in the Cobalt Main Page. It's how we open the "Browser Window" presenting an island.
Talking about islands, is VERY IMPORTANT to have always on mind the GOLDEN RULE OF COBALT:
GOLDEN RULE OF COBALT "TO GO TO A COBALT ISLAND YOU NEED TO HAVE A COPY OF IT."
The island is inside a .ZIP file that contains:
- a - 1 file having the extension .IMAGE having all the Classes to create the island
- b - 1 folder of the type Content having: 3D objects(files .OBJ), images (files .JPG) and sounds (files .MP3).
- c - 1 folder of the type Squeaklets having the 2D applications (files created by Squeak: .PR).
This .ZIP file has around 30 Mb. So, to use Cobalt you need to have a communication resource of 1 Mbps or more. A modern WiFi hotspot works at 50 Mbps. The medium velocity of an xDSL connection to the Internet is today 2 Mbps.
OBSERVATION: This .ZIP file will be replaced in the future Cobalt 1.0 by a .C3D file that will be smaller and easier to create, to upload to the website hosting the island's creator and to be downloaded and installed by the island visitor. Today (April 2008) it's possible to create these .C3D files, but they have, inside, only the b part of our list.
To do the exercise of this lesson (your first island) you need to download the island that has the name: SanMinimum. It's a "minimum" island having only a floor (36x36 ft.) and an object - a panel having the Cobalt Ball. The .ZIP file need to be downloaded to the main folder of your Cobalt. Please, do it clicking
The default island of Cobalt is cobalt.1. Now when you select an image to be loaded you need to choose: SanMinimum.image.
Loaded the island you can choose one of four positions of the camera, pressing Ctrl + "A" having the pointer over the sky of the island. Like you can see at the Fig. 4 -3:
To move the avatar you have two options:
1 - If you are a Normal Visitor (the default) you need to press the right button of the mouse and drag the pointer over the image like you can see at the Fig. 4 -4 (easier to do than to explain).
2 - But you can be a Registered Visitor! To be it you need to click the "Register Ball" that appears in the central position of the island. It's usual an island to have 4 or 5 "Register Balls", but our "SanMinimum island" has only one.
The creation of Registered Visitor is important for security reasons. Sometimes is required to type a password to be registered. Only Registered Visitors can do actions at the island. The Normal Visitor neither has collision against the objects, like you can try at our "SanMinimum island".
You move a Registered Visitor's avatar using the "arrow keys" or the keys: "W", "S", "A" or "D" - like is usual at the majority of the games.
You can switch you avatar, but only Alice, Mr.Rabbit and some others are adequate for the Registered Visitor's collision engine.
To close the application, first close the Browser Window using "Cobalt | Quit" of the Menu. Now you can close the window of the application like usual (the "X" in the right-superior part). To the question:"Quit Croquet without saving?" answer: "Yes".
[TO BE CONTINUED]
