31
Cross-platform Game Development QuangHD OGDC 2013, HCM

Ogdc 2013 cross platform game development with html5

Embed Size (px)

Citation preview

Page 1: Ogdc 2013 cross platform game development with html5

Cross-platform Game Development

QuangHDOGDC 2013, HCM

Page 2: Ogdc 2013 cross platform game development with html5

Hello World!

Contact me: [email protected]

Follow us: facebook.com/camistudio

He’s me exactly!

Page 3: Ogdc 2013 cross platform game development with html5

HTML5, WTF?

I mean… What’s the fun?

Page 4: Ogdc 2013 cross platform game development with html5

HTML5, WTF?

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

New Javascript API

HTML5 = HTML + 5

Page 5: Ogdc 2013 cross platform game development with html5

HTML5, WTF?

What Canvas is

It’s my amazing game

Page 6: Ogdc 2013 cross platform game development with html5

Showcase

To beContinued

Page 7: Ogdc 2013 cross platform game development with html5

HTML5 – Why should?

HTML/JS is huge popular

I’m working on my 1000 th website

Page 8: Ogdc 2013 cross platform game development with html5

HTML5 – Why should?

Easy to train or recruit employees

I can do itMe too

Hire meNo

problemIt fits me

Page 9: Ogdc 2013 cross platform game development with html5

HTML5 – Why should?

Cross-platform

Checked! Checked!Checked! Checked!

Checked!

Page 10: Ogdc 2013 cross platform game development with html5

HTML5 – Why should?

Friendly development environment

I’m coding on my Text Editor

Page 11: Ogdc 2013 cross platform game development with html5

HTML5 – Why should?

Flexible UI system

May I join?

We work together!

Page 12: Ogdc 2013 cross platform game development with html5

HTML5 – Why not?

Performance

Catch me if you can!

Page 13: Ogdc 2013 cross platform game development with html5

HTML5 – Why not?

Community is new and quiet

Anybody here?

Page 14: Ogdc 2013 cross platform game development with html5

We’re here!

Page 15: Ogdc 2013 cross platform game development with html5

HTML5 – Why not?

3D is terrible

Unity!HTML5!

Page 16: Ogdc 2013 cross platform game development with html5

HTML5 – Why not?

Out-of-the-box

I’m waiting for the box update

Page 17: Ogdc 2013 cross platform game development with html5

• Game Engine:

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

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

NodeJS, Socket.IO…

Powerful Toys

Page 18: Ogdc 2013 cross platform game development with html5

Powerful Toys

FPS - Benchmark Report

Page 19: Ogdc 2013 cross platform game development with html5

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

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

Powerful Toys

Page 20: Ogdc 2013 cross platform game development with html5

Turn-base mobile game on HTML5

A true story

Page 21: Ogdc 2013 cross platform game development with html5

ImpactJS CocoonJS Venturesoom

What did we choose?

99$ Free No way to measure

Page 22: Ogdc 2013 cross platform game development with html5

• 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: Ogdc 2013 cross platform game development with html5

Memory Consumption

Large images/spritesheets loaded

Resolution: 1024x768

Format: PNG-8

Size: 916 bytes

In-Memory: 3MB!!!

(1024x768x4 bytes)

Page 24: Ogdc 2013 cross platform game development with html5

Memory Consumption

Wasted pixels

Resolution: 800x600

Format: PNG-8

Size: 619 bytes

In-Memory: 3MB!!!

(1024x768x4 bytes)

Wasted: 1.17MB

WTF?

Page 25: Ogdc 2013 cross platform game development with html5

Memory Consumption

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

Page 26: Ogdc 2013 cross platform game development with html5

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

Time to build

Page 27: Ogdc 2013 cross platform game development with html5

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

Time to build

Page 28: Ogdc 2013 cross platform game development with html5

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

Android & iOS & Chrome & Win Phone…

The Epic Victory

Page 29: Ogdc 2013 cross platform game development with html5

Advices

The world is moving to HTML5

Our Biggest Mistake Was Betting Too Much On HTML5

VS

Page 30: Ogdc 2013 cross platform game development with html5

The end

Page 31: Ogdc 2013 cross platform game development with html5

The game’s beginning…

Any question?