Virtual Casino

The casino application is an example using the behavior server, the NetIv viewer and parts of the 'Studierstube' project. It consists of some java classes which must be uploaded to the behavior server and some inventor files defining a roulette, a roulette table and other things.

The virtual casino is:

How to start the Virtual Casino

How to start the Virtual Casino (Java running on NT)

Playing the Game

Use your PIP to check your financial situation.

Use the pen to make your bets.

Use your pen to run the roulette.

Watch your bets, your PIP and the bank.

Try to blow up the bank. The bank is unfair because there is no house limit even when the bank has not enough money.

Overview

The 'Virtual Casino' is a example application for the behavior server. Beside the behavior server the example uses the 'NetIv' application and parts of the 'Studierstube' project. 'NetIv' is an inventor viewer which is able to receive commands via UDP for modifying its inventor tree. Also the viewer is able to handle up to four HMDs. The tracker server of the 'Studierstube' project sends packets with positions and orientations via IP multicast. These packets are received by the 'TrakEngine' inventor object and a 'MulticastTracker' java class which must be uploaded to the behavior server.

The 'TrakEngine' inventor object of the 'Studierstube' project is used to track the HMDs, Pens and PIPs (PIP means Personal Interaction Panel and is simply a board).

The positions and button states of the pens are needed by java classes at the behavior server. Therefore a java class called 'MulticastTracker' receives the multicast packets and provides the information to the other classes.

The virtual casino is implemented as a set of java classes:

Behavior Classes

RouletteTable

This class maintains the stakes, the bank and the profits. It can be treated as a server.

Roulette

Handles the roulette, simulates the ball, controls the table.

MulticastTracker

Receives IP multicast packets from the tracker server and provides the information to other classes.

Player

The Player handles the pen and the PIP, it can make bets, run the roulette and get profits. The class maintains references to the instances of RouletteTable, Roulette and MulticastTracker

iv.IvBehavior

The classes RouletteTable, Roulette and Player are derived from this class. It provides functionality for communicating with the NetIv viewer, it implements the necessary protocol and provides a high level interface for manipulation the inventor tree in NetIv.

Assistant Classes

Coord

Used to store a 3D position.

Stake

Represents a stake on the table. This includes the type e.g. rouge, the position, the owner and other things.

JetonStack

Represent a stack of jetons, used for the stacks on the table, the bank and the stacks on the PIP of the player.


Related Topics