Avarcron


Table of Contents 0. Introduction 1. Avatar Guileline 2. Background 3. Design 4. Usage 5. APIs
0. Introduction Top The department of computer science at New Mexico State University (NMSU) is developing a collaborative virtual enviroment (CVE) called Unicron for distance learning puporse. People who reside far from the school can still benefit in learning using Unicron. They can use a personal computer to run a client program that would allow them to connect to the central server running at NMSU. Each user will use a graphical representation in Unicron, which represents the user. This graphical representation in the CVE is called avatar. This project webpage describes our effor to design and develop such avatar. We came up with a prototype avatar named Avarcron. Avarcron is a humanoid avatar that has a head, a body, two arms, and two legs. Avarcron conforms to a simple guideline for all the avatar should have in Unicron. The guideline is discussed in the following section. And, the detailed specification on Avarcron follows afterwards. 1. Avatar Guideline Top The guideline that all the avatar in Unicron should conform is simply a class named, Avatar. It is to be inherited by avatar models. class avarcron : Avatar (x1, x2, ..., xn) The code section above says the class avarcron inherits the class Avatar. The guideline the class Avatar would like to enforce is as follows. 1. An avatar should have an avatar attribute files that contains the following information on the avatar: a. name b. gender c. height d. xsize,ysize,zsize e. head shape f. skin color g. shirt color h. pants color i. shoes color j. snapshot picture of you. 2. Follow the format of the avatar attribute file with a file extension .avt. That's it. What the guideline does is to have each avatar store its attributes in a file. This eases re-creation of avatars. To see the format of an avatar attribute file, please click on amaker. The only functional component of the class Avatar is a method named parser(), and it is in charge of reading the information off the attribute file. The following section now describes the implementation and design of our prototype humanoid avatar, Avarcron. 2. Background Top Avarcron is implemented in a high-level language called Unicon, so as Unicron. Unicon offers 3D graphic facilities and easy implementation in object-oriented methology. And, the fact that it is platform-independent makes it more attractive to use for development of a 3D CVE like Unicron. 3. Design Top Avarcron is composed of six body parts: head, body, two arms, and two legs. Each body part is capsulated in a class (class head, class body, class arm, and class leg), and the instances are aggregated into the class avarcron. As the class avarcron inherits from the class Avatar, the body part classes inherit from a class called AvatarParts. It holds a collection of commonly used methods that the body parts may use often. Class: avatar Class: avarcron Class: avatarParts Class: head Class: body Class: arm Class: leg 4. Usage Top In order to use an avarcron, one has to open up a 3D window by calling WOpen() in Unicon. This means that avarcron can be used not only in Unicron but in any 3D capable windows. john:= avarcron() john.initialze(n) # where n is the name of .avt file without the extension john.setup(x,y,z) # x,y,z is the 3D coordinate where the avarcron initially # appears. 5. APIs for Driving Top The method that handles the movement of the avatar is actions(). The method actions() takes one argument, a integer, which specifies which action to take. For instance, if a value 1 is passed as below, the avarcron would move forward with its right leg and left arm moving forward while left leg and right arm swing backward, creating a walking-forward effect. john.actions(1) The following is a table of integer values along with their actions. value | actions ---------------------- 1 | walk foward 2 | walk backward 3 | walk to right 4 | walk to left 5 | turn left 6 | turn right 7 | raise right arm 8 | raise left arm 9 | back to normal [1] 10 | initiating pointing [2] 11 | talking on 12 | talking off 13 | move pointer up 14 | move pointer down 15 | move pointer to right 16 | move pointer to left 17 | pointer arm, head back to normal [1] it brings every body part back in its origal state, that is, the standing-still position. [2] As seen here, pointing can be done with avarcrons. This command initiates the pointing by first setting the avarcron standing-still then brining up the pointing hand up.