HTML5: The New UI Library For Games > Chad Austin > Technical - - PowerPoint PPT Presentation

html5 the new ui library for games
SMART_READER_LITE
LIVE PREVIEW

HTML5: The New UI Library For Games > Chad Austin > Technical - - PowerPoint PPT Presentation

HTML5: The New UI Library For Games > Chad Austin > Technical Director, IMVU HTML IS WINNING Browser wars are hotter than ever > Features like canvas, SVG, CSS3, becoming standard > GPU accelerated compositing &


slide-1
SLIDE 1

HTML5: The New UI Library For Games

> Chad Austin > Technical Director, IMVU

slide-2
SLIDE 2

HTML IS WINNING

slide-3
SLIDE 3
slide-4
SLIDE 4

Browser wars are hotter than ever

> Features like canvas, SVG, CSS3,

becoming standard

> GPU accelerated compositing &

rasterization

> Tracing JITs

slide-5
SLIDE 5

Terminology

> HTML = markup + CSS + JS + Canvas +

sockets + etc.

> Mozilla = Firefox = Gecko

slide-6
SLIDE 6

HISTORY OF IMVU’S UI

slide-7
SLIDE 7

2004-2007: C++ & OpenGL

slide-8
SLIDE 8

C++, GL, Win32

> Cons

> Hard to find talent > Hard to maintain > Long recompiles and iteration times > Inflexible

slide-9
SLIDE 9

2007-2009: Flash

slide-10
SLIDE 10

Flash, Flex

> Pros

> Able to iterate > Easy animation, video

> Cons

> High memory usage, address space leaks > Looong mxmlc compile times > Buggy

slide-11
SLIDE 11

2009+: HTML

slide-12
SLIDE 12

Pros!

> Very fast iteration > Matched intended design to the pixel > Performance was fantastic > Render to texture and composite in 3D

scene

slide-13
SLIDE 13

2009+: HTML

slide-14
SLIDE 14

2009+: HTML

slide-15
SLIDE 15

2009+: HTML

slide-16
SLIDE 16

BENEFITS OF HTML

slide-17
SLIDE 17

Lingua Franca

slide-18
SLIDE 18

Hot Reloading, Firebug

slide-19
SLIDE 19

jQuery, YUI

slide-20
SLIDE 20

Advertising

slide-21
SLIDE 21

DEMO

slide-22
SLIDE 22

PERFORMANCE?

slide-23
SLIDE 23

If your browser can handle this…

slide-24
SLIDE 24

Performance

> Not a bottleneck for us > Even 3D overlays! > <1 MB per Gecko document loaded

> 1000s of friends, inventory items

slide-25
SLIDE 25

Performance (Friends)

Some DOM ops are O(n), use b-tree

slide-26
SLIDE 26

Performance (Inventory)

Be careful to release image elements when scrolled out of view

slide-27
SLIDE 27

Today’s Drawbacks

> Elaborate animation still easier in Flash

than SVG/Canvas/JS

> 3D: WebGL not prime time yet > Tracing JITs hungrier than Lua/C++

slide-28
SLIDE 28

WHO ELSE USES HTML FOR UI?

slide-29
SLIDE 29

Wolfire – Overgrowth

slide-30
SLIDE 30

Wolfire – Overgrowth (con’t)

slide-31
SLIDE 31

Electronic Arts – Skate 3

slide-32
SLIDE 32

Netflix on PlayStation 3

slide-33
SLIDE 33

In-game Browsers

> Second Life > CCP – EVE Online > Funcom – Anarchy Online, Age of Conan > ArenaNet – Guild Wars 2

slide-34
SLIDE 34

Getting Started

> WebKit http://webkit.org/ vs. Gecko

https://developer.mozilla.org/en/Gecko

> We chose Gecko, most use WebKit (EA’s PS3

port: http://gpl.ea.com/skate3.html)

> Leverage entire stack: stream pixels from HTTP

into texture

slide-35
SLIDE 35

Wrappers

> http://ubrowser.com/ > http://wiki.secondlife.com/wiki/LlMozLib > http://wiki.secondlife.com/wiki/LLQtWebKit > http://www.khrona.com/products/awesomium/ > http://berkelium.org/

slide-36
SLIDE 36

Recap

> HTML and web technologies are

advancing quickly

> Already suitable for in-game UIs > Rapid development and iteration > Worked for us, may work for you!

slide-37
SLIDE 37

Questions?

chad@imvu.com http://engineering.imvu.com We’re hiring!