|
|
FUTURE vrml | games | consumer devices |
Last updated: April 1998
Java's Write-Once-Run-Anywhere philosophy gives new life to an old dream.
Visionaries imagine a time when it will possible to write code without ever
thinking of the underlying hardware, which will lead to a world of virtual objects mapped
onto real-life devices — smartcards, set-tops, toasters, potentially even
cars and factory machines. Furthermore objects may be represented graphically
using 3D rendering techniques, and it is already possible for people to interact with virtual
worlds
using VRML-enabled browsers. The coming xDSL bandwidth will make it easier for people to interact with these distant 3D worlds;
and with fast Java chips and JIT compilers it will be possible for
action computer games to be played as smoothly over
the Internet as if they were on the user's PC.
|
|
|
vrml The VRML (Virtual Reality Modelling Language) Standard was derived from SGI's Open Inventor Standard and has been heavily influenced by SGI and Sony ever since the first draft of the specification was made in late 1994. VRML 1.0, specified in 1995, allowed the user to do little to move around a virtual world and click on objects to go to URLs. In 1996 VRML 2.0 added interactivity by attaching scripts to objects. The current version is VRML97. A VRML world's description is called a scene graph and it is written in a file with the .wrl extension. Objects are called nodes, their attributes are called fields, and activities are called behaviors. Nodes are arranged hierachically — e.g. Finger is subordinate to Hand which is subordinate to Arm. There are two types of nodes: sensor nodes, which initiate events when the user interacts with the environment, and interpolation nodes, which change gradually over time — e.g. a door swinging shut. The fields (attributes) of a node have different degrees of accessibility, similar to the way Java data can be public, protected, or private. Fields in different nodes can influence each other once a connection is established with the ROUTE command. Events are scripted inside Script nodes using VRMLscript.
VRMLscript can be used to implement simple behaviors, but Java is necessary for more
complex systems. VRML's node-field-behaviour model works well with Java's
class structure. If an applet is included in a HTML file and a .wrl file containing
a scene graph is embedded in the same document then a VRML-enabled browser like SGI's
CosmoPlayer will be able to use the Java code in the virtual world of the VRML. The
three key packages used for Java VRML coding are java.vrml,
java.vrml.node, and java.vrml.field. RESOURCES The VRML Repository — a comprehensive list of links to VRML browsers, software development tools, and sounds, textures, and objects that can be used. Specifications from the VRML Consortium CosmoCode — Java IDE from SGI. |
|
|
games
Central to games programming is the idea of Movable Object Blocks (MOBs) which can
be moved around a scene. These are pictures which are loaded from files and controlled
by a graphics engine written in a language such as C++ or Java. When these
images are rendered they must not have any backgrounds of their own — fortunately
when Java loads images it retains all transparency information so characters can
be drawn cleanly against the game's own background. MOBs are typically stored in
chains which can be linked lists of characters and objects.
Disadvantages to games programming in Java at the present time are:
RESOURCES
Gamelan's list of Java games
|
|
|
consumer devices
Java's simplicity and strong security model make it a good choice not just for general
microcomputer programming but also for embedded systems — scaled down computer systems
tailored to particular electronic devices. Sun Microelectronics and JavaSoft (both
divisions of Sun Microsystems) have co-operated to create:
RESOURCES
Java
smart cards — a tutorial from JavaWorld December 1997
|