digital chocolate java: write once, run everywhere – or how did it go again?

25
1 Digital Chocolate Java: write once, run everywhere – or how did it go again? December 2005 Valtteri Pirttilä, Technology Team Leader Digital Chocolate Ltd.

Upload: zanthe

Post on 05-Jan-2016

35 views

Category:

Documents


1 download

DESCRIPTION

Digital Chocolate Java: write once, run everywhere – or how did it go again?. December 2005 Valtteri Pirttilä, Technology Team Leader Digital Chocolate Ltd. Outline. Introduction Challenges Architecture Code. Digital Chocolate in Brief. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Digital Chocolate  Java: write once, run everywhere – or how did it go again?

1

Digital Chocolate

Java: write once, run everywhere – or how did it go again?

December 2005

Valtteri Pirttilä, Technology Team Leader

Digital Chocolate Ltd.

Page 2: Digital Chocolate  Java: write once, run everywhere – or how did it go again?

2

Outline

1) Introduction

2) Challenges

3) Architecture

4) Code

Page 3: Digital Chocolate  Java: write once, run everywhere – or how did it go again?

3

Digital Chocolate in Brief• Publisher of downloadable mobile games and

non-gaming lifestyle applications

• Founder and CEO Trip Hawkins, former CEO and Chairman of Electronic Arts

• Currently ~90 employees in Helsinki, Finland and ~60 in San Mateo, California

• Acquired leading European games publisher Sumea in June 2004

Page 4: Digital Chocolate  Java: write once, run everywhere – or how did it go again?

4

Global Distribution

Total 200 partners in 60 countries

Page 5: Digital Chocolate  Java: write once, run everywhere – or how did it go again?

5

Our strategy

• 100% focused on mobile

• Invest in product quality, not in property licenses

• Cornerstones of product strategy– Community– Quality– Innovation

Page 6: Digital Chocolate  Java: write once, run everywhere – or how did it go again?

6

Our Investment in Quality and Innovation Has Paid Off...

Page 7: Digital Chocolate  Java: write once, run everywhere – or how did it go again?

7

World’s #1 Reviewed Publisher• Only Publisher, worldwide, with 2 of Top 5 Reviewed Games on GameSpot (2/5 = 40%)• Only Publisher, worldwide, with 3 titles to earn 8

(out of 10) or better on GameSpot (3/12 = 25%)• Highest reviewed among all worldwide Publishers

for last 5 titles released• Less than 10% of 2005 GS 500+ reviewed games

will earn >8• Less than 1% of 2005 GS 500+ reviewed games

will earn >9

Source: GameSpot, Oct 2005, last 3 month

GameSpot Top 5 Rated

Source: GameSpot, as of Oct 2005

GameSpot Top Rated 2005Publisher Last Five Releases 2005 Average, YTD

1 Digital Chocolate 7.9 7.92 Jamdat 7.7 7.33 Gameloft 7.6 8.04 Glu 7.4 7.25 I-Play 7.2 6.76 Mforma 6.8 5.77 Elkware 6.3 6.98 Macrospace 6.2 6.6

Page 8: Digital Chocolate  Java: write once, run everywhere – or how did it go again?

8

Outline

1) Introduction

2) Challenges

3) Architecture

4) Code

Page 9: Digital Chocolate  Java: write once, run everywhere – or how did it go again?

9

Challenges in a Nutshell

Challenges are not just technical,

but also organizational !!

Page 10: Digital Chocolate  Java: write once, run everywhere – or how did it go again?

10

Screen Sizes

Small (96x65) Large (176x208)Medium (128x128) QVGA (240x320)

NOTE: Screenshots from ”Mafia Wars”, QVGA version created by scaling

• 10+ different screen resolutions

• ranging from 96x65 to 240x320 (pixels)

• Mostly active matrix, some old ones have passive matrices

Page 11: Digital Chocolate  Java: write once, run everywhere – or how did it go again?

11

Processing Power• Fastest CPU over 45

times more powerful than the slowest

• Screen size grows faster than CPU power Power-Per-Pixel currently reducing

Processing Power Screen Size

Page 12: Digital Chocolate  Java: write once, run everywhere – or how did it go again?

12

Handset Range• There are 300+ Java-enabled handsets

• High End developing faster than low end Handset range is growing

• To over-emphasize the point– Low end generates revenues

– High end generates publicity

• 100% device support is a MUSTEmerging markets

Established markets

Time

DeviceCapabilities

Nokia 6100

Page 13: Digital Chocolate  Java: write once, run everywhere – or how did it go again?

13

Example Case:Fantasy Warrior 2: Good

Low-End Version• ~8.5kB of graphics• 36 10x10 background tiles• 38 character animation frames• 32 item and effect frames

High-End Version• ~120kB of graphics• 330 17x17 background tiles• 144 character animation frames• 61 effect and image frames• Alpha transparency used• Mist effects

5 x more work !!

AND This is without QVGA !!

Page 14: Digital Chocolate  Java: write once, run everywhere – or how did it go again?

14

The Porting & QA Nightmare

Develop one game

Port to 100 handsets

Localize to 5 Languages

Build portfolio of 20 titles

Page 15: Digital Chocolate  Java: write once, run everywhere – or how did it go again?

15

Outline

1) Introduction

2) Challenges

3) Architecture

4) Code

Page 16: Digital Chocolate  Java: write once, run everywhere – or how did it go again?

16

Toolkit - Application Framework

APIs

Toolkit

Game

Device CharacteristicsChannel RequirementsLocalization

Page 17: Digital Chocolate  Java: write once, run everywhere – or how did it go again?

17

Localization

Lan gu ageB in aryFile

Game’s Sheet

Generic Sheet

Other sheetse.g. Hiscore API, Bluetooth API • One access point through which all text is

used

• Supports Multi-Language builds

• Supports component structure of framework

Game

LocalizationModule

Page 18: Digital Chocolate  Java: write once, run everywhere – or how did it go again?

18

Multi-Language & Multi-Handset Builds

1 SKU

• EFIGS as standard in one SKU– Except in 64k devices

• Example: 5 Languages & 4 Handsets– BEFORE: 20 SKUs

– NOW: 1 SKU

• Actual Numbers from average game– BEFORE: 210 SKUs

– NOW:

Support 160+ devices with 60 SKUs

Page 19: Digital Chocolate  Java: write once, run everywhere – or how did it go again?

19

Supporting APIs• Example: Sounds

– MIDI sounds• One API• implementations not working in exactly the same way

e.g. Looping, Pre-Loading, Re-Starting, ...

One standard API has to be used differently

– Other sounds formats: OTT, SPF, AMR, ...

• Same challenge with other APIs– e.g. Bluetooth, High Score / Community, Billing, ...

SPF OTT

MIDI #3

MIDI #2

MIDI #1

BT #3BT #2

BT #1

BT

Sounds

HS #3HS #2

HS #1

HS

Page 20: Digital Chocolate  Java: write once, run everywhere – or how did it go again?

20

Outline

1) Introduction

2) Challenges

3) Architecture

4) Code

Page 21: Digital Chocolate  Java: write once, run everywhere – or how did it go again?

21

Device Abstraction example:

Main profile name defaultParent profile >>>

DEFAULT_GRAPHICS_PROFILE mediumDEFAULT_SOUND_PROFILE MIDIint MENU_TITLEBAR_HEIGHT 20int MENU_SCREEN_ICON_WIDTH 18int MENU_SCREEN_ICON_HEIGHT 18int MENU_TEXT_BOX_HORIZONTAL_MARGIN 14int MENU_TEXT_BOX_VERTICAL_MARGIN 14int MENU_TEXT_BOX_TRANSPARENCY 255int MENU_HORIZONTAL_MARGIN 5int MENU_VERTICAL_MARGIN 5int MENU_SCROLL_END_HEIGHT 8int MENU_SCROLL_END_WIDTH 8int MENU_SCROLL_ARROW_HEIGHT 8int MENU_SCROLL_ARROW_WIDTH 8int MENU_HIGHEST_SCROLL_ICON 8int MENU_SOFTKEY_LABEL_AREA_HEIGHT 14boolean SOFTKEY_LABEL_ON_TOP FALSEint MENU_HIGHLIGHT_CENTERING_FIX 0boolean SUPPORTS_BACKLIGHT_CONTROL FALSE

Motorola_C550 Siemens_SX1 Htc_SDA

small large largeMIDI MIDI MIDI

22

66 0

TRUE FALSE FALSE

Page 22: Digital Chocolate  Java: write once, run everywhere – or how did it go again?

22

In code:

Page 23: Digital Chocolate  Java: write once, run everywhere – or how did it go again?

23

Why?

• The Statics are generated before compiling• Obfuscator drops unused code blocks, including methods

and classes

• High amount of configurations with a small jar

Page 24: Digital Chocolate  Java: write once, run everywhere – or how did it go again?

24

Localization

Page 25: Digital Chocolate  Java: write once, run everywhere – or how did it go again?

25

Digital ChocolateSeize The Minute.™

Digital Chocolate LtdItämerenkatu 5, FI-00180 Helsinki, FinlandFax +358 9 676 301 ▪