SlideShare ist ein Scribd-Unternehmen logo
1 von 32
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.
Agenda
 Gameloft Introduction
 Gameloft’s approach to Multi-Platform
  development
 Tips, tricks and examples
 Questions and Answers
Gameloft: Leading developer and publisher

                Founded in 1999,
    to develop from mobiles & smart phones
      to cross-platform digital distribution




    Iphone, Ipod,                           Android
        Ipad


               Mobile
                                   Console
Gameloft: Leading developer and publisher




  Presence in over 80 countries

Agreements with over 200 carriers

  ~400,000 games sold per day
Gameloft: Leading developer and publisher




Production studios in 12 countries

      5125 talented people
Gameloft Vietnam is The BIGGEST Gameloft Studio
                   Worldwide
     The BIGGEST 1700 talented staffWorldwide
          More than Gameloft Studio
      More than 1000 talented staff
Gameloft keeps on growing fast in Vietnam




SAI 1                 SAI 2               DAD                  HAN
e-Town 2 Building -   18A Cong Hoa, Tan   74 Bach Dang, Hai    3rd&4th floor –
7Fl., 364 Cong        Binh Dist., HCMC    Chau Dist., Danang   Lilama 10
Hoa, Tan Binh         Since Aug-2008      City                 Le Van Luong, Hanoi
Dist., HCMC                               Since Mar-2010       Since June-2011
Gameloft HAN Studio
 Asphalt 6
 Kingdom and Lords
 Fantasy Town
 Dungeon Hunter 3
 Amazing Spiderman
Multi-platform to
Gameloft’s approach
development
Our games are running on
 iOS
 Android
 PS3
 Windows Phone 7
 bada
 WebOS
 Java embed
 ….
Our games are running on
 iOS
 Android
 PS3
 Windows Phone 7
 bada
 WebOS
 Java embed
…
How could we accomplished that?
How could we accomplished that?
Different codebases for each platform?
Different codebases for each platform?
Yes.
Different codebases for each platform?
Yes. And No 
Windows Game




                Platform                                  Platform
Platform-         API                     Platform-         API
 specific       Wrapper                    specific       Wrapper
Features                                  Features

            Platform-                                 Platform-
             specific                                  specific
               UI                                        UI




  Android Game                            iOS Game
Windows Game



Built with C++, contains almost everything:
                  UI Design
                 Game-Logic
              Game Rendering
                   Sound
                 Multiplayer
                      …
Windows Game


Android Game                           iOS Game


             Platform                         Platform
               API                              API
             Wrapper                          Wrapper



•Android NDK                     •C++ auto-compat
•Java wrapper: Activity,         •UIWindow, UIViewController,
View, Intent, Receiver
                                 UIView, UIApplicationDelegat
                                 e
Windows Game


 Android Game                                  iOS Game


                  Platform                              Platform
    Platform-       API                     Platform-     API
     specific     Wrapper                    specific   Wrapper
    Features                                Features



•Advertising                        •iAd
•In-App Billing                     •In-App Purchase
•Beam                               •Music Player
Windows Game


Android Game                                  iOS Game


                 Platform                                  Platform
 Platform-         API                     Platform-         API
  specific       Wrapper                    specific       Wrapper
 Features                                  Features

             Platform-                                 Platform-
              specific                                  specific
                UI                                        UI


 •Push Notification toggle         •iOS is normally the role-
 •Kindle Fire Volume               model
 •Color Correction
Windows Game




                Platform                                  Platform
Platform-         API                     Platform-         API
 specific       Wrapper                    specific       Wrapper
Features                                  Features

            Platform-                                 Platform-
             specific                                  specific
               UI                                        UI




  Android Game                            iOS Game
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
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
Tips and tricks
 Try to build your game without a real device
  first
 Graphics: Use OpenGL ES 2.0
 Don’t hard-code. Do things explicitly. Have
  separated Configuration files.
 Prepare your data wisely
 Preprocessing is not only for C++
 Keep an abstract macros/classes/library of
  code that using platform-specific API or
  behave differently on each platform
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
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
Examples – Abstract Library
class TouchScreenBase { ... }
class TouchScreenMobile : public TouchScreenBase
{ ... }
class TouchScreenWin32 : public TouchScreenBase
{ ... }
#ifdef OS_ANDROID
  typedef TouchScreen TouchScreenMobile
#elif defined(WIN32)
  typedef TouchScreen TouchScreenWin32
#endif

//Usage: Just use TouchScreen Class
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
Multi-platform support
plan ahead, not fix later
Questions and Answers
Thanks for your attention! Contact me:
phuoc.nguyenhuu2@gameloft.com

Weitere ähnliche Inhalte

Was ist angesagt?

Skillset job roles_in_the_games_industry
Skillset job roles_in_the_games_industrySkillset job roles_in_the_games_industry
Skillset job roles_in_the_games_industryGladeatorkid
 
Fundamental of game design creativityand learning
Fundamental of  game design  creativityand learningFundamental of  game design  creativityand learning
Fundamental of game design creativityand learningkrishn verma
 
06. Game Architecture
06. Game Architecture06. Game Architecture
06. Game ArchitectureAmin Babadi
 
Design phase of game development of unity 2d game
Design phase of game development of unity 2d game Design phase of game development of unity 2d game
Design phase of game development of unity 2d game Muhammad Maaz Irfan
 
Introduction to Game Development
Introduction to Game DevelopmentIntroduction to Game Development
Introduction to Game DevelopmentSumit Jain
 
Roles in the gaming industry
Roles in the gaming industryRoles in the gaming industry
Roles in the gaming industrymissstevenson01
 
Game development program
Game development programGame development program
Game development programkrishn verma
 
Final Year Game Project Presentation
Final Year Game Project Presentation Final Year Game Project Presentation
Final Year Game Project Presentation Nusrat Jahan Shanta
 
Project presentation FPS
Project presentation FPSProject presentation FPS
Project presentation FPSShubham Rajput
 
Final year project presentation
Final year project presentationFinal year project presentation
Final year project presentationSulemanAliMalik
 
Jongwingsmobilegamedevelopment
JongwingsmobilegamedevelopmentJongwingsmobilegamedevelopment
JongwingsmobilegamedevelopmentJongwings
 
Introduction to Game Development
Introduction to Game DevelopmentIntroduction to Game Development
Introduction to Game DevelopmentShaan Alam
 
Aft713 fundamental of game design 1.2
Aft713 fundamental of game design 1.2Aft713 fundamental of game design 1.2
Aft713 fundamental of game design 1.2krishn verma
 
Game development life cycle
Game development life cycleGame development life cycle
Game development life cycleSarah Alazab
 
Introduction to android (and mobile) game development
Introduction to android (and mobile) game developmentIntroduction to android (and mobile) game development
Introduction to android (and mobile) game developmentRuslan Novikov
 

Was ist angesagt? (20)

Game development in android
Game development in androidGame development in android
Game development in android
 
Skillset job roles_in_the_games_industry
Skillset job roles_in_the_games_industrySkillset job roles_in_the_games_industry
Skillset job roles_in_the_games_industry
 
Fundamental of game design creativityand learning
Fundamental of  game design  creativityand learningFundamental of  game design  creativityand learning
Fundamental of game design creativityand learning
 
06. Game Architecture
06. Game Architecture06. Game Architecture
06. Game Architecture
 
Design phase of game development of unity 2d game
Design phase of game development of unity 2d game Design phase of game development of unity 2d game
Design phase of game development of unity 2d game
 
Mobile games
Mobile gamesMobile games
Mobile games
 
Introduction to Game Development
Introduction to Game DevelopmentIntroduction to Game Development
Introduction to Game Development
 
Indie Game Development Intro
Indie Game Development IntroIndie Game Development Intro
Indie Game Development Intro
 
Roles in the gaming industry
Roles in the gaming industryRoles in the gaming industry
Roles in the gaming industry
 
Game development program
Game development programGame development program
Game development program
 
Final Year Game Project Presentation
Final Year Game Project Presentation Final Year Game Project Presentation
Final Year Game Project Presentation
 
Project presentation FPS
Project presentation FPSProject presentation FPS
Project presentation FPS
 
Final year project presentation
Final year project presentationFinal year project presentation
Final year project presentation
 
Jongwingsmobilegamedevelopment
JongwingsmobilegamedevelopmentJongwingsmobilegamedevelopment
Jongwingsmobilegamedevelopment
 
Introduction to Game Development
Introduction to Game DevelopmentIntroduction to Game Development
Introduction to Game Development
 
Game Design
Game DesignGame Design
Game Design
 
Aft713 fundamental of game design 1.2
Aft713 fundamental of game design 1.2Aft713 fundamental of game design 1.2
Aft713 fundamental of game design 1.2
 
Game development life cycle
Game development life cycleGame development life cycle
Game development life cycle
 
Mini Project- Game Hardware Development
Mini Project- Game Hardware DevelopmentMini Project- Game Hardware Development
Mini Project- Game Hardware Development
 
Introduction to android (and mobile) game development
Introduction to android (and mobile) game developmentIntroduction to android (and mobile) game development
Introduction to android (and mobile) game development
 

Ähnlich wie 2012, the awakening of the Vietnamese Game Development - Presentation multi platform development- Mr. Nguyen Huu Phuoc. Gameloft

android mario project
android mario projectandroid mario project
android mario projectkanika kapoor
 
Socialize and Gaming on the move
Socialize and Gaming on the moveSocialize and Gaming on the move
Socialize and Gaming on the moveRIA RUI Society
 
Road to Success (July 1st) - Mobile Game Development Alternatives - Andrew Bu...
Road to Success (July 1st) - Mobile Game Development Alternatives - Andrew Bu...Road to Success (July 1st) - Mobile Game Development Alternatives - Andrew Bu...
Road to Success (July 1st) - Mobile Game Development Alternatives - Andrew Bu...SanaChoudary
 
Visual Studio 2015: novità per gli sviluppatori iOS, Android e Cross-Platform
Visual Studio 2015: novità per gli sviluppatori iOS, Android e Cross-PlatformVisual Studio 2015: novità per gli sviluppatori iOS, Android e Cross-Platform
Visual Studio 2015: novità per gli sviluppatori iOS, Android e Cross-PlatformStefano Ottaviani
 
Game design & development
Game design & developmentGame design & development
Game design & developmentHemanth Sharma
 
Разработка мобильных приложений с помощью CORONA SDK. Антон Руткевич - CTO, ...
Разработка мобильных приложений с помощью CORONA SDK.  Антон Руткевич - CTO, ...Разработка мобильных приложений с помощью CORONA SDK.  Антон Руткевич - CTO, ...
Разработка мобильных приложений с помощью CORONA SDK. Антон Руткевич - CTO, ...Anthony Marchenko
 
HTML5 Games Status and issues
HTML5 Games Status and issuesHTML5 Games Status and issues
HTML5 Games Status and issuesJ.h. Liu
 
Mono for Android... for Google Devs
Mono for Android... for Google DevsMono for Android... for Google Devs
Mono for Android... for Google DevsCraig Dunn
 
Week Five - Software
Week Five - SoftwareWeek Five - Software
Week Five - Softwarechriswalton
 
Developing Applications on iOS
Developing Applications on iOSDeveloping Applications on iOS
Developing Applications on iOSFrancisco Ramos
 
I os dev_insights
I os dev_insightsI os dev_insights
I os dev_insightsMarkus Kopf
 
Mobile Game Development using Adobe Flash
Mobile Game Development using Adobe FlashMobile Game Development using Adobe Flash
Mobile Game Development using Adobe Flashchall3ng3r
 
콘텐츠 플랫폼 구조 분석
콘텐츠 플랫폼 구조 분석콘텐츠 플랫폼 구조 분석
콘텐츠 플랫폼 구조 분석Jaehyeuk Oh
 
Synapseindia android app programming
Synapseindia android app programmingSynapseindia android app programming
Synapseindia android app programmingTarunsingh198
 
[Srijan Wednesday Webinars] Building Full-Fledged Native Apps Using RubyMotion
[Srijan Wednesday Webinars] Building Full-Fledged Native Apps Using RubyMotion[Srijan Wednesday Webinars] Building Full-Fledged Native Apps Using RubyMotion
[Srijan Wednesday Webinars] Building Full-Fledged Native Apps Using RubyMotionSrijan Technologies
 
Game software development trends presentation
Game software development trends   presentationGame software development trends   presentation
Game software development trends presentation_veronika_
 
Delta Engine @ CeBit 2011
Delta Engine @ CeBit 2011Delta Engine @ CeBit 2011
Delta Engine @ CeBit 2011Karsten Wysk
 
iOS Game Development: When Cocoa Met Cocos...
iOS Game Development: When Cocoa Met Cocos...iOS Game Development: When Cocoa Met Cocos...
iOS Game Development: When Cocoa Met Cocos...Joseph Ku
 

Ähnlich wie 2012, the awakening of the Vietnamese Game Development - Presentation multi platform development- Mr. Nguyen Huu Phuoc. Gameloft (20)

android mario project
android mario projectandroid mario project
android mario project
 
Socialize and Gaming on the move
Socialize and Gaming on the moveSocialize and Gaming on the move
Socialize and Gaming on the move
 
Road to Success (July 1st) - Mobile Game Development Alternatives - Andrew Bu...
Road to Success (July 1st) - Mobile Game Development Alternatives - Andrew Bu...Road to Success (July 1st) - Mobile Game Development Alternatives - Andrew Bu...
Road to Success (July 1st) - Mobile Game Development Alternatives - Andrew Bu...
 
Visual Studio 2015: novità per gli sviluppatori iOS, Android e Cross-Platform
Visual Studio 2015: novità per gli sviluppatori iOS, Android e Cross-PlatformVisual Studio 2015: novità per gli sviluppatori iOS, Android e Cross-Platform
Visual Studio 2015: novità per gli sviluppatori iOS, Android e Cross-Platform
 
Game design & development
Game design & developmentGame design & development
Game design & development
 
Разработка мобильных приложений с помощью CORONA SDK. Антон Руткевич - CTO, ...
Разработка мобильных приложений с помощью CORONA SDK.  Антон Руткевич - CTO, ...Разработка мобильных приложений с помощью CORONA SDK.  Антон Руткевич - CTO, ...
Разработка мобильных приложений с помощью CORONA SDK. Антон Руткевич - CTO, ...
 
HTML5 Games Status and issues
HTML5 Games Status and issuesHTML5 Games Status and issues
HTML5 Games Status and issues
 
Mono for Android... for Google Devs
Mono for Android... for Google DevsMono for Android... for Google Devs
Mono for Android... for Google Devs
 
LO1 - Lesson 6 - Software
LO1 - Lesson 6 - SoftwareLO1 - Lesson 6 - Software
LO1 - Lesson 6 - Software
 
Week Five - Software
Week Five - SoftwareWeek Five - Software
Week Five - Software
 
Developing Applications on iOS
Developing Applications on iOSDeveloping Applications on iOS
Developing Applications on iOS
 
Android Mp3 Player
Android Mp3 PlayerAndroid Mp3 Player
Android Mp3 Player
 
I os dev_insights
I os dev_insightsI os dev_insights
I os dev_insights
 
Mobile Game Development using Adobe Flash
Mobile Game Development using Adobe FlashMobile Game Development using Adobe Flash
Mobile Game Development using Adobe Flash
 
콘텐츠 플랫폼 구조 분석
콘텐츠 플랫폼 구조 분석콘텐츠 플랫폼 구조 분석
콘텐츠 플랫폼 구조 분석
 
Synapseindia android app programming
Synapseindia android app programmingSynapseindia android app programming
Synapseindia android app programming
 
[Srijan Wednesday Webinars] Building Full-Fledged Native Apps Using RubyMotion
[Srijan Wednesday Webinars] Building Full-Fledged Native Apps Using RubyMotion[Srijan Wednesday Webinars] Building Full-Fledged Native Apps Using RubyMotion
[Srijan Wednesday Webinars] Building Full-Fledged Native Apps Using RubyMotion
 
Game software development trends presentation
Game software development trends   presentationGame software development trends   presentation
Game software development trends presentation
 
Delta Engine @ CeBit 2011
Delta Engine @ CeBit 2011Delta Engine @ CeBit 2011
Delta Engine @ CeBit 2011
 
iOS Game Development: When Cocoa Met Cocos...
iOS Game Development: When Cocoa Met Cocos...iOS Game Development: When Cocoa Met Cocos...
iOS Game Development: When Cocoa Met Cocos...
 

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

  • 1.
  • 2. 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.
  • 3. Agenda  Gameloft Introduction  Gameloft’s approach to Multi-Platform development  Tips, tricks and examples  Questions and Answers
  • 4. Gameloft: Leading developer and publisher Founded in 1999, to develop from mobiles & smart phones to cross-platform digital distribution Iphone, Ipod, Android Ipad Mobile Console
  • 5. Gameloft: Leading developer and publisher Presence in over 80 countries Agreements with over 200 carriers ~400,000 games sold per day
  • 6. Gameloft: Leading developer and publisher Production studios in 12 countries 5125 talented people
  • 7. Gameloft Vietnam is The BIGGEST Gameloft Studio Worldwide The BIGGEST 1700 talented staffWorldwide More than Gameloft Studio More than 1000 talented staff
  • 8. Gameloft keeps on growing fast in Vietnam SAI 1 SAI 2 DAD HAN e-Town 2 Building - 18A Cong Hoa, Tan 74 Bach Dang, Hai 3rd&4th floor – 7Fl., 364 Cong Binh Dist., HCMC Chau Dist., Danang Lilama 10 Hoa, Tan Binh Since Aug-2008 City Le Van Luong, Hanoi Dist., HCMC Since Mar-2010 Since June-2011
  • 9. Gameloft HAN Studio  Asphalt 6  Kingdom and Lords  Fantasy Town  Dungeon Hunter 3  Amazing Spiderman
  • 10.
  • 12. Our games are running on  iOS  Android  PS3  Windows Phone 7  bada  WebOS  Java embed  ….
  • 13. Our games are running on  iOS  Android  PS3  Windows Phone 7  bada  WebOS  Java embed …
  • 14. How could we accomplished that?
  • 15. How could we accomplished that? Different codebases for each platform?
  • 16. Different codebases for each platform? Yes.
  • 17. Different codebases for each platform? Yes. And No 
  • 18. Windows Game Platform Platform Platform- API Platform- API specific Wrapper specific Wrapper Features Features Platform- Platform- specific specific UI UI Android Game iOS Game
  • 19. Windows Game Built with C++, contains almost everything: UI Design Game-Logic Game Rendering Sound Multiplayer …
  • 20. Windows Game Android Game iOS Game Platform Platform API API Wrapper Wrapper •Android NDK •C++ auto-compat •Java wrapper: Activity, •UIWindow, UIViewController, View, Intent, Receiver UIView, UIApplicationDelegat e
  • 21. Windows Game Android Game iOS Game Platform Platform Platform- API Platform- API specific Wrapper specific Wrapper Features Features •Advertising •iAd •In-App Billing •In-App Purchase •Beam •Music Player
  • 22. Windows Game Android Game iOS Game Platform Platform Platform- API Platform- API specific Wrapper specific Wrapper Features Features Platform- Platform- specific specific UI UI •Push Notification toggle •iOS is normally the role- •Kindle Fire Volume model •Color Correction
  • 23. Windows Game Platform Platform Platform- API Platform- API specific Wrapper specific Wrapper Features Features Platform- Platform- specific specific UI UI Android Game iOS Game
  • 24. 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
  • 25. 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
  • 26. Tips and tricks  Try to build your game without a real device first  Graphics: Use OpenGL ES 2.0  Don’t hard-code. Do things explicitly. Have separated Configuration files.  Prepare your data wisely  Preprocessing is not only for C++  Keep an abstract macros/classes/library of code that using platform-specific API or behave differently on each platform
  • 27. 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
  • 28. 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
  • 29. Examples – Abstract Library class TouchScreenBase { ... } class TouchScreenMobile : public TouchScreenBase { ... } class TouchScreenWin32 : public TouchScreenBase { ... } #ifdef OS_ANDROID typedef TouchScreen TouchScreenMobile #elif defined(WIN32) typedef TouchScreen TouchScreenWin32 #endif //Usage: Just use TouchScreen Class
  • 30. 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
  • 32. Questions and Answers Thanks for your attention! Contact me: phuoc.nguyenhuu2@gameloft.com

Hinweis der Redaktion

  1. Development from mobiles &amp; smart phones… Gameloft supports over 1200 handsets
  2. hard-code? getDataFolder()explicitly? global char c; -&gt; c = -1 on Windows but 255 on GCC. cast from char* to int* -&gt; crash on Android.Standardize the data to suit the target platforms. VD: Ảnh nén PVRTC (trên iPhone và 1 số máy Android) thì phải vuông, ảnh phải là POT, ảnh nén ETC thì phải chia hết cho 4….KeyCode
  3. http://developer.sonymobile.com/wp/2011/02/13/xperia-play-game-keys/