OGDC2013_ Cross platform game development with html5_ Mr Hoang Dinh Quang

31
Cross-platform Game Development QuangHD OGDC 2013, HCM

description

Presentation in OGDC 2013 organized by VNG Corp.

Transcript of OGDC2013_ Cross platform game development with html5_ Mr Hoang Dinh Quang

Page 1: OGDC2013_ Cross platform game development with html5_ Mr Hoang Dinh Quang

Cross-platform Game Development

QuangHDOGDC 2013, HCM

Page 2: OGDC2013_ Cross platform game development with html5_ Mr Hoang Dinh Quang

Hello World!

Contact me: [email protected]

Follow us: facebook.com/camistudio

He’s me exactly!

Page 3: OGDC2013_ Cross platform game development with html5_ Mr Hoang Dinh Quang

HTML5, WTF?

I mean… What’s the fun?

Page 4: OGDC2013_ Cross platform game development with html5_ Mr Hoang Dinh Quang

HTML5, WTF?

• Media• Web Socket• Local Storage• WebGL• Canvas

New Javascript API

HTML5 = HTML + 5

Page 5: OGDC2013_ Cross platform game development with html5_ Mr Hoang Dinh Quang

HTML5, WTF?

What Canvas is

It’s my amazing game

Page 6: OGDC2013_ Cross platform game development with html5_ Mr Hoang Dinh Quang

Showcase

To beContinued

Page 7: OGDC2013_ Cross platform game development with html5_ Mr Hoang Dinh Quang

HTML5 – Why should?

HTML/JS is huge popular

I’m working on my 1000 th website

Page 8: OGDC2013_ Cross platform game development with html5_ Mr Hoang Dinh Quang

HTML5 – Why should?

Easy to train or recruit employees

I can do itMe too

Hire meNo

problemIt fits me

Page 9: OGDC2013_ Cross platform game development with html5_ Mr Hoang Dinh Quang

HTML5 – Why should?

Cross-platform

Checked! Checked!Checked! Checked!

Checked!

Page 10: OGDC2013_ Cross platform game development with html5_ Mr Hoang Dinh Quang

HTML5 – Why should?

Friendly development environment

I’m coding on my Text Editor

Page 11: OGDC2013_ Cross platform game development with html5_ Mr Hoang Dinh Quang

HTML5 – Why should?

Flexible UI system

May I join?

We work together!

Page 12: OGDC2013_ Cross platform game development with html5_ Mr Hoang Dinh Quang

HTML5 – Why not?

Performance

Catch me if you can!

Page 13: OGDC2013_ Cross platform game development with html5_ Mr Hoang Dinh Quang

HTML5 – Why not?

Community is new and quiet

Anybody here?

Page 14: OGDC2013_ Cross platform game development with html5_ Mr Hoang Dinh Quang

We’re here!

Page 15: OGDC2013_ Cross platform game development with html5_ Mr Hoang Dinh Quang

HTML5 – Why not?

3D is terrible

Unity!HTML5!

Page 16: OGDC2013_ Cross platform game development with html5_ Mr Hoang Dinh Quang

HTML5 – Why not?

Out-of-the-box

I’m waiting for the box update

Page 17: OGDC2013_ Cross platform game development with html5_ Mr Hoang Dinh Quang

• Game Engine:

ImpactJS, Construct 2, CAAT… and 50 more• Toolkit:

CocoonJS, appMobi SDK, PhoneGap…• Server-side:

NodeJS, Socket.IO…

Powerful Toys

Page 18: OGDC2013_ Cross platform game development with html5_ Mr Hoang Dinh Quang

Powerful Toys

FPS - Benchmark Report

Page 19: OGDC2013_ Cross platform game development with html5_ Mr Hoang Dinh Quang

• Access Native APIs– Location – Notification– Camera, blah blah…

• Services– IAP (In-App-Purchase)– Social Network Integration– Ads Promotion, blah blah…

Powerful Toys

Page 20: OGDC2013_ Cross platform game development with html5_ Mr Hoang Dinh Quang

Turn-base mobile game on HTML5

A true story

Page 21: OGDC2013_ Cross platform game development with html5_ Mr Hoang Dinh Quang

ImpactJS CocoonJS Venturesoom

What did we choose?

99$ Free No way to measure

Page 22: OGDC2013_ Cross platform game development with html5_ Mr Hoang Dinh Quang

• Text, effects… Write more plugins• Screen Resolution Dev on middle ratio• Limited Engine Do more on canvas• RAM Consumption OMG (Oh My God!)

Problem/Solution

Page 23: OGDC2013_ Cross platform game development with html5_ Mr Hoang Dinh Quang

Memory Consumption

Large images/spritesheets loaded

Resolution: 1024x768

Format: PNG-8

Size: 916 bytes

In-Memory: 3MB!!!

(1024x768x4 bytes)

Page 24: OGDC2013_ Cross platform game development with html5_ Mr Hoang Dinh Quang

Memory Consumption

Wasted pixels

Resolution: 800x600

Format: PNG-8

Size: 619 bytes

In-Memory: 3MB!!!

(1024x768x4 bytes)

Wasted: 1.17MB

WTF?

Page 25: OGDC2013_ Cross platform game development with html5_ Mr Hoang Dinh Quang

Memory Consumption

• Solution:– Create Image atlas– Reuse image anytime– Do own Garbage Collector

Page 26: OGDC2013_ Cross platform game development with html5_ Mr Hoang Dinh Quang

• CocoonJS Cloud System Compiling– 1 minute action– Android & iOS & Tizen…– Ready to publish to App Store

Time to build

Page 27: OGDC2013_ Cross platform game development with html5_ Mr Hoang Dinh Quang

• Intel XDK Cloud System Compiling– 1 minute action– Android & iOS & Chrome & Win Phone…– Ready to publish to App Store

Time to build

Page 28: OGDC2013_ Cross platform game development with html5_ Mr Hoang Dinh Quang

• Working smooth in 60fps (avg).• Running on all popular platforms:

Android & iOS & Chrome & Win Phone…

The Epic Victory

Page 29: OGDC2013_ Cross platform game development with html5_ Mr Hoang Dinh Quang

Advices

The world is moving to HTML5

Our Biggest Mistake Was Betting Too Much On HTML5

VS

Page 30: OGDC2013_ Cross platform game development with html5_ Mr Hoang Dinh Quang

The end

Page 31: OGDC2013_ Cross platform game development with html5_ Mr Hoang Dinh Quang

The game’s beginning…

Any question?