A User Guide and Developer Reference

minedesertSoftware and s/w Development

Oct 31, 2013 (3 years and 9 months ago)

171 views


©
ReactionGrid Inc. 2010


A User Guide and Developer Reference




©
ReactionGrid Inc. 2010

2

of
83

12 Mar 2011

Contents

Introduction

................................
................................
................................
................................
..................

4

What is Jibe?

................................
................................
................................
................................
.............

4

How do you access a Jibe world?

................................
................................
................................
..........................

4

Where can a Jibe world live?

................................
................................
................................
................................

4

What are some key features of Jibe?

................................
................................
................................
........

4

What tools are provided for managing a Jibe world?

................................
................................
...........................

5

Wha
t tools do I need to work with Jibe?

................................
................................
................................
..............

5

Target Audience

................................
................................
................................
................................
........

5

Chapter 1


Getting Started

................................
................................
................................
..........................

6

Configuring your Jibe Starter Kit

................................
................................
................................
...............

6

Configuring Loader
Scene

................................
................................
................................
................................
.....

6

Configuring JibeBasic Scene

................................
................................
................................
................................
..

8

Running your First Jibe World in the Editor

................................
................................
..............................

9

Publishing your First Jibe World

................................
................................
................................
..............

10

Publishing to Standalone

................................
................................
................................
................................
....

10

Publishing to Web

................................
................................
................................
................................
...............

11

Chapter 2


Importing an Existing Scene & Jibe
-
Enabling

................................
................................
..........

14

How do I Package My Build for Jibe?

................................
................................
................................
......

14

Importing a Unity Package Into a Jibe Project

................................
................................
........................

14

Moving
Assets Between Folders

................................
................................
................................
.........................

14

Removing the Main Camera

................................
................................
................................
...............................

14

Adding Jibe Functionality

................................
................................
................................
........................

15

Adding Your Scene to the World

................................
................................
................................
........................

1
7

Changing the Scene to Load after the Dressing Room

................................
................................
.......................

17

Changing from One Jibe Scene to Another

................................
................................
................................
.........

18

Chapter 3


Tour of Basic Jibe Compon
ents

................................
................................
...............................

20

The Loader Scene

................................
................................
................................
................................
....

20

The Jibe Object Configuration

................................
................................
................................
............................

20

Choosing an Avatar & Editing the Initial Scene

................................
................................
................................
...

21

The Dressing Room

................................
................................
................................
................................
.

22

Editing Avatar Clothing Choices

................................
................................
................................
..........................

23

Adding Additional Outfits

................................
................................
................................
................................
...

24

Adding Hair Colors

................................
................................
................................
................................
..............

24

Designing New Outfits

................................
................................
................................
................................
........

24

Main Scenes

................................
................................
................................
................................
............

25

JibeBasic Scene

................................
................................
................................
................................
...................

25

The Network Controller

................................
................................
................................
................................
......

26

Player Spawn Controller

................................
................................
................................
................................
.....

27

The JibeGUI Object

................................
................................
................................
................................
.............

28

Controlling the Mini Map

................................
................................
................................
................................
....

33

Applying Camera Effects

................................
................................
................................
................................
.....

35


©
ReactionGrid Inc. 2010

3

of
83

12 Mar 2011

Chapter 4


Extending the Platform

................................
................................
................................
...........

36

Adding Teleport Lin
ks
................................
................................
................................
..............................

36

Switching Scenes

................................
................................
................................
................................
.....

42

Load Next Level

................................
................................
................................
................................
...................

42

Adding Sit Targets / Making Chairs Work

................................
................................
...............................

46

Using the Pre
sentation Screen System

................................
................................
................................
...

48

Using a Screen Camera While Sitting

................................
................................
................................
..................

48

Configuring a Presentation Screen

................................
................................
................................
.....................

50

Working with NPCs

(Non
-
Player Characters)

................................
................................
..........................

52

Travelling the JiWay

................................
................................
................................
................................

53

Adding Vivox Voice Functionality

................................
................................
................................
............

56

Using Voice Functionality

................................
................................
................................
................................
...

57

Chapter 5


Advanced Customization

................................
................................
................................
.........

58

Jibe Code Hierarchy

................................
................................
................................
................................

58

Overview of Network Controller

................................
................................
................................
.............

59

Understanding the Server Architecture

................................
................................
................................
..

59

The Jibe Players
................................
................................
................................
................................
...................

60

Animation States in Jibe

................................
................................
................................
................................
.....

60

Sending Custom Data for Synchronization

................................
................................
.............................

60

Chapter 6


Jibe Mars Web Tools

................................
................................
................................
...............

63

Web Authentication

................................
................................
................................
................................

63

Working with Default.aspx

................................
................................
................................
......................

65

Choosing a Unity3D file to Load

................................
................................
................................
..........................

65

Further Customization

of Scripts

................................
................................
................................
........................

66

Adding Vivox Web Support

................................
................................
................................
................................
.

66

Jibe Activity Log

................................
................................
................................
................................
.......

67

Logging an Activity from Jibe

................................
................................
................................
..............................

67

Logging Activity from an External Source

................................
................................
................................
...........

68

Chapter 7


Server Platforms Supported by Jibe

................................
................................
........................

69

SmartFox 1.6.x
................................
................................
................................
................................
.........

69

Photon 2.x

................................
................................
................................
................................
...............

69

Upcoming Supported Platforms
................................
................................
................................
..............

69

Chapter 8


Upgrading fro
m a Pre
-
1.0 Edition of Jibe

................................
................................
................

71

Upgrading using the Jibe 1.0 Upgrade Package

................................
................................
......................

71

Reconfiguring Sit Targets & Chairs

................................
................................
................................
......................

76

Appendix A: Table of Screenshots

................................
................................
................................
..............

80




©
ReactionGrid Inc. 2010

4

of
83

12 Mar 2011

Introduction

Applicati
ons that
include 3D elements
, from computer games to CAD renderings of objects and
buildings
, can engage an audience in unique ways
. In the past couple of years, the entry bar to creating
your own 3D applications has been lowered with the introduction of s
everal platforms that make this
much simpler. One such application is Unity3D
, which combines a powerful 3D engine with the simplicity
of a drag and drop interface to create a 3D space.

Welcome to Jibe! This manual will help you to understand the Jibe platform, and give you advice on how
to use the project kit to develop multiplayer 3D environments in the Unity3D editor.

What is Jibe?

Created by ReactionGrid Inc. and based on the Unity3D

platform, Jibe allows you to design and manage
your own virtual world. Jibe is a 3D virtual world toolkit that provides the framework for a multiplayer
environment that can be made accessible to your users via web browser or standalone client.

How do you
access a Jibe world?

To access a Jibe world, users download a web browser plugin or download a standalone client. Mac and
PC are supported, as well as iOS/Android and game consoles.

Where can a Jibe world live?

Your Jibe world can be installed on your own
server or hosted on ReactionGrid’s server farm.

What are some key features of Jibe?



Fast and Broad Access: Jibe allows users to access a virtual world quickly and easily from
any major web browser with a small plugin download. With a single click install
, users can
instantly be in a 3D virtual world.



Professional Graphics and Authoring: Jibe is based on Unity3D, a professional game
development tool. The Unity3D Engine provides the tools to construct your own 3D virtual
environment with professional qual
ity graphics, physics and sound. Using the Unity3D
Editor, you can create 3D models within the Editor or import models created with any
industry standard 3D modeling program (e.g. Maya, Blender, Lightwave, Google Sketchup,
3D Studio Max, Autodesk, & more).

The Unity3D Editor also supports scripting using C#,
Javascript, or Boo, allowing you to design interactive environments and objects.



High User Concurrency and Avatar Customizability: Jibe is capable of supporting up to
thousands of concurrent users. Us
ers logging in to a Jibe world control a 3D avatar, and you
can create a range of avatars for users to select from and customize. Third party avatars
(such as those created with Evolver) and animations can be imported into Jibe and offered
to your users.



V
oice Support:
In addition to text chat, spatial voice communication is possible in Jibe in a
web player using the Vivox

web plugin.


©
ReactionGrid Inc. 2010

5

of
83

12 Mar 2011

What tools are provided for managing a Jibe world?

Jibe allows you to manage your world and user accounts via

web
-
based administration tools. Web
-
based
worlds can include user authentication via any standard web authentication mechanism, for example,
through Facebook Connect

or a web login to an OpenSimulator database. Standalone clients
can
authenticate against a database using our customized Jibe
-
Auth system, or through custom extensions
to many different authentication providers such as LDAP.

What tools do I need to work with Jibe?

You only need the Indie edition of the Unity editor to

work with Jibe. Jibe has been tested against Unity
2.6 and 3.0 and both editions of the project kit are available for customers. Moving from 2.6 to 3.0 is
mostly painless, but some materials will need adjusting to work with the 3.0 shaders.

For 3D models,

you can either choose to download models from TurboSquid (
http://turbosqiod.com
),
from the Unity Asset Store, or other sources, or generate your own models using a tool like Blender
(
http://blender.org
), Wings3D, Google Sketchup, Carrara, Cheeta3D, or more professional tools like
Maya and 3ds Max. For more information on object import, see the Unity documentation here
http://unity3d.com/support/documentation/Manual/HOWTO
-
importObject.html
.

For scripting, all the tools you need are included. The default application for editing scripts, UniSciTE is a
reasonable text editor, though it is recommended t
hat you try Mono Develop, which is installed
alongside Unity3. If you have access to Microsoft Visual Studio, you can also use that to edit your scripts.
More information on this can be found on the Unity documentation here
http://unity3d.com/support/documentation/Manual/HOWTO
-
MonoDevelop.html
. For Visual Studio,
you select Visual Studio from the External Script Editor selection box and then follow the same
instructions a
s for Mono Develop. One useful thing to note is that Mono Develop supports live
debugging, which is extremely useful for development.

Target Audience

This manual should serve as a launchpad for anyone with the Jibe project kit
that

has experience
working

with the Unity editor. If you are not familiar with the basics of the Unity editor then you may
benefit from reading Unity 3D Fundamentals by Will Goldstone as a super comprehensive overview of
the Unity editor environment.

The Jibe project kit is designe
d to provide a lot of flexibility with easy
-
to
-
use configuration settings. The
functional scripts that interact with the Unity environment are all included in the kit with full source
code and can be extended beyond the initial examples. Additionally, full

layered image source files are
available where possible for the UI elements in the project kit, making it easier for you to customize the
look and feel of your user interface for your users with a bit of skill in Photoshop, Paint Shop Pro, or any
other gr
aphics application that supports layers.


©
ReactionGrid Inc. 2010

6

of
83

12 Mar 2011

Chapter 1


Getting Started

As soon as you have a copy of the Jibe kit in your hands you should make sure first of all that you keep a
plain, unaltered version to hand in case you need to refer back to the original
project kit.

Your next step is to fire up your first Jibe project and configure it
,

then step inworld for the first time
-

and don’t forget to invite your friends!

Configuring your Jibe Starter Kit

When you obtain your starter kit you are given some data
to configure your application. These include
the following values:



Server IP

-

The IP address of the server that controls the networking for Jibe.



Server Port

-

The port number that your server is
running on. This will need to be accessible
by any user connecting to your Jibe world. It is recommended that this port is unblocked for
both TCP

and UDP

traffic for anyone connecting.



Zone

-

The main conceptual umbrella for your Jibe world. A zone can contain one or many
rooms.



Room
(s)
-

A room is a concept on the network server that your users are connecting to.
Users in the same room can chat to each other, and can see
other users in the virtual space.



Room Password

-

A password for your rooms to prevent other publishers producing worlds
that connect to your rooms.



Server Platform

-

Choose between JibeSmartFox

or other supported platforms. Initial
releases of the Jibe kit support only the JibeSmartFox platform, with future support for the
JibePhoton

platform, and also the JibeSmartFox2 platform. Each server platfor
m has unique
benefits and advantages, and more supported platforms will emerge over time to give Jibe
customers maximum flexibility.

Configuring Loader Scene

To enter t
hese values in your project kit:

1.

O
pen the
JibeStarterKit

project and look through your P
roject hierarchy

for the
Scenes

folder.
Double
-
click on the
Loader

scene
:


©
ReactionGrid Inc. 2010

7

of
83

12 Mar 2011


Loader Scene in the Editor

2.

Select the
Jibe

object

in the Scene Hierarchy

pane, and view the
Inspector

tab. You will notice
the values in here where you should enter your server details as provided.


3.

In the
Room List

section, enter the number of rooms available
-

if you only have

one room,
enter 1, then enter the name of your room in the Element 0 value.

4.

For multiple rooms
, increase the number of rooms, and enter the name of each room in a
separate Element. The main room is specified in the
Room

value
. This room needs to be

©
ReactionGrid Inc. 2010

8

of
83

12 Mar 2011

included in the full list of available rooms in the Room List section. It is used for a default value
on ne
w scenes if you have not yet ch
osen a room
.

Additional Information on configuring your server is included in

Chapter 7


Server Platforms Supported
by Jibe
.

Configuring JibeBasic Scene

Save your changes to
Loader

scene, then
:

5.

D
ouble
-
click on the
JibeBasic

scene in the Project Hierarchy to change to the main scene.



JibeBasic Scene

6.

Expand the
Jibe

object in the Scene Hierarchy, and select
the

Network Controller

game object
.
In the Inspector, head t
o the Network Controller script configuration, and enter the name of the
r
oom to
l
oad in the
Room to Load

value.

7.

If you only have one room, enter that room name here. If you have multiple rooms, choose one
of those rooms and enter that room name in here.

I
f you check the box to
Use Default Room
,
this will override any other value entered and use your default room name.


©
ReactionGrid Inc. 2010

9

of
83

12 Mar 2011

Running your First Jibe World in the Editor

When you have finished configuring your scenes, ensure that all scenes are saved, then hit the P
lay
button at the top center of the Unity editor to test your configuration. If all goes to plan, you will see
your Jibe space load up inside the editor
:


Running in the Editor

The first scene is where you enter

a name and choose an avatar. After this is done, you progress to the
next level, which by default is the dressing room:

In the dressing room you can customize the
appearance of your avatar
-

choose a model, hair
(if available) and an outfit, then click En
ter Jibe to
move to the main level.




©
ReactionGrid Inc. 2010

10

of
83

12 Mar 2011

In the main level you will be able to walk around and chat with others in your world, once it is published.



Running Jibe in the Editor

Publishing your First Jibe World

Once you are happy that your world runs well,
you can publish your first world so that others can access.
Running in the editor is a great way to test your builds before they are published, but for others to
connect you need to either publish a web player version or a standalone client.


Publishing to

Standalone

Standalone clients are published via the Build
menu.

1.

Select the File menu, then Build Settings:


2.

Choose the Target Platform
, Mac or PC,
and click Build.

Mac builds will produce a .App, whereas PC
builds will
produce a .exe and a folder
containing data files for your application.
Mac
builds also have the option to target Intel
Macs, PPC Macs, or both (a Universal build).
Note that if you use Universal, your deployed
app will be larger, since files for both
plat
forms will be included.


©
ReactionGrid Inc. 2010

11

of
83

12 Mar 2011


Building a Standalone Client

You can then try running your first standalone build, and if all works as planned then you can pass the
files to your friends to have them join you in your first Jibe world!




Running a Standalone
Client

Publishing to Web

Producing a web build and publishing to a web server will open your jibe space to anyone on the
Internet who
knows your url. To build to web:

1.

H
ead to t
he File menu and Build Settings, then select Web Playe
r. Ensure that the Streamed
checkbox is checked.


©
ReactionGrid Inc. 2010

12

of
83

12 Mar 2011



Building a Web Player

2.

You can go ahead and save your web player files and then copy to a web server to preview, or
you have some handy options in the Player Settings…


Editing Web Player Settings


Dis
abling Right
-
Click Context Menu


©
ReactionGrid Inc. 2010

13

of
83

12 Mar 2011

Disabling Right
-
Click Context Menu

Since Jibe uses right mouse click functionality to control the camera and player movements, you should
disable the standard Unity right
-
click
context menu that is enabled by default. Ensure that you choose
the No Context Menu option in the Resolution and Presentation settings, and any HTML pages you
produce as part of your builds will have that feature disabled by default.

Now when you run your
web player using the provided HTML page you will be able to control your
avatar with the mouse buttons as designed.

Note that there is a pre
-
made HTML file with this option already disabled, and with some extra pieces of
Javascript

that help with more complex Jibe interaction, included in your Jibe project kit in the Web
folder. For more information on this, see
Page
65
,

Working with Default.aspx



©
ReactionGrid Inc. 2010

14

of
83

12 Mar 2011

Chapter 2


Importing an Existing Scene

& Jibe
-
Enabling

If you have already been experim
enting with Unity and creating your own 3d spaces, you may want to
convert those spaces to add in the multiplayer functionality that Jibe offers. The best way to do this is to
export your existing scenes and objects and import them into a copy of your base

Jibe kit.

How do I Package My Build for Jibe?

Open up your existing space in your Unity editor and choose the scene you want to import into Jibe. The
process is the same for Unity 2.6 as it is for Unity 3:

1.

Open the scene in the editor, and ensure that all

the objects you require are
in place

2.

Right
-
click on the scene in your Project Hierarchy and
S
elect
A
ll
D
ependencies



this will give
you a preview of what will be bundled up, as well as refreshing Unity with the correct and up
-
to
-
date list of items.

You g
et the chance to edit which of these items is included in the package in
the next step.

3.

Now
right
-
click on your scene and select
Export Package
. In here you can either choose to
include all related resources, or you can choose to exc
lude specific items.

This process produces a .package file that contains all of your related resources compressed into a single
archive that you can load up into your Jibe project as a new scene.

Importing a Unity Package Into a Jibe Project

Load up your Jibe project into the Unity editor, then simply go to your
Assets

menu and select
Import
Package

(if on Unity 3.2, select
Import Package


Custom Package
)

Moving Assets Between Folders

When a package is imported into Unity, all the original folder hierarchy from your source project is
retained, so you may want to move some items around post
-
import. Note that you should only
ever

do
that from within the Unity editor, since this will en
sure that any references to assets are preserved. If
you move items on the filesystem, you may find game objects suddenly lose track of attached scripts or
materials.

Open your imported scene in the editor and verify that all items came over as intended.

R
emoving the Main Camera

Whenever you create a scene in Unity, you will always have a Game Object in your empty scene called
Main Camera. There’s a good chance your imported scene will have one of these cameras in the scene.
You

will need to remove this camera from the scene because it will interfere with the camera that is part
of the Jibe system.

1.

Right
-
click on Main Camera in scene hierarchy (if it exists) and select Delete.


©
ReactionGrid Inc. 2010

15

of
83

12 Mar 2011

Adding Jibe Functionality

While your scene is
visible in t
he editor, you will need to

expand the Objects folder in your Project
hierarchy and

add:



A

Jibe

Pr
efab
, positioned where you need the avatar to appear when inworld



A
JibeGUI

Prefab, positioned at 0,0,0



A
MiniMapCamera

Prefab, positioned anywhere in the scene but at a Y value of 510m

This will add all the network connectivity, the UI and chat function
ality required for multiplayer
functiona
lity.

You need to wire up a couple of other pieces to finish configuration:

2.

Expand both the
Jibe

and
JibeGUI

prefabs in the scene hierarchy so you can see all the Game
Objects inside at the same time

3.

In the
Jibe

prefab, select the
Network Controller

Game O
bject, enter the name of the
Room to
Load

from your available Jibe rooms (see page
3
)
. If you only have one network room available
to your installation, you can ent
er this here (and choose to use this new scene instead of the
default Jibe Basic scene).

4.

Drag the
Chat

Game Object from the
JibeGUI

prefab to the Chat Controller field in the
Network
Controller

script in the
Jibe

prefab


Adding a Reference to the Chat Con
troller


©
ReactionGrid Inc. 2010

16

of
8
3

12 Mar 2011

5.

Now select the
Chat

object

in the hierarchy

and drag in a reference to the
Network Controller

object in the same way:


Adding a Reference to Network Controller

6.

UIBase object’s UIBase

script needs references to Network Controller and the MiniMapCamera
as follows:


Configuring the UIBase Component


©
ReactionGrid Inc. 2010

17

of
83

12 Mar 2011

Once your scene is all set up and ready to go, you need to do a few additional steps to complete your
configuration and use your new scene.

Adding Your Scene to the World

While the scene is open in your editor:

7.

Select File


Build Settings
. If you do not see your scene name listed in the list of scenes in the
top of that dialog, then you need to click Add Current.

8.

Move
your scene to the desired position in the build order


if this is to be the first scene after
the dressing room, then place it accordingly.


Build Settings in Unity 2.6 and Unity 3.2

Changing the Scene to Load

after the Dressing Room

9.

To make your scene the first scene after the Dressing room, o
pen the
DressingRoom

scene from
the Scenes folder

and select the
DressingRoomController

game object from the Scene
Hierarchy.

10.

In the Dressing Room

script, enter the name of your scene in the
Next Level

property:


©
ReactionGrid Inc. 2010

18

of
83

12 Mar 2011


Changing the Scene to Load after the Dressing Room

Changing from One Jibe Scene to Another

If you are going to transition to your scene from one of the existing scenes in your project (instead of
from the Dressing Room) then you need to make your changes elsewhere. If you are changing from the
JibeBasic scene to another scene:

11.

Open the
JibeBasic

scene
, and expand the
JibeGUI

game object.

12.

In the
UIBase

game object, edit the UIBase script
.

13.

Check the box to Show Room Choices

14.

Enter the number of available rooms /
scenes in the Size property, and then ensure that your
new scene is named in one of the Elements. You need to match the exact scene name and
capitalization here.


©
ReactionGrid Inc. 2010

19

of
83

12 Mar 2011


Setting up Additional Scenes in Jibe

Now when you run your Jibe project, depending on your c
onfiguration, you will either go straight in to
your new scene from the dressing room, or you can transfer from the main scene to your new scene via
the button in the top left.


Scene Transition Button / Room Choice


©
ReactionGrid Inc. 2010

20

of
83

12 Mar 2011

Chapter 3


Tour of Basic Jibe Componen
ts

When you first open the Jibe product kit project i
n the Unity editor, there are some key pieces you
should understand so you can work with the project successfully.

The Loader Scene

The Loader scene is where it all begins. When you
run your Jibe applications, this scene is the first one
that loads. If you are in the editor in a different scene, when you attempt to run the application in the
editor you will be taken to the Loader to start your Jibe experience.

In the Loader scene, a connection is established to
the Jibe server, and you a
re given a choice of initial
appearances. Behind the scenes, you have a couple of scripts that you may want to configure that
control several parameters that control the configur
ation of your world.

The Jibe Object Configuration

In the Loader scene, the Jibe object contains all of the configuration information you will need to
connect to your network server

(see
Configuring Loader Scene

for server configuration values)
,
and
more:



Jibe Server Configuration

User Data Conn String: Used for offline connection to external authentication provider database via the
OSDCJibe

plugin
. This functionality is only available in standalone Jibe deployments (web players are
unable to make direct contact with databases).

For high
-
use environments (where > 100 users are anticipated in the same virtual space) you m
ay
choose to increase this interval. The default is 200ms between updates. As the interval increases,
movement of other avatars may appear more jerky, but the network overhead will be lower.


©
ReactionGrid Inc. 2010

21

of
83

12 Mar 2011

Choosing an Avatar & Editing the Initial Scene

Choosing an avatar

in the Loader scene is a simple process to get started. From here you could go
straight to the main Jibe environment if you choose, though the default next step is to go to the dressing
room.

Customizing Loader Scene Appearance
-

ChooseAvatar.cs

In the Loader scene, select the Init object from the
Scene Hierarchy and you will see the Choose Avatar

script properties in the inspector.

In this script you can set several properties to alter
the initial look and feel of the

login screen without
having to edit the initial script directly, though out of
all of the Jibe platform, this script is the one that you
are most likely to want to edit, since the loader scene
is the one where you may want to place your own
branding.

The
useful values in th
is script that you can edit are:



Login Screen Background Image

(the image
shown behind the avatar choices)



Background Image Full Height/Width



Background Image Fixed Height/Width



Avatar Preview Transparency

To change the color of the back
ground, you will need
to edit the camera in the Loader scene. Select the
Main Camera and change the Background color
accordingly (1).

If you want a 3d scene for your loader scene, you can
always add elements to this scene as you would any other Unity scen
e. LoginScreenBackground Game
Object in the scene hierarchy is an example of this. It is included in the project as an example


to view
this object, re
-
enable its Mesh Renderer component in the Inspector. The default scene camera is set to
render in Ortho
graphic mode


if you need depth, switch this to Perspective (2).



©
ReactionGrid Inc. 2010

22

of
83

12 Mar 2011


Editing Loader Scene Camera

The Dressing Room

The dressing room enables you to choose a different avatar and different outfit
for your avatar.

The outfits for each avatar come from the Resources folder in
your project. To add more outfits is a simple process of dropping in new
clothing images in that location, adhering to the naming convention that has
been established.

The default code will pic
k up all files that have been added to
the resources folder and enable you to use those clothing selections inworld
without any recoding required.

Changes to avatar models may make this process slightly different, and
recoding may be required for differen
t avatar model designs.

To change the room in the dressing room, open the Loader scene in the editor
and alter the design however you see fit. The
DressingRoomController
,
PoseStand

and
Jibe

objects are required to handle the changing avatar designs
and net
work connectivity, but other aspects can be redesigned as appropriate.
The
DressingRoomController

has some parameters you can edit to select which
scene to enter after finishing in the Dressing Room (1)
, to change which avatars
are available, or to choose different hair textures (2).


©
ReactionGrid Inc. 2010

23

of
83

12 Mar 2011

Editing Avatar Clothing Choices


Dressing Room & Avatar Hair and Clothing Options

There are four elements to an avatar’s appearance. Expand the Resources folder in your
Project
hierarchy to see the existing files.

At minimum, you need one ‘skin’ file for each avatar in the root of your resources folder. This is the
default appearance for each model.

Default Skin Naming Convention:
AN
_skin



A is the avatar model style (M or

F by default)



N is the number of the avatar of that style (for the seven default females, they are F1 to F7, etc)



skin is a pre
-
set default naming convention, and should always be used for default skin names

These skins should not be moved from their defa
ult locations, and are mapped to initial avatar
materials.


©
ReactionGrid Inc. 2010

24

of
83

12 Mar 2011

Adding Additional Outfits

For the avatar model, if a folder does not already exist for the model name, make one.

Folder Naming Convention
:
AN



A is th
e avatar model style



N is the number of the avatar of that style

Now, add two subfolders:
previews

and
skins
.

Previews are a swatch that appears as a clickable button in the dressing room. Choose an appropriate
swatch for the outfit. Clicking on the previe
w image will apply the related skin file from the skins folder.

Clothing Preview Naming Convention
:

AN
_cloth_
n



A is the avatar model style



N is the number of the avatar of that style



cloth is a
pre
-
set default naming convention, and should always be used for clothing swatch
preview names



n is the number of the outfit (always start from 0)

Skin (outfit) Naming Convention
:
AN
_skin_
n



A is the av
atar model style



N is the number of the avatar of that style (for the seven default females, they are F1 to F7, etc)



skin is a pre
-
set default naming convention, and should always be used for default skin names



n is the number of the outfit (always start f
rom 0)

Note that Skin 0 will be applied when preview 0 is clicked,
skin 4 for preview 4, etc.

Adding Hair Colors

Adding additional hair colors (for those avatars who have a hair mesh) is a simple case of dropping in a
new file into the Resources folder wi
th the appropriate naming convention:

Hair Tint Naming Convention
:
wig_
colorname

Adding these to the project will
not immediately cause them to be available in the dressing room


you
will need to head to
the Game Object, and add the Hair Texture to the array in the Dressing Room script.

Designing New Outfits

To assist with creating new outfits for your avatar models, layered image source files are included in
yo
ur Jibe project kit, in the IconSource folder (at the same level as the Assets folder). These files are in
.psd and .pspimage format. Images should be saved at 512x512 pixels to help keep virtual world file
sizes down, though 2048x2048 original sources are

available on request.


©
ReactionGrid Inc. 2010

25

of
83

12 Mar 2011

Main Scenes

There are two scenes included in the base Jibe project kit, JibeBasic and Scene2.

If you have access to
two rooms in your network configuration, you will be able to use Scene2 if you have configured your
Loader scene acco
rdingly. Otherwise, you will only be able to use one scene for your main scene.

JibeBasic Scene

The main JibeBasic scene is the default scene that users visit after they have finished in the dressing
room. In here are the core funct
ional pieces you need to get started:


JibeBasic Scene Core Components



Jibe
: Contains network functionality, a preview camera to give you a viewpoint that should
match the runtime view when you log in, and a SpawnPoint. Essentiall
y, wherever you put your
Jibe object in your game is where you player will appear. If you are planning on appearing over
the ground, set the Y value
for the Jibe object in the Scene
to match (or be a tiny bit higher) than
ground level



JibeGUI
: Contains a couple of GUI elements for FPS and Version number, also contains chat
functionality, the cursor, and the rest of the core UI elements. Must be positioned at 0,0,0 so
the GUIText elements in the FPS and Version components appear

on screen correctly.



MiniMapCamera



Top down minimap camera that will track your avatar’s position once
inworld.


©
ReactionGrid Inc. 2010

26

of
83

12 Mar 2011

There are only two other elements in the scene, a directional light and some terrain. You can swap
these
out or edit them as appropriate.

You can also change your Skybox

in use by heading to the Edit menu, and selecting Render Settings. In
that dialog you can choose a different skybox for your scene, change fog

levels and adjust ambient
lighting to give your scene the right look and feel.


Editing Scene Render Settings

Within the Jibe object there is the all
-
important Network Controller object, which is responsible for the
majority of Jib
e networking functionality.

The Network Controller

This controls the networking aspects of Jibe, and marshals all communication from game objects in the
scene to the chosen network back end. It resp
onds to events raised by both the server, and by the local
player, so if you are running your application and you move your avatar around the Jibe scene, the
change in position is raised as an event, causing Network Controller to send the new position data

via
the network server to all other connected clients.

There are two scripts in the Network Controller object, one is the Network Controller script

itself, the
other is the Player Spawn Controller
.


©
ReactionGrid Inc. 2010

27

of
83

12 Mar 2011


The Network Controller Script in the Inspector

The values in this script configure how your environment works while the scene is loaded. You likely will
only need to edit the name of the Room to Load value on any scene
with a Network Controller in it,
since this controls which network room is used for your traffic.

Ensure that you have a reference to the Chat script in here by selecting the instance of the Chat
Controller available to your scene (there will be only one
when you select the picker control).

Player Spawn Controller

This script controls the appearance of avatars in the scene, and the position at which they appear when
new players connect.


Player Spawn Controller Script in the Inspector


©
ReactionGrid Inc. 2010

28

of
83

12 Mar 2011

The PlayerPrefabs ar
ray

stores a reference to all the available avatar character models from the Project
hierarchy, and if you add any new characters, you will need to edit the size and contents of this array
accordingly.

The Spawn Points

a
rray

will give an element of randomness to your avatars entering the space, if you
are expecting many avatars for an event, positioning a series of spawn points around the environment
will help space them out when they log in. The Spawn Radius value determ
ines the radius around each
spawn point where avatars appear. Hence with a radius of 4, your avatars will appear in one of 16
random positions, up to 4m from the spawn point in the X direction, and up to 4m from the spawn point
in the Y direction.

This wil
l help minimize avatars appearing on top of each other.

The Player Character reference

is to the Player Character prefab in your project kit, and this prefab
stores many useful game objects to template your local player when you log in. It contains the cam
era
used when you are in
-
game, it also includes the map icon that appears over your own avatar’s head. It
adds in the required control scripts so that the character you log in with is controlled when you use your
movement keys.

The Remote Player Shadow

and
Remote Player Map Icon

are used to help add some depth to remote
players when they connect to the environment. Normally you won’t want to change these references. If
you choose to use a diffe
rent style of icon for the Remote Player when they are connected you can edit
the project prefab in the hierarchy.

The Player Particles

are used when you appear in the scene to add a little effect to your appearing
inworld, and to show and highlight new pl
ayers when they connect.

The Physical Character

is a new addition to the project kit, and can be used to make character
movement more smooth

over rough terrain. With the physical character enabled, your characters can
jump if space is pressed while they are walking forward.

The
Jibe
GUI Object

This object contains a series of Game Objects that contains scripts used for different purposes.

Chat

Controller

The Chat component controls all the chat and IM functionality in the environment.


©
ReactionGrid Inc. 2010

29

of
83

12 Mar 2011


Chat Controller Script in the Inspector

The Window Width and Height

control the default width and height of the chat window when it is
o
pened for the first time inworld.

The
Show Chat Window

checkbox

controls whether the Chat window is visible when the virtual world
loads. To show the chat window

when the user logs in, check this box.

Max Message History Display
controls how many chat mess
ages are displayed in the chat UI. All of the
chat messages are stored in memory, but rendering them takes a bit more effort, so there is a balance
to strike between how many messages to render vs usability. To get a copy of your chat history, the Chat
Con
troller script has functionality to retrieve all messages on a right
-
click, and you can choose what to
do with the history based on that click by editing the Chat Controller code. If you are a Jibe
Mars

customer, your web page will show a panel with full
chat history for the selected chat when you right
-
click on the chat window.


©
ReactionGrid Inc. 2010

30

of
83

12 Mar 2011

Background Styles

contains an array of background images that can be chosen to change the color of a
private chat for easier identification of which chat you are in at any time.

We
lcome Messages

can be set to show a welcome message to a user who is arriving in the virtual space.
Add as many elements to this array as required, and each one will appear as a line of text to the users
arriving inworld.

Hide Instantly if No Messages Rece
ived

modifies how the chat window visibility works when the
window is toggled. Likewise, the
Message
Show
T
ime

and
Message Fade T
ime
control how long the
window is visible for when new messages arrive while you are not in chat mode.

Cursor

stores a reference to the Cursor component, which can change the cursor style when the mouse
hovers over either a sittable object, or over another user (offering the option of initiating a private chat
with that user)

Room List Unread Messages Indicator

i
s a button background that changes the appearance of the
Online Users button background. This is a visual cue that you have received new unread private chat
messages.

Chat Icons

controls the little icons that display if you are chatting to another user.
Vo
ice icons

are for the
Vivox Voice integration. The
Resize

icon is shown top left of the window to change Chat window size.

Cursor

The Cursor changes the default cursor into a styled cursor on screen (with the option to choose a
different cur
sor image). It also shows different icons when hovering over sit
-
enabled objects and over
other avatars for initiating private chat
.


Cursor Script in the Inspector

You can choose to use different icons for each of the dif
ferent cursor states by replacing those images
(source images are included in the IconSource folder, where you could easily re
-
tint the cursors). You
can disable the cursor overlay completely by unchecking the Cursor Enabled box. The other two boxes
(Sit

cursor and Private

Chat cursor) are only used at runtime.


©
ReactionGrid Inc. 2010

31

of
83

12 Mar 2011

FPS

The FPS

component shows text on screen for the current FPS of the environment (useful for
performance analysis), but can be disabled easily if you want to remove this from the screen.


FPS Object in the Inspector

To disable the FPS counter on screen, uncheck the

Show FPS property in the FPS Counter script. To
change the position of the FPS counter on screen you edit just the X and Y values. These values must be
between 0 and 1, since they are percentage of the full screen size. The default position is x = 0.33 (1
/3 of
the way in from the left) and y = 1 (at the top).


©
ReactionGrid Inc. 2010

32

of
83

12 Mar 2011

UIBase

The UIBase controls icons, minimap

visibility and the
presence of buttons to change to different pre
-
defined rooms.

Settings Anchor Point



choose where the small
helper icons are positioned on screen. Default
position is
TopRightCorner

but you can change this to
vertically down the top right, or over on the left.
. Use the
Settings Icon Size

property to
resize them all.

Settings Icon
,
Min
i Map Icon

and
Audio Icons

are the
values to change if you want to change the
appearance of these buttons. The Volume control,
when clicked, cycles through each volume level in
line with the icon image. The Volume levels available
to th
e application are directly related to how many
icons you include. If you include 5 icons, there would
be 5 states


0, 25%, 50%, 75%, 100% total volume.

Show Mini Map

controls whether the map is shown
by default (otherwise it is click
-
to
-
show)

Instructions

UI

is the help overlay for the control
systems, though you can swap this out if needed.

Show Room Choices

will toggle if the buttons in the
top left corner are visible to take users to the next
room. The number of buttons and their destinations
is set in
the Available Rooms property. Each button
must have the same name as a live scene in the project.

Teleport Links

In the UIBase component, edit the Teleport Links script to control teleport destinations to another
position within the
same scene. A full description of this functionality is included in the
Adding Teleport
Links

tutorial on Page
36
.

Version

The Version component shows the
version of your world (which is very useful for QA testing)
. The text is
picked up from the Version setting in the Jibe object on the Loader scene. Th
is component

can be
disabled
easily

if you want to remove
this

from the screen.

It is positioned in the same way as the FPS
component.


©
ReactionGrid Inc. 2010

33

of
83

12 Mar 2011

Controlling the Mini Map

The MiniMapCamera

prefab, when added to the game, is used f
or showing the minimap on screen. The
map is toggled on and off in the UIBase script (and via the on
-
screen button during runtime).


Editing the MiniMapCamera Game Object

Mini
MapCamera is a camera positioned up in the air pointing down at the scene below
. It is set to run as
an Orthographic style of camera, with no perspective depth. The
Mini Map script controls where the
map is positioned on screen, and the size of the image to render. This should line up with the map
overlay specified in the UIBase comp
onent.

To change the zoom level of the MiniMap Camera, change the Size attribute to a larger or smaller value.
Larger values zoom out, smaller values zoom in.


©
ReactionGrid Inc. 2010

34

of
83

12 Mar 2011

The MiniMap camera will only display items in the scene that have a
Mesh Renderer Component

that
is
set to appear on the
MiniMap Layer
.


Displaying an Object in the MiniMap

If you add a CubeChair prefab

from the Objects folder in your project hierarchy, you can try this out for
yourself, if you change the layer for the chair to MiniMap, the little white cube should now appear in the
minimap. If you leave the cube unchanged, it will not appear. This is to

reduce the overhead of the
camera


you don’t want to display more than you need in the minimap, so be selective!


MiniMap Layer


Showing an Object in the MiniMap Top
-
Down View


©
ReactionGrid Inc. 2010

35

of
83

12 Mar 2011

A useful technique is to either draw an image or take an image of your scen
e top
-
down and save as a
static image file. If you position and scale this image accordingly in your scene and label it as being on
the minimap then it can be used for a more interesting minimap style with lower rendering cost.

The default terrain in the J
ibeBasic scene has been set to appear on the MiniMap layer by default.

Applying Camera Effects

In a Jibe scene, the main camera view is provided by a camera that appears at runtime, and is created
from the PlayerCharacter prefab
.

To change the position of the player camera relative to the local player model (your camera when you
log in, relative to your avatar position), edit the position values for the PlayerCamera Game Object:


Editing Player Camera Position

To add a defa
ult effect to the camera, add your camera script to this camera, then when inworld, the
effects will be seen as the camera is attached to the avatar:


Using Camera Effects



©
ReactionGrid Inc. 2010

36

of
83

12 Mar 2011

Chapter 4


Extending the Platform

The Jibe product kit includes several scripts y
ou can use to extend your world.

Adding Teleport Links

Teleport links allow users to transport their avatar instantly to any part of your world you specify. In
your JibeBasic Scene

Hierarchy panel, expand the
JibeGUI

Game Object

and select the
UIBase

Game
Object (1).
Take a look in the Inspector and check if a
Teleport Links

script already exists in the UIBase
object. If not, you will need to add it.

In your Project assets, expand the
RGScripts

folder, and locate the
TeleportLinks

script (2). With the
UIBase

Game Object
selected,

drag the
TeleportLinks

script over onto the Inspector pane to add the
script:


Adding Teleport Links Script


©
ReactionGrid Inc. 2010

37

of
83

12 Mar 2011

You will be presented with a warning dialog about losing
the Prefab connection

-

this is not a problem,
so just click "Continue" (3) to proceed


Breaking a Prefab Connection

In the Inspector
,

you will see your newly
-
added Teleport Links script. Select the
Skin

property and

eithe
r
select the jibeSkin from the picker dialog (4) or

drag the j
ibeSkin

over from your Project hierarchy from
the Skins


JibeSkin folder

(
5
).


©
ReactionGrid Inc. 2010

38

of
83

12 Mar 2011


Selecting JibeSkin

Next

make a note of the Teleport Destination Prefix

property in the script (6)


this will be the prefix
used by any game object in the Scene Hierarchy that you want to use as a teleport destination (it helps
to have a similar prefix to keep them together in the scene list). The default is
_Teleport
.


Teleport Destination Game Object Prefix


©
ReactionGrid Inc. 2010

39

of
83

12 Mar 2011

C
reate a new Empty Game Object by selecting the
GameObject

menu and selecting
Create Empty

(
7
). In
the Project Hierarchy, click to select the new
GameObject

and rename it

with the chosen prefix, for
exam
ple

_
Teleport
Office

(
8
) where
Office

is a short, simple name for the
t
eleport button that will
appear. Now you can manually edit the position (
9
) of this new invisible object to the spot in your scene
where you want the user to land after they click the
Of
fice

teleport button. You can also enter the
values for this position in the
Inspector

(
10
)


Configuring Teleport Destinations

In the
Scene
Hierarchy

tab highlight the
UIBase

object (
11
) then in the Inspector tab locate the
TeleportLinks

script and enter
the
total
number
of Teleport links in the
Teleport Destinations

box and
the subsequent
Size

field (
12
). Assuming this is your first Teleport button
,

enter "1" for the value in the
Size field. Once you do this "Element 0" will appear below the Size field.
Drag
the previously created
"_
Teleport
Office" (1
3
) transform
from the Scene Hierarchy over to the Element 0 field.


©
ReactionGrid Inc. 2010

40

of
83

12 Mar 2011


Configuring Teleport Links

If you have a particle generator you want to use for a teleport particle effect, you can add it to the
Teleport
Particle Generator

property in the Inspector. There is one included in Jibe that you can use


it
is the same one that shows particles when you first log in to the environment. Go to your Project
hierarchy
, and expand Avatars


Prefabs


BaseComponents, then, while your UIBase is still selected and
showing in the Inspector, drag PlayerParticles

over to the Teleport Particle Generator property (14):


©
ReactionGrid Inc. 2010

41

of
83

12 Mar 2011


Adding Teleport Particles

At this point you should
save your scene, then
click the Unity3D editor "Play" button and login and try
out your Teleport button (1
5
). If this works you can then compile your world for others to use this new
feature. To add additional Teleport links
, alter

the number of Teleport Destinations accordingly and add
more Game Objects with the appropriate name to the configuration

(see
steps 11 to 13).


A Teleport Link in Jibe


©
ReactionGrid Inc. 2010

42

of
83

12 Mar 2011

Switching Scenes

There are two ways to change between scenes in Jibe. One is to use the UI
Base component to provide a
standard list of different scenes to switch between. The other option
is

to use the LoadNextLevel

script
to provide a portal for users to do the transition.

Load Next Level

1.

Add a cube to the scene (you ca
n alternatively choose a sphere or even an empty game
object, but choosing one with an initial visible appearance helps with setting up your
detectio
n system).

2.

Make the cube as big as the detection area you want to use for your proximity sensor

and position it accordingly:


Adding a Cube, Positioning and Scaling


©
ReactionGrid Inc. 2010

43

of
83

12 Mar 2011

3.

Highlight the cube in the Inspector and
check the box to disable

the Mesh Renderer
compone
nt

(this will make the box invisible, though you can show it again later if you
need to resize by re
-
enabling this component)
.

4.

Select the Box Collider component of the cube, and check the box to say "Is Trigger
"


Disabling

Mesh Renderer

a
nd Setting Trigger

5.

Add the LoadNextLevel.cs script from the RGScripts
-

Network section of your assets to
the cube by dragging it into the Cube.

6.

In the Inspector pane and set it up to point to the next space by entering the name of
the scene in the "Next L
evel" property.

7.

Set the GUISkin to be your jibeSkin

8.

Select your Network Controller Game Object from the picker dialog, or
drag a copy over
from the Scene.

9.

If you want the user to teleport immediately on entering the collider zone, check the
box for Instant

Teleport
.


©
ReactionGrid Inc. 2010

44

of
83

12 Mar 2011


Configuring the Load Next Level Script

10.

Change the text for the prompt to use to appropriate text. You can also show an image
on the button in the Level Image property.

11.

Now, when you walk into the area of

the trigger, your user will see the prompt on
screen to go to the next level
. If you checked the box for instant teleport, the prompt
will not display, you will immediately be taken to the next scene
.


©
ReactionGrid Inc. 2010

45

of
83

12 Mar 2011


Load Next Level Button Appearance

12.

To change the style of the prompt displayed on screen, you can edit the
PortalLinkButton skin style in the jibeSkin
:


Editing GUI Skin Details for Load Next Level Script


©
ReactionGrid Inc. 2010

46

of
83

12 Mar 2011

12. Once you have changed the skin, when you walk into the
appropriate location the next level button
will render in the style you choose:


New St
yle Button for Load Next Level
Script

Adding Sit Targets / Making Chairs Work

Included in your project is a sample CubeChair that demonstrates how chair functionality w
orks in Jibe
1.0. To add a sit target (or to make an object sittable) then you can try the following:

1.

Open your main Jibe scene (JibeBasic by default) and drag a
CubeChair

prefab from your Project
hierarchy. The prefab is stored in the
Objects

folder.


Si
t Target Configuration


©
ReactionGrid Inc. 2010

47

of
83

12 Mar 2011

2.

Position the object in the scene. Notice that when you look at the details for the cube in the
Inspector, the Box Collider component is set to “Is Trigger” (you can walk through the box)

3.

The Chair is tagged with the Tag of
SitTarget



any object with a collider can be tagged as a
SitTarget
. When your mouse hovers over the object, you will see your cursor change, and you
can left
-
click to sit.

4.

If you want your cube to be invisible, you can disable the
Mesh Renderer

component. This is
h
andy if you want to position the sit target precisely in a complex chair design, or in an object
like a bench (where you could position multiple sit targets). Once you have your sit targets in the
right place, you can make them invisible by disabling this
component.


Sitting on a Cube

5.

To see an example of sit targets in a bench, see how several cubes have been positioned in the
following example:


Multiple Sit Targets for an Object
-

Sitting on a Bench

6.

When the avatar is inworld, they will see the sit
cursor when they hover over those invisible
cubes.


©
ReactionGrid Inc. 2010

48

of
8
3

12 Mar 2011

Using the Presentation Screen System

The Presentation Screen system has two components. The first is the screen camera, which enables an
avatar to switch to a different camera when seated. The other part
enables different images to be
loaded onto a screen to deliver a slideshow from a library of images on the web. They can be used
independently of each other and repurposed as required.

Using a Screen Camera

While Sitting

Using the Screen Camera

makes it easier for the users to switch to a more static camera for a view of a
presentation screen, and toggle back to their normal player camera for looking around.

To use the screen camera, you need to do the f
ollowing:

1.

Expand your Project hierarchy, and locate the
Objects

folder.

2.

Drag a
PresentationScreen

prefab into the scene.

3.

Drag a
CubeChair

into the scene (or any other chair that has been conf
igured for sitting)

4.

Expand the
RGScripts

folder, and locate the Camera folder.

5.

Drag the
ChairController

script from t
he Camera folder into the chair.

6.

Select the
Screen Camera

property to the Screen Camera game object in the scene. Dragging
from the Scene
Hierarchy into the script is a good way to do this.

7.

Select the
jibeSkin

for the Gui Skin for the script.


Configuring a Chair for a Screen Camera


©
ReactionGrid Inc. 2010

49

of
83

12 Mar 2011

8.

Now select the
Screen Camera

Game Object and ensure that the Screen Camera script is
applied.

9.

Select the
Targ
et

of the Screen Camera object to be the
Presentation Screen



again, dragging
from the Scene Hierarchy into the script is a good way to do this.

10.

Disable the Camera component of the ScreenCamera by unchecking the box. Also, disable the
Audio Listener compo
nent.


Configuring a Screen Camera

11.

If all references are set, you should be able to run the game and see the screen camera button
appear in your HUD when you sit on the chair:


©
ReactionGrid Inc. 2010

50

of
83

12 Mar 2011


Switching Between Cameras While Seated

Configuring a Presentation Screen

When using a Presentation Screen, you have the option to read in images from a web url

and load them
onto the screen. There are two scripts involved in achieving this, though you also need a web
component to complete the system.



Get Data



sends a web request to a specific web page and expects a s
imple string in response.
The string it receives should be the name of an image, movie or audio clip. When a new slide has
been set on the web side, this value should change accordingly. If it is a new name, this
component will update the Web Texture compo
nent.



Web Texture



when called from the result of the Get Data poll for the name of a slide or media
object to display, this script looks in the target folder of the website for media with the given
name and
displays it on screen.

The web part of this solution should be a page with a server
-
side element that you can
access via a web
interface where you can specify images to choose. The Jibe
Mars

pack includes this functionality with a
nice web page UI where y
ou can select which slide to display inworld. Changing the selection in this UI
updates the system, so that each time the Get Data component inworld calls the data page on the web
server, it will reply with the currently
-
selected image:


©
ReactionGrid Inc. 2010

51

of
83

12 Mar 2011


Web Presentation
Control System

The configuration of the inworld scripts is
as follows:

Get Data

Set the DataUrl to the url to the page
providing the name of the current slide.

Set the timer interval, check the box to Run
on timer, and Force Update Screen

Web Texture

Ente
r the Server Url, which is the path to
the folder containing your images.

Set the
Screen Texture to an image you want to
use as a default, and ensure the Skin is set.
This should be all you need to set up your
slideshow.


©
ReactionGrid Inc. 2010

52

of
83

12 Mar 2011

Working with NPCs

(Non
-
Player Chara
cters)

Adding an NPC to the environment is quite simple
. An avatar is just an object within the Unity pr
oject
hierarchy. You can add a copy of the avatar model from the Avatars


Models folder and place it in the
environment. If you want to an
imate the avatar


say if you want to show the avatar sitting on a chair


use the Animate script from the RGScripts folder.


Adding and Configuring an NPC

When you run the environment, you will see the NPC performing the requested animation.


An NPC in
the Virtual World

Perhaps you may be building a personal training simulation, or perhaps you manufacture treadmills


either way, you may decide that an avatar running on the spot is exactly what you need.
Remotely
moving an avatar model is something that
will require additional scripting.


©
ReactionGrid Inc. 2010

53

of
83

12 Mar 2011

Travelling the JiWay

Visiting other Jibe worlds is now possible thanks to the introduction of the JiWay system for Jibe. To
travel to another world, you will walk up to a specific area, then

a menu will appear. Choose the
destination from the menu and the new Jibe world will load up.


JiWay GUI

Travelling to a different world

if you start in the web browser will cause you to leave your current wo
rld,
since your browser will navigate to the new world. Travelling to a different world from Standalone or
Editor will cause a new web browser instance to open. We recommend that you close out your original
world instance when you do this.

To create your o
wn JiWay portal
, you need a Game Object with a Collider set to be a trigger


similar to
the example of switching scenes (see Page
42
).

1.

Creat
e a new Game Object


a cube or sphere will do for an example, though any object will do.

2.

Ensure that the object has a physical collider. A Box collider will work great, check the box to set
the collider to be a trigger.

3.

Extend the trigger out from the Gam
e Object to an appropriate distance.

4.

Add the JiWay script to the object:


©
ReactionGrid Inc. 2010

54

of
83

12 Mar 2011


Configuring a Game Object to be a JiWay Portal

5.

Set the reference to the jibeGUI.

6.

Set the number of pictures, location URLs, Names and Descriptions to be the same for the total
numbe
r of destinations, for example, if you have four destination worlds in mind, set each of
these to 4.

7.

Add the appropriate pictures, urls, names and descriptions.

8.

Add a reference to the Network Controller Game Object.


©
ReactionGrid Inc. 2010

55

of
83

12 Mar 2011


JiWay Script Configuration

9.

Test out
your JiWay system inworld and visit the worlds you chose by walking into the range of
the collider on the configured Game Object.


Travelling the JiWay


©
ReactionGrid Inc. 2010

56

of
83

12 Mar 2011

Adding Vivox Voice

Functionality

If you have purchased
Vivox Voice functionality from ReactionGrid, you can add a voice channel to any
web
-
enabled scene. To do this:

1.

Create a new empty Game Object and call it VivoxHud

2.

Add the VivoxHud2

script to this object

3.

Add the references to the skin, Network Controller, and enter the channel you have been
provided for Vivox Voice support

4.

Drag this Game Object into the Jibe Game Object. If you want to make this feature available in
other rooms, yo
u may want to reconnect the prefab by clicking Apply to save changes.


Vivox Voice Game Object Configuration

If you have multiple rooms, you should request additional voice channels

so each room is on a separate
channel. Enter

the appropriate channel name for each room and when users transfer from one to the
next they will connect to the appropriate voice channel automatically.


©
ReactionGrid Inc. 2010

57

of
83

12 Mar 2011

Using Voice Functionality

Provided your server has the appropriate web scripts installed for Vivox Vo
ice support, you can log in to
your virtual world in the Web player to use Vivox voice.

All users who have voice functionality available will show in the room list in Yellow initially, then when
speaking their names will appear in Green.


Using Vivox in t
he Web Player

If the Vivox plugin is installed, a green icon

appears in the System tray. On a Mac, this icon will appear at
the top of the screen. Right
-
click on this icon to bring up the context menu to enable y
ou to unmute
your microphone:

Users who do not have Vivox installed
will have a link in the bottom corner
of their screen to install it. After
install, the browser should be
restarted.

For information on server
configuration, see
Adding Vivox Web
Support

on Page
66
.


©
ReactionGrid Inc. 2010

58

of
83

12 Mar 2011

Chapter 5


Advanced Customization

Once you have gained familiarity with the different aspects of the Jibe platform, you may want to take
things a bit further.
Multiplayer applications present an interesting challenge to anyone producing a
virtual world. For example, I log in to a virtual s
pace


you’re already in there. You need to know I have
arrived, you need to know where I am, and you need to know what my avatar looks like. When I walk,
you need to know I am both moving, and my avatar will appear to walk. Thankfully, the Jibe kit handle
s
all of the above, but what if you want to open a door?

If I open a door, my local instance of the virtual world will show a door opening. But in order for other
players to see a door open, I have two options. I could either send a message to all connecte
d clients to
say that the door is being opened, or I could track the individual positions of the elements comprising
the door and synchronize their positions with all players connected to the environment. Solution 1 will
be the lightest in terms of network

traffic, but may not be as accurate as solution 2. Solution 2 will incur
more network overhead, but will be more accurate.

You have the option to do both with your Jibe kit, and while there are benefits and issues with each
approach
, the Jibe platform aim
s to make it possible to extend your applications with a minimum of
fuss.

Jibe Code Hierarchy

The
design of Jibe is to make it possible to change which back
-
end server provides networking
functionality without any code changes required in your Jibe applica
tion, no matter how far you extend
it. We anticipate that some alternative platforms will offer extra functionality in future, hence the
following code architecture is in place:


©
ReactionGrid Inc. 2010

59

of
83

12 Mar 2011


Jibe Class Diagram

This class diagram is included in your Jibe project kit.

Overview of Network Controller

The Network Controller is the one and only script that should ever contact

the Jibe server. This is to
ensure that future server architectural changes will be as low impact on the rest of the Jibe platform as
possible.

Under
standing the Server Architecture

Each Jibe server implementation has a corresponding server communication script, for example
JibeSmartFox

or
JibePhoton
. These classes are not live U
nity scripts, hence they do not have Update or
GUI events, instead they receive events raised by the server platform, and raise events in Network
Controller that can be handled. For example, when a new player joins the room, the server will know
that the p
layer has connected and will raise an event. In the Jibe Server code, the
event will be received
and cause the
NewRemotePlayer

event to be raised. Network Controller handles this event, and will
spawn a new remote avatar model when
it is fired.

Each server implementation inherits from the
JibeServerBase

class. This class is an abstract class, and
implements some of the methods in the
IJibeServer

interface. The basic methods that are common t
o

©
ReactionGrid Inc. 2010

60

of
83

12 Mar 2011

all server platforms, including scheduling updates based on the configured data send/receive rate, and
working with the collection of Players in the scene.

The Jibe Players

The server will have a reference at all times to all the players it knows of. The
se players are instances of
IJibePlayer

objects, and each have an associated position, animation, and other properties common to
all players. The server also maintains a reference to the local player in the scene, and this
LocalPlayer

object is the constant reference to the main character in the scene