2012, the awakening of the vietnamese game development - presentation multi platform development-...

32

Upload: nhismxuf

Post on 16-Apr-2017

2.724 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 2012, the awakening of the Vietnamese Game Development - Presentation multi platform development- Mr. Nguyen Huu Phuoc. Gameloft
Page 2: 2012, the awakening of the Vietnamese Game Development - Presentation multi platform development- Mr. Nguyen Huu Phuoc. Gameloft

Who am I

Nguyen Huu Phuoc, Team Leader at Gameloft HAN studio

Love to exchange knowledge and passion. Had several seminars and trainings in Hanoi-Aptech, GameLoft, Universities.

Page 3: 2012, the awakening of the Vietnamese Game Development - Presentation multi platform development- Mr. Nguyen Huu Phuoc. Gameloft

Agenda

Gameloft IntroductionGameloft’s approach to Multi-

Platform developmentTips, tricks and examplesQuestions and Answers

Page 4: 2012, the awakening of the Vietnamese Game Development - Presentation multi platform development- Mr. Nguyen Huu Phuoc. Gameloft

Gameloft: Leading developer and publisher

Founded in 1999, to develop from mobiles & smart phones

to cross-platform digital distribution

MobileConsole

Iphone, Ipod, Ipad

Android

Page 5: 2012, the awakening of the Vietnamese Game Development - Presentation multi platform development- Mr. Nguyen Huu Phuoc. Gameloft

Gameloft: Leading developer and publisher

Presence in over 80 countries

Agreements with over 200 carriers

~400,000 games sold per day

Page 6: 2012, the awakening of the Vietnamese Game Development - Presentation multi platform development- Mr. Nguyen Huu Phuoc. Gameloft

Gameloft: Leading developer and publisher

5125 talented people

Production studios in 12 countries

Page 7: 2012, the awakening of the Vietnamese Game Development - Presentation multi platform development- Mr. Nguyen Huu Phuoc. Gameloft

New York, San Francisco, Seattle,

Montreal, Mexico, Buenos Aires, Paris,

London, Cologne, Milan, Madrid,

Copenhagen, Warsaw, New Delhi, Seoul,

Beijing, Hong Kong, Tokyo, Sydney...

The BIGGEST Gameloft Studio WorldwideMore than 1000 talented staff

Gameloft Vietnam is The BIGGEST Gameloft Studio Worldwide

More than 1700 talented staff

Page 8: 2012, the awakening of the Vietnamese Game Development - Presentation multi platform development- Mr. Nguyen Huu Phuoc. Gameloft

SAI 1e-Town 2 Building - 7Fl., 364 Cong Hoa, Tan Binh Dist., HCMC

SAI 218A Cong Hoa, Tan Binh Dist., HCMCSince Aug-2008

DAD74 Bach Dang, Hai Chau Dist., Danang CitySince Mar-2010

HAN3rd&4th floor – Lilama 10Le Van Luong, HanoiSince June-2011

Gameloft keeps on growing fast in Vietnam

Page 9: 2012, the awakening of the Vietnamese Game Development - Presentation multi platform development- Mr. Nguyen Huu Phuoc. Gameloft

Gameloft HAN Studio

Asphalt 6Kingdom and LordsFantasy TownDungeon Hunter 3Amazing Spiderman

Page 10: 2012, the awakening of the Vietnamese Game Development - Presentation multi platform development- Mr. Nguyen Huu Phuoc. Gameloft
Page 11: 2012, the awakening of the Vietnamese Game Development - Presentation multi platform development- Mr. Nguyen Huu Phuoc. Gameloft

Multi-platform developmentGameloft’s approach to

Page 12: 2012, the awakening of the Vietnamese Game Development - Presentation multi platform development- Mr. Nguyen Huu Phuoc. Gameloft

Our games are running on

iOSAndroidPS3Windows Phone 7badaWebOSJava embed….

Page 13: 2012, the awakening of the Vietnamese Game Development - Presentation multi platform development- Mr. Nguyen Huu Phuoc. Gameloft

Our games are running on

iOSAndroidPS3Windows Phone 7badaWebOSJava embed…

Page 14: 2012, the awakening of the Vietnamese Game Development - Presentation multi platform development- Mr. Nguyen Huu Phuoc. Gameloft

How could we accomplished that?

Page 15: 2012, the awakening of the Vietnamese Game Development - Presentation multi platform development- Mr. Nguyen Huu Phuoc. Gameloft

How could we accomplished that?Different codebases for each platform?

Page 16: 2012, the awakening of the Vietnamese Game Development - Presentation multi platform development- Mr. Nguyen Huu Phuoc. Gameloft

Different codebases for each platform?Yes.

Page 17: 2012, the awakening of the Vietnamese Game Development - Presentation multi platform development- Mr. Nguyen Huu Phuoc. Gameloft

Different codebases for each platform?Yes. And No

Page 18: 2012, the awakening of the Vietnamese Game Development - Presentation multi platform development- Mr. Nguyen Huu Phuoc. Gameloft

Android Game

Platform-

specific UI

Platform-

specific Feature

s

Platform API

Wrapper

iOS Game

Platform-

specific UI

Platform-

specific Feature

s

Platform API

Wrapper

Windows Game

Page 19: 2012, the awakening of the Vietnamese Game Development - Presentation multi platform development- Mr. Nguyen Huu Phuoc. Gameloft

Windows Game

Built with C++, contains almost everything:UI Design

Game-LogicGame Rendering

SoundMultiplayer

Page 20: 2012, the awakening of the Vietnamese Game Development - Presentation multi platform development- Mr. Nguyen Huu Phuoc. Gameloft

Windows Game

Platform API

Wrapper

Platform API

Wrapper

•Android NDK•Java wrapper: Activity, View, Intent, Receiver

•C++ auto-compat•UIWindow, UIViewController, UIView, UIApplicationDelegate

Android Game iOS Game

Page 21: 2012, the awakening of the Vietnamese Game Development - Presentation multi platform development- Mr. Nguyen Huu Phuoc. Gameloft

Windows Game

Platform-

specific Feature

s

Platform API

Wrapper

Platform-

specific Feature

s

Platform API

Wrapper

•Advertising•In-App Billing•Beam

•iAd•In-App Purchase•Music Player

Android Game iOS Game

Page 22: 2012, the awakening of the Vietnamese Game Development - Presentation multi platform development- Mr. Nguyen Huu Phuoc. Gameloft

Windows Game

Platform-

specific Feature

s

Platform API

Wrapper

Platform-

specific Feature

s

Platform API

Wrapper

•Push Notification toggle•Kindle Fire Volume•Color Correction

•iOS is normally the role-model

Platform-

specific UI

Platform-

specific UI

Android Game iOS Game

Page 23: 2012, the awakening of the Vietnamese Game Development - Presentation multi platform development- Mr. Nguyen Huu Phuoc. Gameloft

Android Game

Platform-

specific UI

Platform-

specific Feature

s

Platform API

Wrapper

iOS Game

Platform-

specific UI

Platform-

specific Feature

s

Platform API

Wrapper

Windows Game

PORTING

Page 24: 2012, the awakening of the Vietnamese Game Development - Presentation multi platform development- Mr. Nguyen Huu Phuoc. Gameloft

Advantages of Porting

Big common code base: less bugs, less maintainance effort, less human resource

Only the things that really platform-specific are needed to be separated

Page 25: 2012, the awakening of the Vietnamese Game Development - Presentation multi platform development- Mr. Nguyen Huu Phuoc. Gameloft

How?

We built:Our own 3D engines and libraries

(Networking, Sound, UI, Debugger…) which already support multi-platform

Online System to centralize the services: User profiles, Billing, Data downloading, Multi player….

Core Packages for general features in each platform

Page 26: 2012, the awakening of the Vietnamese Game Development - Presentation multi platform development- Mr. Nguyen Huu Phuoc. Gameloft

Tips and tricks

Try to build your game without a real device first

Graphics: Use OpenGL ES 2.0Don’t hard-code. Do things explicitly.

Have separated Configuration files. Prepare your data wiselyPreprocessing is not only for C++Keep an abstract macros/classes/library

of code that using platform-specific API or behave differently on each platform

Page 27: 2012, the awakening of the Vietnamese Game Development - Presentation multi platform development- Mr. Nguyen Huu Phuoc. Gameloft

Examples – Defines/Configuration#ifdef OS_ANDROID

#define KEYCODE_BACK (4)#define KEYCODE_UP (19)#define KEYCODE_DOWN (20)#define KEYCODE_LEFT (21)#define KEYCODE_RIGHT (22)

#elif defined(WIN32) #define KEYCODE_BACK (27)

#define KEYCODE_UP (38)#define KEYCODE_DOWN (40)#define KEYCODE_LEFT (37)#define KEYCODE_RIGHT (39)

#endif

Page 28: 2012, the awakening of the Vietnamese Game Development - Presentation multi platform development- Mr. Nguyen Huu Phuoc. Gameloft

Examples – simple macro#define PLATFORM_WIN32 1#define PLATFORM_ANDROID 2#define CONFIG_PLATFORM PLATFORM_WIN32#if CONFIG_PLATFORM==PLATFORM_ANDROID#include <android/log.h>#define Log(...) __android_log_print(ANDROID_LOG_INFO, “GLGame",__VA_ARGS__)

#elif CONFIG_PLATFORM==PLATFORM_WIN32#define Log(...) printf(__VA_ARGS__);printf("\n")

#else#define Log(...)

#endif

Page 29: 2012, the awakening of the Vietnamese Game Development - Presentation multi platform development- Mr. Nguyen Huu Phuoc. Gameloft

Examples – Abstract Libraryclass TouchScreenBase { ... }class TouchScreenMobile : public TouchScreenBase { ... }class TouchScreenWin32 : public TouchScreenBase{ ... }#ifdef OS_ANDROIDtypedef TouchScreen TouchScreenMobile

#elif defined(WIN32)typedef TouchScreen TouchScreenWin32

#endif

//Usage: Just use TouchScreen Class

Page 30: 2012, the awakening of the Vietnamese Game Development - Presentation multi platform development- Mr. Nguyen Huu Phuoc. Gameloft

Examples – Abstract Library (2)class TouchScreenBase { ... }class TouchScreenMobile : public TouchScreenBase { ... }class TouchScreenWin32 : public TouchScreenBase{ ... }

//Usage: Cast to TouchScreenBase Class#ifdef OS_ANDROID TouchScreenBase* TS = new TouchScreenMobile()

#elif defined(WIN32) TouchScreenBase* TS = new TouchScreenWin32()

#endif

Page 31: 2012, the awakening of the Vietnamese Game Development - Presentation multi platform development- Mr. Nguyen Huu Phuoc. Gameloft

plan ahead, not fix laterMulti-platform support

Page 32: 2012, the awakening of the Vietnamese Game Development - Presentation multi platform development- Mr. Nguyen Huu Phuoc. Gameloft

Questions and AnswersThanks for your attention! Contact me: [email protected]