204 13.3DinaWebBrowser
A side effect of this divergence of goals is the creation of a gap in bridging
assets between content creation tools and game engines. X3D, as a publishing
format, was not designed to carry the information from the modeling tools and
content pipeline tools to the game. Other formats were proprietary to each model-
ing tool. Ten years after VRML was first introduced, Rémi Arnaud and Mark
Barnes from Sony Computer Entertainment proposed COLLADA [10, 11], also
based on XML, with the goal of providing a standard language for helping game
developers to build their content pipeline [12]. Its design goal is to stay away
from run-time definitions and, more specifically, from scene graphs. COLLADA
has gained significant momentum in many areas (being used by Google Earth,
Photoshop, game engine pipelines, modeling tool interchange, CAD, and 3D for
the web). More recently, the 3D modeling industry has gone through consolida-
tion, as Autodesk now owns 3DS Max, Maya, and XSI, representing a significant
market share in the games industry. Autodesk has made significant progress in
providing FBX, a proprietary library that is used for data interchange between
Autodesk tools, as well as interfacing with game engines.
What we can say from this short history is that a lot of energy has been ex-
pended by many clever people to attempt creating the universal high-level repre-
sentation of 3D data through various implementations of scene graphs, but all
have failed so far. Most efforts aimed to provide 3D on the web (VRML, X3D,
Java3D, OpenGL++, etc.) by standardizing a scene graph representation as the
universal 3D publishing format, with the thinking that what worked for 2D with
HTML should work for 3D as well. What we should learn from these two dec-
ades of effort is that it won’t happen because there are too many incompatible
goals. Even if restricted to one market segment—games—it is not even clear that
a universal game engine can be created covering all genres.
13.2FastForward
Fast forwarding to 2010, the landscape has changed significantly. There is now a
huge enticement to publish games over the internet, effectively targeting the web
as a platform. Revenues from online and mobile games currently generate about
a third of all game software revenues globally and are predicted to represent 50
percent of the market by 2015 [13]. Online games generate billions of dollars of
revenue in China and other Asian countries. The U.S. market is expected to hit
$2 billion by 2012. Social games, such as Zynga’s FarmVille, are on their way to
becoming a mass market phenomenon, with more than 60 million people playing
online (compared to half a billion people reported on Facebook).
13.2FastForward 205
This new business has evolved very fast, so fast that major game publishers
are having trouble adapting from a culture of management of mostly multimillion
dollar, multiyear-development AAA titles for game consoles to a very different
culture of low-budget games distributed and marketed primarily through social
networking. Some prominent game developers predict this current trend will
have a profound impact on the overall game industry business model [14]. The
video game industry has been through massive changes in the past, including a
crash in 1984. This time, the industry experts are not predicting a crash but a
massive shift that is poised to push more game publishing onto the web.
The need for superior interactive animated graphical content running in a
web page has been growing since the introduction of HTML. In 1997, Macrome-
dia (part of Adobe since April 2005) released Flash 1.0, commonly used to create
animations and advertisements, to integrate video into web pages such as
YouTube, and more recently, to develop rich internet applications (RIAs). Flash
is a growing set of technologies that includes an editing tool, a scripting language
closely related to JavaScript called ActionScript, a file format called
.swf, and a
browser plug-in available for many platforms.
In order to visualize Flash content, a plug-in needs to be installed by the cli-
ent in the web browser. In order to maximize their market reach, Macromedia
provided the plug-in for free and worked out several deals to ensure the plug-in
(a.k.a. Flash Player) came preinstalled on all computers. In 2001, 98% of web
browsers came preinstalled with the Flash player (mostly because market-
dominant Microsoft Internet Explorer included the Flash player), so that users
could directly visualize Flash content.
This created enough fertile ground for games to start spreading on the web,
and the term “Flash game” quickly became popular. Thousands of such games
exist today and can be found on aggregator sites such as addictinggames.com,
owned by Nickelodeon. Some games created with the first releases of Flash, such
as Adventure Quest (launched in 2002, see Figure 13.2), are still being updated
and are played by thousands.
Most of the games created with Flash are 2D or fake 3D since Flash does not
provide a 3D API. Still, there are several 3D engines, open source and commer-
cial, that have been developed in ActionScript and are used to create 3D games.
We look into this in more detail in Section 13.3.
Another technology created about at the same time as Flash, with the goal of
enhancing web development, is Java, first released in 1996. Java is a program-
ming language for which a virtual machine (VM) executes the program in a safe
environment regardless of the hardware platform and includes a just-in-time (JIT)
compiler that provides good performance. Unfortunately, Sun Microsystems did
206
Figure 1
Entertai
n
not enjo
y
rather t
h
case tha
t
3D har
d
Flash.
W
Still
as a bro
w
experie
n
tributio
n
load an
d
only via
b
eral ga
m
tion 13.
5
One
which a
also intr
o
ed in a
w
Rec
e
Apple
C
3.2.
A
dventur
e
n
ment, LL
C
.)
y
a good rela
t
h
an an enhan
c
t
a plug-in h
a
d
ware accele
r
W
e explore th
i
,
if a plug-in
w
ser plug-in
n
ce? There is
n
websites ha
v
d
install the
p
b
le technolo
g
m
e engines
a
5
.
way to deal
browser is e
o
duces a har
d
w
eb browser.
e
n
t
ly, HTM
L
C
EO Steve Jo
b
e
Ques
t
(Flas
h
t
ionship with
c
ement to M
i
a
d to be inst
a
r
ation and t
h
i
s technology
has to be do
w
in order to
p
a reduction i
n
v
e to agree t
o
p
lug-in, as w
e
g
y available
i
a
re available
with the plu
g
xtended, an
d
d
ware accele
r
This new tec
h
L
5 was push
e
b
s took a pu
b
h
). See http://
a
Microsoft, s
i
i
crosoft’s pr
o
a
lled. Unlike
F
h
erefore offe
r
in Section 1
3
w
nloaded, w
h
p
rovide the b
e
n
the address
a
o
support the
t
e
ll as agree t
o
i
mmediately
t
as plug-ins,
g
-in situatio
n
that is what
r
ated graphic
s
h
nology is e
x
e
d to the fro
n
b
lic stand ab
o
a
qworlds.com/
i
nce they sa
w
o
ducts [15],
a
Flash, Java
d
r
s much bet
t
3
.4.
h
y not packa
g
e
st possible
p
a
ble market
b
technology,
a
o the license
t
o enable the
and these a
r
n
is to impro
v
Google Nat
i
s API secure
x
plored in Se
c
n
t of the sce
n
o
ut why he d
o
13.3Din
a
/
. (
I
mage © 2
0
w
Java as a co
a
nd it was us
u
d
oes offer bi
n
t
er performa
n
g
e a real ga
m
p
erformance
b
ecause the g
a
nd the user
t
, but this m
a
3D experie
n
a
re discussed
v
e the mech
a
i
ve Client is
enough to b
e
c
tion 13.6.
n
e, specifica
l
o
esn’t allow
F
a
WebBrows
e
0
10 Artix
mpetitor
u
ally the
n
dings to
n
ce than
m
e engine
and user
ame dis-
t
o down-
a
y be the
n
ce. Sev-
in Sec-
a
nism by
about. It
e
includ-
l
ly when
F
lash on
e
r
13.33DwithFlash 207
Apple’s mobile platforms [16] and instead pushed for either native applications
or HTML5 technologies. The HTML5 suite of standards is not yet published, but
some portions are considered stable, such as the Canvas 3D API, which provides
graphics hardware acceleration to JavaScript. Canvas 3D is now implemented as
the WebGL API [17], a standard developed by the Khronos Group, and is a close
adaptation of OpenGL ES (another Khronos Group standard) available for mo-
bile phones (such as iPhone/iPad, Android, etc.). The Khronos Group is also the
home of the COLLADA standard, which, coupled with WebGL, provides a
standard solution for both content and an API for 3D on the web [18]. At the time
of this writing, WebGL has not yet been released to the general public, but we
describe it in Section 13.7.
13.33DwithFlash
The main benefits of using Flash are that it’s preinstalled (so it does not require
the user to install anything), it is supported by the main outlets that reach cus-
tomers (e.g., Facebook), it comes with professional creation tools (a Flash editor
and Adobe AIR for running and testing locally), and there are tons of developers
well-trained in ActionScript. The main issue is its performance, since the 3D ren-
dering is done in ActionScript running on the CPU. Flash does not provide access
to 3D hardware acceleration.
There are several available libraries that provide 3D with Flash:
Papervision3D. Carlos Ulloa [19] started this project in December 2005. He
had been programming 3D in software for games in the old times of Atari
and Amiga, and he decided to reuse the same technology to provide 3D in
Flash. By the end of 2006, Papervision3D was open-sourced. The library
evolved from Flash 7 through 10 and is now in version 2.1, available at
http://code.google.com/p/papervision3d/.
Sandy3D. This project was started by Thomas Pfeiffer in October 2005 and is
now open-sourced. It can be downloaded in version 3.1.2 at http://www.
Flashsandy.org/download.
Away3D. Away3D started as a reorganization of the Papervision3D code for
better performance. Now in version 3.5.0, available at http://away3d.com/
downloads, it is its own codebase. There is also a “lite” version that is only
25 kilobytes in size for faster download. One remarkable difference is the
availability of a tool called PreFab3D (see Figure 13.3), the “missing link”
between designers, modelers, and Flash 3D developers. This tool enables
nonprogrammers to optimize the data for 3D in Flash. For example, the tool
208
Figure
1
prefab/. (
I
can
b
gon
ing
t
Alte
r
wit
h
co
m
The
y
stra
t
All
o
vide tut
o
of 3D a
s
are relat
e
native 3
D
features
1
At the t
i
tions for
munity,
b
1
3.3. PreFab3
D
I
mage © Fab
r
b
ake lights a
n
models with
t
echniques.
r
nativa3D.
T
h
support for
m
mercial pro
d
y
offer a mul
t
ion of the ca
p
o
f these proj
e
o
rials, sampl
e
s
sets using C
O
e
d to the per
f
D
hardware
a
that are use
d
i
me of this wr
i
performance
a
b
ut this is not
a
D
, an Adobe
A
r
ice Closie
r
.)
n
d shadows i
n
ormal maps
T
his compan
y
m
ultiuser re
a
d
uct, now in
t
iplayer tank
p
abilities of t
h
e
cts have a v
e
e
s, document
a
O
LLADA a
n
f
ormance of t
h
a
cceleration.
F
d
to accelera
t
i
ting, Away3
D
a
nd features b
e
a
measure of f
u
A
IR tool for
n
to textures
u
, refine UV
m
y
develops a
n
a
l-time conne
version 5.6.
battle game
(
h
eir engine.
e
ry active de
v
a
tion, and bo
n
d 3DS Max
h
e virtual ma
F
lash 10 intr
o
t
e compositi
o
D
and Alternati
v
e
cause they h
a
u
ture
p
erforma
n
Away3D. Se
e
u
sing ray tra
c
m
apping, and
n
d licenses a
ction of clie
n
0, is aimed
(
see Figure 1
v
eloper com
m
oks [20, 21].
formats. The
a
chine, which
o
duced some
o
n and rende
r
v
a3D are curr
e
a
ve a more ac
n
ce.
13.3Din
a
e
http://www.
c
c
ing, create l
o
apply real-ti
m
3D engine
f
n
ts and playe
r
at game de
v
3.4) as a liv
e
m
unity,
1
and
t
They enabl
e
engine’s ca
p
does not pro
v
hardware-ac
c
r
ing on a 2D
e
ntly the prefe
r
tive develop
m
a
WebBrows
e
c
losier.nl/
o
w poly-
m
e shad-
f
or Flash
r
s. Their
v
elopers.
e
demon-
t
hey p
r
o-
e
loading
p
abilities
vide any
c
elerated
surface.
r
red solu-
m
ent com-
e
r
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset