SlideShare ist ein Scribd-Unternehmen logo
1 von 45
Downloaden Sie, um offline zu lesen
Christian Schalk
Google Developer Advocate

With special guest speaker, Proppy!



 How to Build Kick Ass Games in the Cloud
About the Speaker

 Christian Schalk

 Day Job
  ● Developer Advocate for Google's Cloud Technology
     ○ App Engine, Google Storage, Prediction API, BigQuery ...

  ● Mostly Server-Side Java Background
     ○ "JavaServer Faces: The Complete Reference" Co-Author

  ● Haven't developed video games since the
    Commodore-64!


                                           Yes, I'm old school ;-)
Agenda

 ● PlayN Technology
 ● Hands on with PlayN
     ○ Getting Started
     ○ Building a game from scratch w/ Proppy
 ● Deploying your game to the cloud
 ● Setting up an RPC mechanism
 ● Integrating w/ Google Plus
 ● Summary
First, Some Questions...


 ● Thinking of building a game for the Web?
                                              ?
    ○ Would you use Flash?
    ○ or HTML5?


 ● What if you wanted to port your game to Mobile?
    ○ Do you need an entirely separate code base?
First, Some Questions...


 ● Thinking of building a game for the Web?
                                              ?
    ○ Would you use Flash?
    ○ or HTML5?
    ○ Answer: Doesn't Matter!! Can do both!

 ● What if you wanted to port your game to Mobile?
    ○ Do you need an entirely separate code base?
    ○ Answer: NO!
First, Some Questions...


 ● Thinking of building a game for the Web?
                                              ?
    ○ Would you use Flash?
    ○ or HTML5?
    ○ Answer: Doesn't Matter!! Can do both!

 ● What if you wanted to port your game to Mobile?
    ○ Do you need an entirely separate code base?
    ○ Answer: NO!


           How is this Possible!??
Introducing PlayN!!




                    One Game.
                    Many Platforms.




Formerly known as "ForPlay"
What is PlayN?


  ● An open source technology for building cross-platform
    games

  ● Core game code is platform agnostic

  ● Develop games in Java
     ○ Familiar language/toolset

  ● Leverages Google Web Toolkit
     ○ Compiles to JS/HTML5, (among other platforms)

  ● Free and Open Source (alpha)
     ○ http://code.google.com/p/playn
PlayN API Structure



                                PlayN API



                                                          Flash impl.




Implementations for Java, HTML5(GWT/JS), Android, Flash
Components of PlayN




Extend PlayN.Game                           PlayN.*




Fully generic gaming components. Core game logic is fully platform
independent!
PlayN Cross Platform Magic


● Game uses core PlayN abstractions, is unaware of which
  platform is running

● The only platform-specific code is in the entry point for
  each platform:



   PlayN.run(new MyGame());            PlayN.run(new MyGame());
Other PlayN Benefits

● Built-in physics engine based on proven OpenSource
  technologies




 ● Box2D
    ○ C++ 2D Physics engine by Erin Catto
 ● JBox2D
    ○ A port of Box2D from C++ to Java
 ● GWTBox2D
    ○ A port of JBox2D from Java to JavaScript
Benefits of GWT Abstraction

● GWT Compiler optimizes code for size
   ○ Removes unused code
   ○ Evaluates when possible at compile time
   ○ Heavily obfuscated result code

● Smaller compiled code - faster load time

● Optimized caching, avoids unnecessary network IO
The PlayN Game Loop
Similar to other gaming platforms



    public class MyGame implements Game {
      public void init() {
        // initialize game.
      }
      public void update(float delta) {
        // update world.
      }
      public void paint(float alpha) {
        // render world.
      }
    }
PlayN Rendering
Can easily with different screen parameters


  // Resize to the available resolution on the current device.
  graphics().setSize(
    graphics().screenWidth(),
    graphics().screenHeight()
  );
  // Keep the same aspect ratio.
  float sx = graphics().screenWidth() / (float) WIDTH;
  float sy = graphics().screenHeight() / (float) HEIGHT;

  // Fit to the available screen without stretching.
  graphics().rootLayer().setScale(Math.min(sx, sy));
PlayN Drawing API
PlayN Layer System
Layer Types
● Layers have distinct sizes and transforms
● Used to optimize
IO System: Platform Abstractions


    ● Pointer
       ○ Most general screen event
       ○ Works everywhere

    ● Mouse
       ○ Left, right, mid buttons & wheel

    ● Touch
       ○ Pressure, size, multitouch
IO System: Input Devices

   pointer().setListener(new Pointer.Adapter() {
     public void onPointerStart(Pointer.Event event) {
       // Handle mouse down event.
     }
     // ...Same pattern for onPointerEnd, onPointerDrag
   });

   keyboard().setListener(new Keyboard.Adapter() {
     public void onKeyDown(Event event) {
       // Handle key down event.
     }
     // ... Same pattern for onKeyUp
   });
Asset Management

   public interface AssetManager {

       Image getImage(String path);
       Sound getSound(String path);
       void getText(String path, ResourceCallback callback);

       boolean isDone();
       int getPendingRequestCount();
   }
Agenda

 ● PlayN Technology
 ● Hands on with PlayN
     ○ Getting Started
     ○ Building a game from scratch w/ Proppy
 ● Deploying your game to the cloud
 ● Setting up an RPC mechanism
 ● Integrating w/ Google Plus
 ● Summary
Requirements for getting started with PlayN
 ● Core Requirements
    ○ Java 6 SDK
    ○ Apache Ant
    ○ Maven
    ○ App Engine SDK
    ○ Android SDK

 ● Requirements with Eclipse
    ○ Eclipse IDE Indigo 3.7 (Or earlier version w/
      Maven)
    ○ Google Plugin for Eclipse
    ○ Android Plugin for Eclipse
Building/Installing PlayN
 ● PlayN 1.0 is now available in Maven Central!
     ○ Wiki will be updated soon, but can simply create a Maven project

 ● Or can clone a copy of PlayN
     ○ git clone https://code.google.com/p/playn
 ● Then...
     ○ cd playn (directory where your copy is location)
     ○ mvn install (or 'ant install')

 ● Running 'showcase' sample app with Mvn
     ○ cd playn/sample/showcase/core
     ○ mvn compile exec:java

 ● Running 'showcase' sample app with Ant
     ○ cd playn/sample/showcase
     ○ ant run-java
Demo: How to get started w/ PlayN




          http://code.google.com/p/playn
Building a new project in PlayN

● From the command line:
   ○ mvn archetype:generate -DarchetypeGroupId=com.googlecode.playn
     -DarchetypeArtifactId=playn-archetype
   ○ ...

● From Eclipse
   ○ Select File → New → Project..., then select Maven →
     Maven Project in the dialog that pops up, then click
     Next.
           ■ Click Next again unless you wish to specify a custom workspace location.
           ■ Check Include snapshot archetypes in the dialog and then double click
             on the playn-archetype in the list of archetypes
   ○ ...
Demo: Building a new Game in PlayN
Agenda

 ● PlayN Technology
 ● Hands on with PlayN
     ○ Getting Started
     ○ Building a game from scratch w/ Proppy
        ■ http://proppy-playn101.appspot.com/
 ● Deploying your game to the cloud
 ● Setting up an RPC mechanism
 ● Integrating w/ Google Plus
 ● Summary
Agenda

 ● PlayN Technology
 ● Hands on with PlayN
     ○ Getting Started
     ○ Building a game from scratch w/ Proppy
 ● Deploying your game to the cloud
 ● Setting up an RPC mechanism
 ● Integrating w/ Google Plus
 ● Summary
Deploy your HTML project to the Cloud

  ● For Google App Engine Deployment, you can easily
    convert the project to an App Engine Project
Deploy your HTML project to the Cloud

  ● After converting your HTML project to an App Engine
    project you will have to do...

  ● Add a 'WEB-INF/lib/appengine-web.xml' file
     ○ Note: Click 'Quick Fix' in the Errors console of
       Eclipse

  ● Before deployment make sure your 'WEB-INF/lib' has
    the necessary runtime App Engine jar files.
Agenda

 ● PlayN Technology
 ● Hands on with PlayN
     ○ Getting Started
     ○ Building a game from scratch w/ Proppy
 ● Deploying your game to the cloud
 ● Setting up an RPC mechanism
 ● Integrating w/ Google Plus
 ● Summary
Setting up an RPC mechanism

  ● Building your client code
     ○ You can use PlayN's Net().Post() call to send data to
       a server

  ● Building Your Server
     ○ PlayN comes with a preliminary Server example
       code that uses Jetty
         ■ Is not needed if deploying to App Engine
         ■ Instead, you can implement your own server by
           adding an HttpServlet to your project
            ■ Have it implement the doPost() method
            ■ Can map it to url: '/rpc' in web.xml
Setting up an RPC mechanism
 ● Example: A client method to persist a score

 private void postScore(String payload) {
   net().post("/rpc", payload, new Callback<String>() {
      @Override
      public void onSuccess(String response) {
        // TODO
       }
     @Override
      public void onFailure(Throwable error) {
        // TODO
      }
  });
}
Setting up an RPC mechanism
  ● Example: Server method to persist score sent from client

protected void doPost(HttpServletRequest req,
HttpServletResponse resp) throws ServletException,
    IOException {

  String payload = readFully(req.getReader());
  Json.Object data = json().parse(payload);
  String score = data.getString("score");
  if (score != null){
    persistScore(score, id);
   }
 }
private void persistScore(String score) {...}
Agenda

 ● PlayN Technology
 ● Hands on with PlayN
     ○ Getting Started
     ○ Building a game from scratch w/ Proppy
 ● Deploying your game to the cloud
 ● Setting up an RPC mechanism
 ● Integrating w/ Google Plus
 ● Summary
Integrating your game with Google+
 Visit http://developers.google.com/+




                            Download the Java Starter App
Integrating your game with GooglePlus

Sample Starter App contains...

    ● README.txt with steps on:
       ○ Visiting https://code.google.com/apis/console to
         enable Google Plus API access for your app
          ■ To generate your
              ■ oauth_client_id,
              ■ oauth_client_secret,
              ■ google_api_key

    ● Sample Java classes to redirect game users for OAuth
      authentication
Integrating your game with GooglePlus

To access GooglePlus profile data..



    Person profile;

     try {
       profile = plus.people.get("me").execute();
     } catch (HttpResponseException e) {
       log.severe(Util.extractError(e));
       return;
     }
Integrating your game with GooglePlus


  Accessing GooglePlus
  profile data in a JSP page...




<a href="<%= profile.getUrl() %>">

 <img src="<%= profile.getImage().getUrl() %>?sz=100"
/></a>
Welcome, <%= profile.getDisplayName() %>
Demo: Introducing 'Cloud Warrior'

App Engine                                  Google Storage


                                                     Game Assets
                                                     (images/sounds)




 Game Scores
 Profile Data




                http://ae-cloudwarrior.appspot.com
PlayN Summary


● Open source, cross-platform game abstraction layer
   ○ Core game logic is platform agnostic

● ForPlay abstracts away the core components of a game
   ○ The game loop, I/O system, and asset management

● Write in familiar Java, get performance on multiple
  platforms
   ○ Superior Java development/debug
   ○ GWT allows compilation to fast JavaScript/HTML5

● Your assignment:
   ○ Install PlayN and build a game!
   ○ http://code.google.com/p/playn/
Announcing the New PlayN Developer Site!




       http://developers.google.com/playn/
Q&A
profiles.google.com/proppy
profiles.google.com/cschalk
Thank You!

Weitere ähnliche Inhalte

Was ist angesagt?

Serverless Computing with Python
Serverless Computing with PythonServerless Computing with Python
Serverless Computing with Pythonwesley chun
 
Exploring Google APIs with Python
Exploring Google APIs with PythonExploring Google APIs with Python
Exploring Google APIs with Pythonwesley chun
 
Easy path to machine learning (Spring 2021)
Easy path to machine learning (Spring 2021)Easy path to machine learning (Spring 2021)
Easy path to machine learning (Spring 2021)wesley chun
 
Image archive, analysis & report generation with Google Cloud
Image archive, analysis & report generation with Google CloudImage archive, analysis & report generation with Google Cloud
Image archive, analysis & report generation with Google Cloudwesley chun
 
Run your code serverlessly on Google's open cloud
Run your code serverlessly on Google's open cloudRun your code serverlessly on Google's open cloud
Run your code serverlessly on Google's open cloudwesley chun
 
Easy path to machine learning (Spring 2020)
Easy path to machine learning (Spring 2020)Easy path to machine learning (Spring 2020)
Easy path to machine learning (Spring 2020)wesley chun
 
Powerful Google Cloud tools for your hack
Powerful Google Cloud tools for your hackPowerful Google Cloud tools for your hack
Powerful Google Cloud tools for your hackwesley chun
 
Building Translate on Glass
Building Translate on GlassBuilding Translate on Glass
Building Translate on GlassTrish Whetzel
 
Introduction to serverless computing on Google Cloud
Introduction to serverless computing on Google CloudIntroduction to serverless computing on Google Cloud
Introduction to serverless computing on Google Cloudwesley chun
 
Powerful Google Cloud tools for your hack (2020)
Powerful Google Cloud tools for your hack (2020)Powerful Google Cloud tools for your hack (2020)
Powerful Google Cloud tools for your hack (2020)wesley chun
 
Google Cloud: Data Analysis and Machine Learningn Technologies
Google Cloud: Data Analysis and Machine Learningn Technologies Google Cloud: Data Analysis and Machine Learningn Technologies
Google Cloud: Data Analysis and Machine Learningn Technologies Andrés Leonardo Martinez Ortiz
 
Build with ALL of Google Cloud
Build with ALL of Google CloudBuild with ALL of Google Cloud
Build with ALL of Google Cloudwesley chun
 
Exploring Google (Cloud) APIs with Python & JavaScript
Exploring Google (Cloud) APIs with Python & JavaScriptExploring Google (Cloud) APIs with Python & JavaScript
Exploring Google (Cloud) APIs with Python & JavaScriptwesley chun
 
HTML5 on the AGL demo platform with Chromium and WAM (AGL AMM March 2021)
HTML5 on the AGL demo platform with Chromium and WAM (AGL AMM March 2021)HTML5 on the AGL demo platform with Chromium and WAM (AGL AMM March 2021)
HTML5 on the AGL demo platform with Chromium and WAM (AGL AMM March 2021)Igalia
 
JCConf 2016 - Google Dataflow 小試
JCConf 2016 - Google Dataflow 小試JCConf 2016 - Google Dataflow 小試
JCConf 2016 - Google Dataflow 小試Simon Su
 
What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)
What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)
What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)Igalia
 
Google Cloud Platform - Eric Johnson, Joe Selman - ManageIQ Design Summit 2016
Google Cloud Platform - Eric Johnson, Joe Selman - ManageIQ Design Summit 2016Google Cloud Platform - Eric Johnson, Joe Selman - ManageIQ Design Summit 2016
Google Cloud Platform - Eric Johnson, Joe Selman - ManageIQ Design Summit 2016ManageIQ
 

Was ist angesagt? (20)

Serverless Computing with Python
Serverless Computing with PythonServerless Computing with Python
Serverless Computing with Python
 
Exploring Google APIs with Python
Exploring Google APIs with PythonExploring Google APIs with Python
Exploring Google APIs with Python
 
Easy path to machine learning (Spring 2021)
Easy path to machine learning (Spring 2021)Easy path to machine learning (Spring 2021)
Easy path to machine learning (Spring 2021)
 
Image archive, analysis & report generation with Google Cloud
Image archive, analysis & report generation with Google CloudImage archive, analysis & report generation with Google Cloud
Image archive, analysis & report generation with Google Cloud
 
Run your code serverlessly on Google's open cloud
Run your code serverlessly on Google's open cloudRun your code serverlessly on Google's open cloud
Run your code serverlessly on Google's open cloud
 
Easy path to machine learning (Spring 2020)
Easy path to machine learning (Spring 2020)Easy path to machine learning (Spring 2020)
Easy path to machine learning (Spring 2020)
 
Powerful Google Cloud tools for your hack
Powerful Google Cloud tools for your hackPowerful Google Cloud tools for your hack
Powerful Google Cloud tools for your hack
 
Building Translate on Glass
Building Translate on GlassBuilding Translate on Glass
Building Translate on Glass
 
Introduction to serverless computing on Google Cloud
Introduction to serverless computing on Google CloudIntroduction to serverless computing on Google Cloud
Introduction to serverless computing on Google Cloud
 
Cloud Spin - building a photo booth with the Google Cloud Platform
Cloud Spin - building a photo booth with the Google Cloud PlatformCloud Spin - building a photo booth with the Google Cloud Platform
Cloud Spin - building a photo booth with the Google Cloud Platform
 
Deep dive into serverless on Google Cloud
Deep dive into serverless on Google CloudDeep dive into serverless on Google Cloud
Deep dive into serverless on Google Cloud
 
Supercharge your app with Cloud Functions for Firebase
Supercharge your app with Cloud Functions for FirebaseSupercharge your app with Cloud Functions for Firebase
Supercharge your app with Cloud Functions for Firebase
 
Powerful Google Cloud tools for your hack (2020)
Powerful Google Cloud tools for your hack (2020)Powerful Google Cloud tools for your hack (2020)
Powerful Google Cloud tools for your hack (2020)
 
Google Cloud: Data Analysis and Machine Learningn Technologies
Google Cloud: Data Analysis and Machine Learningn Technologies Google Cloud: Data Analysis and Machine Learningn Technologies
Google Cloud: Data Analysis and Machine Learningn Technologies
 
Build with ALL of Google Cloud
Build with ALL of Google CloudBuild with ALL of Google Cloud
Build with ALL of Google Cloud
 
Exploring Google (Cloud) APIs with Python & JavaScript
Exploring Google (Cloud) APIs with Python & JavaScriptExploring Google (Cloud) APIs with Python & JavaScript
Exploring Google (Cloud) APIs with Python & JavaScript
 
HTML5 on the AGL demo platform with Chromium and WAM (AGL AMM March 2021)
HTML5 on the AGL demo platform with Chromium and WAM (AGL AMM March 2021)HTML5 on the AGL demo platform with Chromium and WAM (AGL AMM March 2021)
HTML5 on the AGL demo platform with Chromium and WAM (AGL AMM March 2021)
 
JCConf 2016 - Google Dataflow 小試
JCConf 2016 - Google Dataflow 小試JCConf 2016 - Google Dataflow 小試
JCConf 2016 - Google Dataflow 小試
 
What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)
What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)
What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)
 
Google Cloud Platform - Eric Johnson, Joe Selman - ManageIQ Design Summit 2016
Google Cloud Platform - Eric Johnson, Joe Selman - ManageIQ Design Summit 2016Google Cloud Platform - Eric Johnson, Joe Selman - ManageIQ Design Summit 2016
Google Cloud Platform - Eric Johnson, Joe Selman - ManageIQ Design Summit 2016
 

Andere mochten auch

Building Apps on Google Cloud Technologies
Building Apps on Google Cloud TechnologiesBuilding Apps on Google Cloud Technologies
Building Apps on Google Cloud TechnologiesChris Schalk
 
Building Multi-platform Video Games for the Cloud
Building Multi-platform Video Games for the CloudBuilding Multi-platform Video Games for the Cloud
Building Multi-platform Video Games for the CloudChris Schalk
 
Introducing App Engine for Business
Introducing App Engine for BusinessIntroducing App Engine for Business
Introducing App Engine for BusinessChris Schalk
 
Connecting the ROLE tools
Connecting the ROLE toolsConnecting the ROLE tools
Connecting the ROLE toolsROLE Project
 
GDD 2011 - How to build kick ass video games for the cloud
GDD 2011 - How to build kick ass video games for the cloudGDD 2011 - How to build kick ass video games for the cloud
GDD 2011 - How to build kick ass video games for the cloudChris Schalk
 
App engine devfest_mexico_10
App engine devfest_mexico_10App engine devfest_mexico_10
App engine devfest_mexico_10Chris Schalk
 
Questões de vestibulares e ENEM sobre o Mediterrâneo antigo
Questões de vestibulares e ENEM sobre o Mediterrâneo antigoQuestões de vestibulares e ENEM sobre o Mediterrâneo antigo
Questões de vestibulares e ENEM sobre o Mediterrâneo antigoZé Knust
 

Andere mochten auch (8)

Building Apps on Google Cloud Technologies
Building Apps on Google Cloud TechnologiesBuilding Apps on Google Cloud Technologies
Building Apps on Google Cloud Technologies
 
Building Multi-platform Video Games for the Cloud
Building Multi-platform Video Games for the CloudBuilding Multi-platform Video Games for the Cloud
Building Multi-platform Video Games for the Cloud
 
Introducing App Engine for Business
Introducing App Engine for BusinessIntroducing App Engine for Business
Introducing App Engine for Business
 
Ts 3742
Ts 3742Ts 3742
Ts 3742
 
Connecting the ROLE tools
Connecting the ROLE toolsConnecting the ROLE tools
Connecting the ROLE tools
 
GDD 2011 - How to build kick ass video games for the cloud
GDD 2011 - How to build kick ass video games for the cloudGDD 2011 - How to build kick ass video games for the cloud
GDD 2011 - How to build kick ass video games for the cloud
 
App engine devfest_mexico_10
App engine devfest_mexico_10App engine devfest_mexico_10
App engine devfest_mexico_10
 
Questões de vestibulares e ENEM sobre o Mediterrâneo antigo
Questões de vestibulares e ENEM sobre o Mediterrâneo antigoQuestões de vestibulares e ENEM sobre o Mediterrâneo antigo
Questões de vestibulares e ENEM sobre o Mediterrâneo antigo
 

Ähnlich wie How to build Kick Ass Games in the Cloud

GDCE 2015: Blueprint Components to C++
GDCE 2015: Blueprint Components to C++GDCE 2015: Blueprint Components to C++
GDCE 2015: Blueprint Components to C++Gerke Max Preussner
 
Tools for developing Android Games
 Tools for developing Android Games Tools for developing Android Games
Tools for developing Android GamesPlatty Soft
 
Android game development
Android game developmentAndroid game development
Android game developmentdmontagni
 
Developing games and graphic visualizations in Pascal
Developing games and graphic visualizations in PascalDeveloping games and graphic visualizations in Pascal
Developing games and graphic visualizations in PascalMichalis Kamburelis
 
Introduction to html5 game programming with ImpactJs
Introduction to html5 game programming with ImpactJsIntroduction to html5 game programming with ImpactJs
Introduction to html5 game programming with ImpactJsLuca Galli
 
WT-4066, The Making of Turbulenz’ Polycraft WebGL Benchmark, by Ian Ballantyne
WT-4066, The Making of Turbulenz’ Polycraft WebGL Benchmark, by Ian BallantyneWT-4066, The Making of Turbulenz’ Polycraft WebGL Benchmark, by Ian Ballantyne
WT-4066, The Making of Turbulenz’ Polycraft WebGL Benchmark, by Ian BallantyneAMD Developer Central
 
Capstone Project Final Presentation
Capstone Project Final PresentationCapstone Project Final Presentation
Capstone Project Final PresentationMatthew Chang
 
Castle Game Engine and the joy of making and using a custom game engine
Castle Game Engine and the joy  of making and using a custom game engineCastle Game Engine and the joy  of making and using a custom game engine
Castle Game Engine and the joy of making and using a custom game engineMichalis Kamburelis
 
Programming Language Final PPT
Programming Language Final PPTProgramming Language Final PPT
Programming Language Final PPTMatthew Chang
 
Html5 Game Development with Canvas
Html5 Game Development with CanvasHtml5 Game Development with Canvas
Html5 Game Development with CanvasPham Huy Tung
 
AGDK tutorial step by step
AGDK tutorial step by stepAGDK tutorial step by step
AGDK tutorial step by stepJungsoo Nam
 
Building an Empire with PowerShell
Building an Empire with PowerShellBuilding an Empire with PowerShell
Building an Empire with PowerShellWill Schroeder
 
Introduction to html5 game programming with impact js
Introduction to html5 game programming with impact jsIntroduction to html5 game programming with impact js
Introduction to html5 game programming with impact jsLuca Galli
 
Introduction to Computing on GPU
Introduction to Computing on GPUIntroduction to Computing on GPU
Introduction to Computing on GPUIlya Kuzovkin
 
Pen Testing Development
Pen Testing DevelopmentPen Testing Development
Pen Testing DevelopmentCTruncer
 
State of the Art OpenGL and Qt
State of the Art OpenGL and QtState of the Art OpenGL and Qt
State of the Art OpenGL and QtICS
 
3D Programming Basics: WebGL
3D Programming Basics: WebGL3D Programming Basics: WebGL
3D Programming Basics: WebGLGlobant
 
Developing Multi Platform Games using PlayN and TriplePlay Framework
Developing Multi Platform Games using PlayN and TriplePlay FrameworkDeveloping Multi Platform Games using PlayN and TriplePlay Framework
Developing Multi Platform Games using PlayN and TriplePlay FrameworkCsaba Toth
 

Ähnlich wie How to build Kick Ass Games in the Cloud (20)

GDCE 2015: Blueprint Components to C++
GDCE 2015: Blueprint Components to C++GDCE 2015: Blueprint Components to C++
GDCE 2015: Blueprint Components to C++
 
Tools for developing Android Games
 Tools for developing Android Games Tools for developing Android Games
Tools for developing Android Games
 
Android game development
Android game developmentAndroid game development
Android game development
 
Developing games and graphic visualizations in Pascal
Developing games and graphic visualizations in PascalDeveloping games and graphic visualizations in Pascal
Developing games and graphic visualizations in Pascal
 
Introduction to html5 game programming with ImpactJs
Introduction to html5 game programming with ImpactJsIntroduction to html5 game programming with ImpactJs
Introduction to html5 game programming with ImpactJs
 
Baiscs of OpenGL
Baiscs of OpenGLBaiscs of OpenGL
Baiscs of OpenGL
 
WT-4066, The Making of Turbulenz’ Polycraft WebGL Benchmark, by Ian Ballantyne
WT-4066, The Making of Turbulenz’ Polycraft WebGL Benchmark, by Ian BallantyneWT-4066, The Making of Turbulenz’ Polycraft WebGL Benchmark, by Ian Ballantyne
WT-4066, The Making of Turbulenz’ Polycraft WebGL Benchmark, by Ian Ballantyne
 
Capstone Project Final Presentation
Capstone Project Final PresentationCapstone Project Final Presentation
Capstone Project Final Presentation
 
Kivy for you
Kivy for youKivy for you
Kivy for you
 
Castle Game Engine and the joy of making and using a custom game engine
Castle Game Engine and the joy  of making and using a custom game engineCastle Game Engine and the joy  of making and using a custom game engine
Castle Game Engine and the joy of making and using a custom game engine
 
Programming Language Final PPT
Programming Language Final PPTProgramming Language Final PPT
Programming Language Final PPT
 
Html5 Game Development with Canvas
Html5 Game Development with CanvasHtml5 Game Development with Canvas
Html5 Game Development with Canvas
 
AGDK tutorial step by step
AGDK tutorial step by stepAGDK tutorial step by step
AGDK tutorial step by step
 
Building an Empire with PowerShell
Building an Empire with PowerShellBuilding an Empire with PowerShell
Building an Empire with PowerShell
 
Introduction to html5 game programming with impact js
Introduction to html5 game programming with impact jsIntroduction to html5 game programming with impact js
Introduction to html5 game programming with impact js
 
Introduction to Computing on GPU
Introduction to Computing on GPUIntroduction to Computing on GPU
Introduction to Computing on GPU
 
Pen Testing Development
Pen Testing DevelopmentPen Testing Development
Pen Testing Development
 
State of the Art OpenGL and Qt
State of the Art OpenGL and QtState of the Art OpenGL and Qt
State of the Art OpenGL and Qt
 
3D Programming Basics: WebGL
3D Programming Basics: WebGL3D Programming Basics: WebGL
3D Programming Basics: WebGL
 
Developing Multi Platform Games using PlayN and TriplePlay Framework
Developing Multi Platform Games using PlayN and TriplePlay FrameworkDeveloping Multi Platform Games using PlayN and TriplePlay Framework
Developing Multi Platform Games using PlayN and TriplePlay Framework
 

Mehr von Chris Schalk

Quick Intro to Google Cloud Technologies
Quick Intro to Google Cloud TechnologiesQuick Intro to Google Cloud Technologies
Quick Intro to Google Cloud TechnologiesChris Schalk
 
Intro to Google's Cloud Technologies
Intro to Google's Cloud TechnologiesIntro to Google's Cloud Technologies
Intro to Google's Cloud TechnologiesChris Schalk
 
Introduction to Google's Cloud Technologies
Introduction to Google's Cloud TechnologiesIntroduction to Google's Cloud Technologies
Introduction to Google's Cloud TechnologiesChris Schalk
 
Google App Engine's Latest Features
Google App Engine's Latest FeaturesGoogle App Engine's Latest Features
Google App Engine's Latest FeaturesChris Schalk
 
Google App Engine's Latest Features
Google App Engine's Latest FeaturesGoogle App Engine's Latest Features
Google App Engine's Latest FeaturesChris Schalk
 
Building Enterprise Applications on Google Cloud Platform Cloud Computing Exp...
Building Enterprise Applications on Google Cloud Platform Cloud Computing Exp...Building Enterprise Applications on Google Cloud Platform Cloud Computing Exp...
Building Enterprise Applications on Google Cloud Platform Cloud Computing Exp...Chris Schalk
 
Introduction to Google's Cloud Technologies
Introduction to Google's Cloud TechnologiesIntroduction to Google's Cloud Technologies
Introduction to Google's Cloud TechnologiesChris Schalk
 
Javaedge 2010-cschalk
Javaedge 2010-cschalkJavaedge 2010-cschalk
Javaedge 2010-cschalkChris Schalk
 
Introduction to Google Cloud Platform Technologies
Introduction to Google Cloud Platform TechnologiesIntroduction to Google Cloud Platform Technologies
Introduction to Google Cloud Platform TechnologiesChris Schalk
 
Google Cloud Technologies Overview
Google Cloud Technologies OverviewGoogle Cloud Technologies Overview
Google Cloud Technologies OverviewChris Schalk
 
Introduction to Google Cloud platform technologies
Introduction to Google Cloud platform technologiesIntroduction to Google Cloud platform technologies
Introduction to Google Cloud platform technologiesChris Schalk
 
Google App Engine for Business 101
Google App Engine for Business 101Google App Engine for Business 101
Google App Engine for Business 101Chris Schalk
 
What's new in App Engine and intro to App Engine for Business
What's new in App Engine and intro to App Engine for BusinessWhat's new in App Engine and intro to App Engine for Business
What's new in App Engine and intro to App Engine for BusinessChris Schalk
 
Intro to new Google cloud technologies: Google Storage, Prediction API, BigQuery
Intro to new Google cloud technologies: Google Storage, Prediction API, BigQueryIntro to new Google cloud technologies: Google Storage, Prediction API, BigQuery
Intro to new Google cloud technologies: Google Storage, Prediction API, BigQueryChris Schalk
 
App Engine Presentation @ SFJUG Sep 2010
App Engine Presentation @ SFJUG Sep 2010App Engine Presentation @ SFJUG Sep 2010
App Engine Presentation @ SFJUG Sep 2010Chris Schalk
 
What is Google App Engine
What is Google App EngineWhat is Google App Engine
What is Google App EngineChris Schalk
 
App engine cloud_comp_expo_nyc
App engine cloud_comp_expo_nycApp engine cloud_comp_expo_nyc
App engine cloud_comp_expo_nycChris Schalk
 
App Engine Overview Cloud Futures Publish
App Engine Overview Cloud Futures PublishApp Engine Overview Cloud Futures Publish
App Engine Overview Cloud Futures PublishChris Schalk
 
App Engine Overview @ Google Hackathon SXSW 2010
App Engine Overview @ Google Hackathon SXSW 2010App Engine Overview @ Google Hackathon SXSW 2010
App Engine Overview @ Google Hackathon SXSW 2010Chris Schalk
 
Google App Engine and Social Apps
Google App Engine and Social AppsGoogle App Engine and Social Apps
Google App Engine and Social AppsChris Schalk
 

Mehr von Chris Schalk (20)

Quick Intro to Google Cloud Technologies
Quick Intro to Google Cloud TechnologiesQuick Intro to Google Cloud Technologies
Quick Intro to Google Cloud Technologies
 
Intro to Google's Cloud Technologies
Intro to Google's Cloud TechnologiesIntro to Google's Cloud Technologies
Intro to Google's Cloud Technologies
 
Introduction to Google's Cloud Technologies
Introduction to Google's Cloud TechnologiesIntroduction to Google's Cloud Technologies
Introduction to Google's Cloud Technologies
 
Google App Engine's Latest Features
Google App Engine's Latest FeaturesGoogle App Engine's Latest Features
Google App Engine's Latest Features
 
Google App Engine's Latest Features
Google App Engine's Latest FeaturesGoogle App Engine's Latest Features
Google App Engine's Latest Features
 
Building Enterprise Applications on Google Cloud Platform Cloud Computing Exp...
Building Enterprise Applications on Google Cloud Platform Cloud Computing Exp...Building Enterprise Applications on Google Cloud Platform Cloud Computing Exp...
Building Enterprise Applications on Google Cloud Platform Cloud Computing Exp...
 
Introduction to Google's Cloud Technologies
Introduction to Google's Cloud TechnologiesIntroduction to Google's Cloud Technologies
Introduction to Google's Cloud Technologies
 
Javaedge 2010-cschalk
Javaedge 2010-cschalkJavaedge 2010-cschalk
Javaedge 2010-cschalk
 
Introduction to Google Cloud Platform Technologies
Introduction to Google Cloud Platform TechnologiesIntroduction to Google Cloud Platform Technologies
Introduction to Google Cloud Platform Technologies
 
Google Cloud Technologies Overview
Google Cloud Technologies OverviewGoogle Cloud Technologies Overview
Google Cloud Technologies Overview
 
Introduction to Google Cloud platform technologies
Introduction to Google Cloud platform technologiesIntroduction to Google Cloud platform technologies
Introduction to Google Cloud platform technologies
 
Google App Engine for Business 101
Google App Engine for Business 101Google App Engine for Business 101
Google App Engine for Business 101
 
What's new in App Engine and intro to App Engine for Business
What's new in App Engine and intro to App Engine for BusinessWhat's new in App Engine and intro to App Engine for Business
What's new in App Engine and intro to App Engine for Business
 
Intro to new Google cloud technologies: Google Storage, Prediction API, BigQuery
Intro to new Google cloud technologies: Google Storage, Prediction API, BigQueryIntro to new Google cloud technologies: Google Storage, Prediction API, BigQuery
Intro to new Google cloud technologies: Google Storage, Prediction API, BigQuery
 
App Engine Presentation @ SFJUG Sep 2010
App Engine Presentation @ SFJUG Sep 2010App Engine Presentation @ SFJUG Sep 2010
App Engine Presentation @ SFJUG Sep 2010
 
What is Google App Engine
What is Google App EngineWhat is Google App Engine
What is Google App Engine
 
App engine cloud_comp_expo_nyc
App engine cloud_comp_expo_nycApp engine cloud_comp_expo_nyc
App engine cloud_comp_expo_nyc
 
App Engine Overview Cloud Futures Publish
App Engine Overview Cloud Futures PublishApp Engine Overview Cloud Futures Publish
App Engine Overview Cloud Futures Publish
 
App Engine Overview @ Google Hackathon SXSW 2010
App Engine Overview @ Google Hackathon SXSW 2010App Engine Overview @ Google Hackathon SXSW 2010
App Engine Overview @ Google Hackathon SXSW 2010
 
Google App Engine and Social Apps
Google App Engine and Social AppsGoogle App Engine and Social Apps
Google App Engine and Social Apps
 

Kürzlich hochgeladen

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 

Kürzlich hochgeladen (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 

How to build Kick Ass Games in the Cloud

  • 1. Christian Schalk Google Developer Advocate With special guest speaker, Proppy! How to Build Kick Ass Games in the Cloud
  • 2. About the Speaker Christian Schalk Day Job ● Developer Advocate for Google's Cloud Technology ○ App Engine, Google Storage, Prediction API, BigQuery ... ● Mostly Server-Side Java Background ○ "JavaServer Faces: The Complete Reference" Co-Author ● Haven't developed video games since the Commodore-64! Yes, I'm old school ;-)
  • 3. Agenda ● PlayN Technology ● Hands on with PlayN ○ Getting Started ○ Building a game from scratch w/ Proppy ● Deploying your game to the cloud ● Setting up an RPC mechanism ● Integrating w/ Google Plus ● Summary
  • 4. First, Some Questions... ● Thinking of building a game for the Web? ? ○ Would you use Flash? ○ or HTML5? ● What if you wanted to port your game to Mobile? ○ Do you need an entirely separate code base?
  • 5. First, Some Questions... ● Thinking of building a game for the Web? ? ○ Would you use Flash? ○ or HTML5? ○ Answer: Doesn't Matter!! Can do both! ● What if you wanted to port your game to Mobile? ○ Do you need an entirely separate code base? ○ Answer: NO!
  • 6. First, Some Questions... ● Thinking of building a game for the Web? ? ○ Would you use Flash? ○ or HTML5? ○ Answer: Doesn't Matter!! Can do both! ● What if you wanted to port your game to Mobile? ○ Do you need an entirely separate code base? ○ Answer: NO! How is this Possible!??
  • 7. Introducing PlayN!! One Game. Many Platforms. Formerly known as "ForPlay"
  • 8. What is PlayN? ● An open source technology for building cross-platform games ● Core game code is platform agnostic ● Develop games in Java ○ Familiar language/toolset ● Leverages Google Web Toolkit ○ Compiles to JS/HTML5, (among other platforms) ● Free and Open Source (alpha) ○ http://code.google.com/p/playn
  • 9. PlayN API Structure PlayN API Flash impl. Implementations for Java, HTML5(GWT/JS), Android, Flash
  • 10. Components of PlayN Extend PlayN.Game PlayN.* Fully generic gaming components. Core game logic is fully platform independent!
  • 11. PlayN Cross Platform Magic ● Game uses core PlayN abstractions, is unaware of which platform is running ● The only platform-specific code is in the entry point for each platform: PlayN.run(new MyGame()); PlayN.run(new MyGame());
  • 12. Other PlayN Benefits ● Built-in physics engine based on proven OpenSource technologies ● Box2D ○ C++ 2D Physics engine by Erin Catto ● JBox2D ○ A port of Box2D from C++ to Java ● GWTBox2D ○ A port of JBox2D from Java to JavaScript
  • 13. Benefits of GWT Abstraction ● GWT Compiler optimizes code for size ○ Removes unused code ○ Evaluates when possible at compile time ○ Heavily obfuscated result code ● Smaller compiled code - faster load time ● Optimized caching, avoids unnecessary network IO
  • 14. The PlayN Game Loop Similar to other gaming platforms public class MyGame implements Game { public void init() { // initialize game. } public void update(float delta) { // update world. } public void paint(float alpha) { // render world. } }
  • 15. PlayN Rendering Can easily with different screen parameters // Resize to the available resolution on the current device. graphics().setSize( graphics().screenWidth(), graphics().screenHeight() ); // Keep the same aspect ratio. float sx = graphics().screenWidth() / (float) WIDTH; float sy = graphics().screenHeight() / (float) HEIGHT; // Fit to the available screen without stretching. graphics().rootLayer().setScale(Math.min(sx, sy));
  • 18. Layer Types ● Layers have distinct sizes and transforms ● Used to optimize
  • 19. IO System: Platform Abstractions ● Pointer ○ Most general screen event ○ Works everywhere ● Mouse ○ Left, right, mid buttons & wheel ● Touch ○ Pressure, size, multitouch
  • 20. IO System: Input Devices pointer().setListener(new Pointer.Adapter() { public void onPointerStart(Pointer.Event event) { // Handle mouse down event. } // ...Same pattern for onPointerEnd, onPointerDrag }); keyboard().setListener(new Keyboard.Adapter() { public void onKeyDown(Event event) { // Handle key down event. } // ... Same pattern for onKeyUp });
  • 21. Asset Management public interface AssetManager { Image getImage(String path); Sound getSound(String path); void getText(String path, ResourceCallback callback); boolean isDone(); int getPendingRequestCount(); }
  • 22. Agenda ● PlayN Technology ● Hands on with PlayN ○ Getting Started ○ Building a game from scratch w/ Proppy ● Deploying your game to the cloud ● Setting up an RPC mechanism ● Integrating w/ Google Plus ● Summary
  • 23. Requirements for getting started with PlayN ● Core Requirements ○ Java 6 SDK ○ Apache Ant ○ Maven ○ App Engine SDK ○ Android SDK ● Requirements with Eclipse ○ Eclipse IDE Indigo 3.7 (Or earlier version w/ Maven) ○ Google Plugin for Eclipse ○ Android Plugin for Eclipse
  • 24. Building/Installing PlayN ● PlayN 1.0 is now available in Maven Central! ○ Wiki will be updated soon, but can simply create a Maven project ● Or can clone a copy of PlayN ○ git clone https://code.google.com/p/playn ● Then... ○ cd playn (directory where your copy is location) ○ mvn install (or 'ant install') ● Running 'showcase' sample app with Mvn ○ cd playn/sample/showcase/core ○ mvn compile exec:java ● Running 'showcase' sample app with Ant ○ cd playn/sample/showcase ○ ant run-java
  • 25. Demo: How to get started w/ PlayN http://code.google.com/p/playn
  • 26. Building a new project in PlayN ● From the command line: ○ mvn archetype:generate -DarchetypeGroupId=com.googlecode.playn -DarchetypeArtifactId=playn-archetype ○ ... ● From Eclipse ○ Select File → New → Project..., then select Maven → Maven Project in the dialog that pops up, then click Next. ■ Click Next again unless you wish to specify a custom workspace location. ■ Check Include snapshot archetypes in the dialog and then double click on the playn-archetype in the list of archetypes ○ ...
  • 27. Demo: Building a new Game in PlayN
  • 28. Agenda ● PlayN Technology ● Hands on with PlayN ○ Getting Started ○ Building a game from scratch w/ Proppy ■ http://proppy-playn101.appspot.com/ ● Deploying your game to the cloud ● Setting up an RPC mechanism ● Integrating w/ Google Plus ● Summary
  • 29. Agenda ● PlayN Technology ● Hands on with PlayN ○ Getting Started ○ Building a game from scratch w/ Proppy ● Deploying your game to the cloud ● Setting up an RPC mechanism ● Integrating w/ Google Plus ● Summary
  • 30. Deploy your HTML project to the Cloud ● For Google App Engine Deployment, you can easily convert the project to an App Engine Project
  • 31. Deploy your HTML project to the Cloud ● After converting your HTML project to an App Engine project you will have to do... ● Add a 'WEB-INF/lib/appengine-web.xml' file ○ Note: Click 'Quick Fix' in the Errors console of Eclipse ● Before deployment make sure your 'WEB-INF/lib' has the necessary runtime App Engine jar files.
  • 32. Agenda ● PlayN Technology ● Hands on with PlayN ○ Getting Started ○ Building a game from scratch w/ Proppy ● Deploying your game to the cloud ● Setting up an RPC mechanism ● Integrating w/ Google Plus ● Summary
  • 33. Setting up an RPC mechanism ● Building your client code ○ You can use PlayN's Net().Post() call to send data to a server ● Building Your Server ○ PlayN comes with a preliminary Server example code that uses Jetty ■ Is not needed if deploying to App Engine ■ Instead, you can implement your own server by adding an HttpServlet to your project ■ Have it implement the doPost() method ■ Can map it to url: '/rpc' in web.xml
  • 34. Setting up an RPC mechanism ● Example: A client method to persist a score private void postScore(String payload) { net().post("/rpc", payload, new Callback<String>() { @Override public void onSuccess(String response) { // TODO } @Override public void onFailure(Throwable error) { // TODO } }); }
  • 35. Setting up an RPC mechanism ● Example: Server method to persist score sent from client protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { String payload = readFully(req.getReader()); Json.Object data = json().parse(payload); String score = data.getString("score"); if (score != null){ persistScore(score, id); } } private void persistScore(String score) {...}
  • 36. Agenda ● PlayN Technology ● Hands on with PlayN ○ Getting Started ○ Building a game from scratch w/ Proppy ● Deploying your game to the cloud ● Setting up an RPC mechanism ● Integrating w/ Google Plus ● Summary
  • 37. Integrating your game with Google+ Visit http://developers.google.com/+ Download the Java Starter App
  • 38. Integrating your game with GooglePlus Sample Starter App contains... ● README.txt with steps on: ○ Visiting https://code.google.com/apis/console to enable Google Plus API access for your app ■ To generate your ■ oauth_client_id, ■ oauth_client_secret, ■ google_api_key ● Sample Java classes to redirect game users for OAuth authentication
  • 39. Integrating your game with GooglePlus To access GooglePlus profile data.. Person profile; try { profile = plus.people.get("me").execute(); } catch (HttpResponseException e) { log.severe(Util.extractError(e)); return; }
  • 40. Integrating your game with GooglePlus Accessing GooglePlus profile data in a JSP page... <a href="<%= profile.getUrl() %>"> <img src="<%= profile.getImage().getUrl() %>?sz=100" /></a> Welcome, <%= profile.getDisplayName() %>
  • 41. Demo: Introducing 'Cloud Warrior' App Engine Google Storage Game Assets (images/sounds) Game Scores Profile Data http://ae-cloudwarrior.appspot.com
  • 42. PlayN Summary ● Open source, cross-platform game abstraction layer ○ Core game logic is platform agnostic ● ForPlay abstracts away the core components of a game ○ The game loop, I/O system, and asset management ● Write in familiar Java, get performance on multiple platforms ○ Superior Java development/debug ○ GWT allows compilation to fast JavaScript/HTML5 ● Your assignment: ○ Install PlayN and build a game! ○ http://code.google.com/p/playn/
  • 43. Announcing the New PlayN Developer Site! http://developers.google.com/playn/