Community Place provides the ability to experience shared behaviors in multi-user worlds. In this tutorial we'll look at the Java library which makes this possible and discuss a couple of simple examples.

CP's Java library for remote procedure calls which allows implementation of shared behaviors is similar to that of RPC (remote procedure calls). That is, the computer on the other end of the connection actually makes a procedure call on your local computer. This means that now we need methods for both local operations and remote operations.

It is important to understand how the communication between clients is set up. All clients are equal in the eyes of the server, except for one which is designated as the "master". In general if there is only one client then that client is the master. Otherwise the "master" is a client chosen at random in the world. There can and must be only one master in a particular world. If the master leaves the world another master is chosen at random.

To share a node you must add some information in the VRML file.

Here are some of the common functions you will use from the RPC library. The formal definition is here.

Let's look at two examples of the use of the RPC library to create some of the typical shared behaviors.


Written by John D. DeCuir and Jai Natarajan