214 13.3DinaWebBrowser
probably ignore the high-level scene graph technologies that limit the game en-
gine to a predefined behavior, narrowing down our choice to JOGL. This wrap-
per library provides full access to the APIs in the specifications for OpenGL 1.3–
3.0, OpenGL 3.1 and later, OpenGL ES 1.x, and OpenGL ES 2.x, as well as near-
ly all vendor extensions. It is currently an independent open source project under
the BSD license [23]. Note that other similar bindings have also been created for
audio and GPU compute APIs—OpenAL (JOAL) and OpenCL (JOCL) are
available on the same web page as JOGL.
This is the choice made by the few game engines that have been built with
this technology, such as the jME, now in version 3 (jME3), that can run inside
the browser as an applet or launched in an external JVM application that can run
fullscreen. There are many applications taking advantage of OpenGL 3D acceler-
ation with Java on the web, but the jME is probably the only mature technology
available to make games with Java plus JOGL (see Figure 13.6).
Despite its long existence, its advanced technology providing 3D hardware
acceleration, and both its desktop and mobile availability, Java has had more suc-
cess as a language and framework to run on servers than it has on clients, and it
has had no real success in the game space. The confusion created by the Sun-
Microsoft dispute over the Java technology (which created incompatibilities), the
confusion as to which style of 3D graphics API to use, the perceived lack of sup-
Figure 13.7. JavaFX, a new language running inside a JVM language. (Image © 2010
Oracle Corporation.)
Desktop
Elements
CommonElements
Mobile
Elements
TV
Elements
Tools
Developer
Tools
Designer
Tools
JavaVirtualMachine
13.53DwithaGameEnginePlugIn 215
port for OpenGL on Windows, and the very poor support by integrated chipsets
[24] may have, until recently, caused a lot of damage to Java’s popularity. Java is
also handicapped by its 80 percent installed base (compared to 97 percent for
Flash [25]), vulnerabilities, large download size (
15 MB), and long startup
times.
The main issue seems to be the design of Java itself. It is very structured and
object-oriented but is not well suited for the creation of applications with intense
graphical user interfaces. Web programming requires more dynamic structures
and dynamic typing. Enter JavaFX [26], a completely new platform and language
(see Figure 13.7) that includes a declarative syntax for user interface develop-
ment. However, there is no clear path stated about when 3D will become part of
this new JVM technology, so JavaFX is not suitable for writing 3D games for the
web for the time being.
13.53DwithaGameEnginePlugIn
Extending a browser with a game engine plug-in is probably the best way to get
the optimum performance and features. But asking users to download a plug-in
for each game is not viable. So keeping the same philosophy that one plug-in can
run many applications, the game engine plug-in, once installed, can load and run
a specific game as a package containing the content and the game logic in the
scripting language(s) provided by the engine. Programming-wise, it is not much
different than creating a Flash game, but it has far superior performance because
all the functionality necessary for writing a game is provided through high-
performance libraries, including not only 3D hardware acceleration but also
components such as a terrain engine, a collision and physics engine, and an ani-
mation system. Also, a major difference in the Flash and Java solutions is that
game engines come with sophisticated editors and content pipelines, which re-
duce the efforts required of game developers a lot. Good tools are necessary for
cost-effective development.
The web is not (yet?) the place for AAA titles with long development cycles.
Therefore, having rapid prototyping tools becomes essential for developing 3D
games in a short period of time with a small budget. Developing for the web plat-
form also means developing games that run on the low end of the performance
scale, which is a problem for the type of experience associated with AAA pro-
ductions.
Because of the lack of interest in AAA titles in a browser, the small budget,
and the need to support low-end platforms, the traditional game engines (such as
Unreal and CryEngine) did not see a business for providing engines for the web
216
and mo
b
nies wit
h
and Shi
V
or nativ
e
iPad, A
n
in is al
w
are no r
upgrade
s
the mos
t
is in the
to be us
e
Res
p
offer as
s
gines de
d
and
p
er
f
which u
s
of ShiV
a
to serve
Wii), s
u
clear w
h
they bri
n
Figure
1
(
I
mage
©
b
ile platform
s
h
a new busi
n
V
a (see Figur
e
ly on Wind
o
n
droid, and P
a
w
ays free and
oyalties, the
r
s
to the profe
t
expensive v
same range
a
e
d in the gam
e
p
onding to t
h
s
et managem
e
d
icated to w
e
f
ormance. T
h
s
ed to mean
d
a
and Unity i
s
exclusively
t
u
ch as the re
c
h
ether they
w
n
g enough d
i
3.8. ShiVa E
d
©
2010 Stonetr
ip
s
. Therefore,
n
ess model t
o
e 13.8) are a
l
o
ws, Mac OS
a
lm. The bus
small in size
r
e is a comp
l
ssional full-
fe
ersion is wel
l
a
s a modelin
g
e
.
h
e game dev
e
nt serve
r
s a
n
e
b and mobil
e
h
ey give a
n
d
eveloping a
g
s
bringing ad
d
t
he console
g
c
ently annou
n
w
ill be able t
o
i
fferentiation
d
itor with on
e
ip
.)
the opportu
n
o
provide tho
s
l
ready power
i
, Linux, and
iness model
i
(Unity is 3.
1
l
etely free e
n
fe
atured versi
o
l
within the
b
g
tool that is
n
elopment te
a
n
d collaborat
i
e
developme
n
n
ew meanin
g
g
ame across
a
d
itional com
p
g
ame develop
n
ced Trinig
y
o
adopt the
s
to justify a
m
e
-click play b
u
n
ity was avai
l
se engines.
E
i
ng hundreds
mobile plat
fo
i
s adapted to
1
MB, and S
h
n
try-level or
o
ns cost less
b
udget of an
y
n
ecessary to
a
m needs, th
e
i
on tools. T
h
n
t is ease-of-
u
g
to cross-pl
a
ll the game
c
p
etition from
p
ers (Xbox 3
6
y
WebVision
s
ame low pri
m
ajor differ
e
u
tton. See htt
p
13.3Din
a
l
able for ne
w
E
ngines such
of games on
fo
rms such a
s
the market,
t
h
iVa is 700 k
B
learning edi
t
than $2,000.
y
game devel
o
create the 3
D
e
se two eng
i
h
e motto for
t
u
se, cost effec
l
atform deve
l
c
onsoles. Th
e
the engines
t
6
0, PlayStati
o
engine, but
ce model or
e
nce in price
.
p
://www.stone
t
a
WebBrows
e
w
compa-
as Unity
the web
s
iPhone,
t
he plug-
B
), there
t
ion, and
So even
o
per and
D
content
i
nes also
t
hese en-
tiveness,
l
opment,
e
success
t
hat used
o
n 3, and
it is not
whether
.
In fact,
t
rip.com/.
e
r
13.53DwithaGameEnginePlugIn 217
it could very well be the other way around, as ShiVa and Unity (both already on
Wii) could be made available for cross-console development in the future.
Regarding developing and delivering 3D games for the web, those two tech-
nologies today provide by far the best performance and quality compared to the
other technologies studied in this chapter. They also provide essential tools that
provide ease-of-use, real-time feedback, editing, and tuning that are mandatory
for the productivity demanded by short schedules and tight budgets in web de-
velopment. But they also enable deployment of the game outside of the web as
mobile phone and tablet native applications, as well as PC/Mac standalone appli-
cations. (However, PC/Mac versions of these engines do not offer the same level
of quality as PC-specific engines.) Except for the market-limiting fact that on the
web the user has to install a plug-in, the cross-platform aspect of those technolo-
gies is sometimes the only choice that makes sense when publishing a game on
both the web and mobile devices in order to grow potential revenues without
multiplying the development cost by the number of target platforms. As the ven-
dors of those engines are focusing on ease-of-use and are very responsive to
game developer needs, the results are quite astonishing in quality in terms of
what non-highly-specialized developers can do in a few weeks.
To maximize flexibility and performance, Unity is taking advantage of the
JIT compiler technology of .NET (Mono for cross-platform support) and provid-
ing support for three scripting languages: JavaScript, C#, and a dialect of Python.
ShiVa is using a fast version of Lua. Scripts are compiled to native code and,
therefore, run quite fast. Unity scripts can use the underlying .NET libraries,
which support databases, regular expressions, XML, file access and networking.
ShiVa provides compatibility with JavaScript (bidirectional interaction), PHP,
ASP, Java, etc., using XML (send, receive, and simple object access protocol).
Integration with Facebook is also possible, opening the door to the half-
billion customers in that social network. This is done though an integration with
Flash,
2
taking advantage of the fact that Flash is on 97 percent of the platforms
and available as supported content by most websites.
As a tip: don’t miss the Unity statistics page (see Figure 13.9) that provides
up-to-date information about what hardware platforms are being used. This pro-
vides a good indication of the range of performance and types of hardware used
to play 3D games in a browser. (Note that these statistics show that most web
game players have very limited GPUs and would not be able to run advanced
engines from Epic or Crytek.)
2
For example, see http://code.google.com/p/aquiris-u3dobject/.
218
13
Figure
1
webplay
e
.6Goog
l
In order
plug-ins
optimiz
e
eration
o
to creat
e
parsers.
applicat
i
Thi
s
ning na
t
neutralit
y
1
3.9. Unity
g
e
r/hardware-st
a
l
eNative
to enable lo
a
have to pro
v
e
d routines, a
o
n the GPU.
A
e
machine-ex
What if ther
e
i
ons that are
a
s
is the goal
o
t
ive code in
w
y
, operating
g
raphics card
a
ts.html. (
I
ma
g
Client
a
ding and ex
e
v
ide a safe e
n
n
d they hav
e
A
ll the techn
o
ecutable cod
e
e
was a way
t
a
lready comp
i
o
f Google Na
t
w
eb applicat
i
system porta
b
statistics for
g
e © 2010 Uni
t
e
cuting a ga
m
n
vironment i
e
to provide
a
o
logies we h
a
e
from both
b
t
o create a s
e
i
led into the
C
t
ive Client, a
n
ons, with th
e
b
ility, and s
a
Q2 2010.
S
t
y Technologi
e
m
e in a 3D e
n
i
n which to
e
a
ccess to gra
p
a
ve looked at
b
yte code (J
I
e
cure enviro
n
C
PU binary
fo
n
open-sourc
e
goal of ma
i
a
fety that pe
o
13.3Din
a
S
ee http://uni
t
e
s.)
n
vironmen
t
,
a
e
xecute code
p
hics hardwa
r
so far offer
a
I
T and VM)
n
men
t
in whi
c
fo
rmat?
e technolog
y
i
ntaining the
o
ple expect f
r
a
WebBrows
e
t
y3d.com/
a
ll of the
and call
r
e accel-
a
facility
and text
c
h to run
y
for run-
browser
r
om web
e
r
..................Content has been hidden....................

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