This page explains how a virtual wireless network of game machines is created within the same copy of VCC.

Firstly, the VCC behaviour for one game machine must be stored in a symbol. This is shown in the following diagram. Click here for a larger view of the behaviour.

Now several instances of the game machine symbol can be created and connected together by their external ports. This forms the simulated wireless network, as shown below.

The net and lobby in and out ports of each machine are connected to every other machine on the network. This means that when a message is sent, it will go to every machine on the network. lobby_merger and net_merger blocks are used to merge the outputs from 2 machines.

In the final system, the game machines would be connected with a simulated Bluetooth wireless network, which is implemented by the Bluetooth module. However, this does not currently work with more than 2 machines. Note that although the machines are hard-wired together at present, the design is still flexible. If another machine is wired into the network, it will automatically appear in the lobby.

Each machine in the above picture is an instance of the same VCC symbol. However, each machine must have a unique name, which is used by the lobby when it builds the list of players. This is achieved by using a VCC parameter to give each machine a player name. The VCC parameter can be accessed by lower level blocks within the game machine symbol.


Copyright © 2002 Andrew Bates
Last Updated 15/04/02