ngCore
  @mootoh
Showcase
ngCore
Me
http://         /mootoh




JTPA SVC 2009
Mobile



Social    Game
Mobile




   http://www.flickr.com/photos/mkuma443/4731933259/


                                                      http://www.flickr.com/photos/marklincoln/5255361533/
Mobile




         http://blog.nielsen.com/nielsenwire/consumer/smartphones-to-overtake-feature-phones-in-u-s-by-2011/

                                                 March 26, 2010
Social
Social   Mobile
Game




       http://www.flickr.com/photos/nchill4x4/5560435682/
Game                         Mobile




       http://www.flickr.com/photos/nchill4x4/5560435682/
Mobile   Social   Game
Mobile



Social    Game
ngCore
Cross
         Platform




Performance    Productivity
Platforms




            Objective-C   Java
Platforms




            Objective-C   Java
Platforms




            Objective-C       Java

                      C/C++
Platforms




            Objective-C       Java

                      C/C++
                 Javascript + HTML
Performance   Productivity




C/C++                      (^o^)

JS + HTML       ☓
Performance   Productivity




C/C++                        (^o^)

JS + HTML         ☓

JS + Native
ngCore
• Write game logic in JS
• Run across multiple platforms
• Optimized Native modules
• Rapid development iteration
Developer’s
   View
Development
       Process
JS




        httpd
Development
         Process
 JS




          httpd




Edit
Development
         Process
 JS




           httpd




Edit      reload
Development
         Process
 JS




           httpd




Edit      reload   Test
Development
         Process
 JS




           httpd




Edit      reload   Test
Demo
 •   Write game logic in JS

 •   Run across multiple platforms

 •   Optimized Native modules

 •   Rapid development iteration
API
• Audio              • Social
• Bank               • Storage
• Device sensors     • UI
• 2D Graphics
• Networking
• Physics
http://developer.mobage.com
Internal
Architecture
      JS game code

    JS ngCore module
                               v8
          JS Engine            JSC

                               C++
               Native module   Objective-C
                               Java
     Native Runtime            ActionScript


Android       iOS      Flash
Game Engine

  for(;;) {
     input();
     update();
  }
RunLoop
JS Engine                     Native Runtime
             command string
RunLoop
JS Engine                     Native Runtime
             command string



                                       parse


                                  Module
RunLoop
JS Engine                     Native Runtime
             command string



                                       parse


                                  Module

                                       exec
RunLoop
JS Engine                     Native Runtime
             command string



                                       parse


                                  Module

                                       exec
RunLoop
JS Engine                     Native Runtime
             command string



                                       parse


                                  Module

                eval                   exec
RunLoop
JS Engine                     Native Runtime
             command string



                                       parse


Module                            Module


    parse       eval                   exec
RunLoop
JS Engine                     Native Runtime
             command string



    exec                               parse


Module                            Module


    parse       eval                   exec
RunLoop
JS Engine                     Native Runtime
             command string



    exec                               parse
             return
Module                            Module


    parse       eval                   exec
RunLoop
JS Engine                     Native Runtime
             command string



    exec                               parse
             return
Module                            Module


    parse       eval                   exec
Command

 var label = new GL2.Text();

 label.setSize(150, height);




      NGCore/Client/GL2/Text.js
Command
     
 var label = new GL2.Text();
     
 label.setSize(150, height);

Module → id




              NGCore/Client/GL2/Text.js
Command
      
 var label = new GL2.Text();
      
 label.setSize(150, height);

Module → id
Instance → id




                NGCore/Client/GL2/Text.js
Command
      
 var label = new GL2.Text();
      
 label.setSize(150, height);

Module → id
Instance → id
Method → id




                NGCore/Client/GL2/Text.js
Command
        
 var label = new GL2.Text();
        
 label.setSize(150, height);

Module → id
Instance → id
Method → id
Args:             eval

  Primitive → String
  Instance → id
                  NGCore/Client/GL2/Text.js
Command
        
 var label = new GL2.Text();
        
 label.setSize(150, height);

Module → id
Instance → id                        String
                                       “311,1,3,150,100”
Method → id
Args:             eval

  Primitive → String
  Instance → id
                  NGCore/Client/GL2/Text.js
Command
        
 var label = new GL2.Text();
        
 label.setSize(150, height);

Module → id
Instance → id                        String
                                       “311,1,3,150,100”
Method → id
Args:             eval

  Primitive → String
                             Marshal.dump
  Instance → id
                  NGCore/Client/GL2/Text.js
Implement a
                     Module
              IDL in JS                    gen stub
{
    class: “Text”,                         .js
    namespace: “GL2”,
    methods: {
     {
       sig: “void setText(string text)”,   .cpp / .h
       js -> native
     }
}                                          .as
Upcoming...

• More Interactive Development
• Profiler, Debugger
• Graphical Editor
• Social
Discussion
Social
Game
http://www.flickr.com/photos/canadianveggie/4104506343/   http://www.flickr.com/photos/gullevek/3368785185/
Social Game

•
•
•$
•     ?
Game
Engines
JS/HTML5

•                 ?

•
• JS engine, device   spec


•
Performance

                Native


              JS + Native



              JS + HTML
•
• Performance x Productivity
Hot topics
Why
ngCore?
Existing Global
 Social Graph

   ngCore

                  $
•
Conclude
Mobile




           Social              Game




                     Cross




ngCore
                    Platform




         Performance     Productivity

ngCore