SlideShare ist ein Scribd-Unternehmen logo
1 von 17
Domain-Specific
    Declarative Languages

      Johannes Gehrke
        Cornell University
     (Currently on sabbatical at
    FAST, A Microsoft Subsidiary)


http://www.cs.cornell.edu/johannes

             DB Summit, 5/29/2008
Declarative Domain-Specific Languages
 Declarative
   Nice algebraic properties for ease of
   reasoning ...
     for the user / query writer
     for system designer / implementer
   (Note that the language could look
   imperative.)
 Domain-specific
   Language should be appropriate for domain
   Can’t have “one size fits all”
                  DB Summit, 5/29/2008
Computer Games
 Unique challenges
   Virtual environments
   High degree of
   interactivity


 $17B in sales in 2007
   Rivals movie industry



                 DB Summit, 5/29/2008
Data-Driven Game Design
 Game design brings together many disciplines
   Art, music, computer science, etc...

 Today’s games are designed data-driven
   Game content is separated from game code

 Examples:
   Art and music are kept in separate, industry-standard
   file formats
   Character data is kept in XML
   Character behavior is specified through scripts

                    DB Summit, 5/29/2008
Advantages of Data-Driven Design
 Engine is reusable.
   Able to recoup R&D costs over several games.
   Possible to license engine to other companies.
 Can extend the life span of the game
   Adjust game balance
 Players can change the character of the game
   Modder communities develop around the game.
      Half-life   Counter Strike
   (Air Force uses modded StarCraft in officer training.)


                       DB Summit, 5/29/2008
Modding: Simulation Games
 Non-Player Characters (NPCs): Characters
 not directly controlled by the player.
   Controlled either by built-in or by
   player-designed scripts.


 “Doll House” games (e.g., The Sims)
   NPCs have needs and desires.
   Objects can satisfy needs and desires.
   Player controls the game via object placement.
 Real-Time Strategy games
   Troops move and fight in real time.
   Player controls the game via a limited number of commands.
   Player multitasks between large number of units.

                         DB Summit, 5/29/2008
Simulation Games: NPCs
 Games need complex NPC behavior.
   Example:
      Units are afraid of skeletons
      Likelihood of staying inverse proportional to number of skeletons
      around


 Simple example: morale                                               3 units
   Units afraid of skeletons
   Morale proportional to                                             2 units
   number of skeletons seen
   Processing cost:
                                                                      1 unit
      O(n) to count skeletons
      O(n2) to process all units                    Time per tick



                         DB Summit, 5/29/2008
Expressiveness vs. Performance
 Expressiveness:
 the range of behavior
 scriptable by modders

 As # of NPCs increases,
 expressiveness decreases
      Neverwinter Nights 2
           Each NPC fully scriptable

      WarCraft III
           Script armies, not NPCs
           Little NPC coordination

      Midieval: Total War
           No individual scripting at all

6/8/2008                  Database DB Summit, in Computer Games
                                   Processing 5/29/2008
Expressiveness vs. Performance
 Expressiveness:
 the range of behavior
 scriptable by modders
                                                                 Midieval:




                                                         High
                                                                 Total War
 As # of NPCs increases,




                                             Number of NPCs
 expressiveness decreases                                                WarCraft III

      Neverwinter Nights 2
           Each NPC fully scriptable                                                    The Sims 2


      WarCraft III                                                                               Neverwinter
           Script armies, not NPCs                       Low                                       Nights 2
           Little NPC coordination
                                                                Low                                      High
      Midieval: Total War                                                    Expressiveness
           No individual scripting at all

6/8/2008                  Database DB Summit, in Computer Games
                                   Processing 5/29/2008
Expressiveness vs. Performance
 Expressiveness:
 the range of behavior
 scriptable by modders
                                                                 Midieval:




                                                         High
                                                                                                     Goal
                                                                 Total War
 As # of NPCs increases,




                                             Number of NPCs
 expressiveness decreases                                                WarCraft III

      Neverwinter Nights 2
           Each NPC fully scriptable                                                    The Sims 2


      WarCraft III                                                                               Neverwinter
           Script armies, not NPCs                       Low                                       Nights 2
           Little NPC coordination
                                                                Low                                         High
      Midieval: Total War                                                    Expressiveness
           No individual scripting at all

6/8/2008                  Database DB Summit, in Computer Games
                                   Processing 5/29/2008
What We Have Done
    Developed domain-specific imperative language
          Game designers find SQL difficult
          Cannot program at the individual level
m ain : Uni {
            t
    / Co mpute # skeletons, group center
     /
    accu m c with su m , sx wi su m,
                                 th
         sy with su m over u f  rom UNIT {
      i(
       f isEne mySkeleton(u) &&
          d t m e,u) < r
           is (         ange) {
         c < 1 sx <- u sy <- u y;
            - ;        .x;        .
      }
    } in {
      / I too m any skeletons
      /f
      i (c > morale) {
       f
       le (norm=(x-sx/c * -sx c)+
          t                ) (x /
               (y-sy/c)* y-sy/c) i {
                        (       )n
         / Run in opposi d r ion
          /                te i ect
         vx <-(x /c)
                  -sx /norm;
         vy <-(y /c)
                  -sy /norm;
      }}
      ..
       .



                                     DB Summit, 5/29/2008
What We Have Done
   Developed domain-specific imperative language
   Compiles down to set-at-a-time Bag Algebra

m ain : Unit {
    / Co mpute # skeletons, group center
     /
    accu m c wi su m, sx with sum,
                  th
         sy with sum over u f  rom U NIT {
     i(
      f isEne mySkeleton(u) &&
          d t m e,u) < range) {
           is (
         c <-1; sx <-u.x; sy <- u.y;
      }
    } in {
     / I too many skeletons
      /f
     i (c > m orale) {
      f
       le (norm=(x-sx/c)*
          t                (x-sx/c)+
               (y /c)* -sy )in {
                 -sy (y /c)
         / Run in opposi direct
          /               te      ion
         vx <-(x /c)
                  -sx /norm;
         vy <-(y /c)
                  -sy /norm;
      }}
     ...


                                DB Summit, 5/29/2008
What We Have Done
 Developed domain-specific imperative language
 Compiles down to set-at-a-time Bag Algebra
 Built prototype of a game engine
 Integrated crowd simulations into SGL
 Developed novel transactional models
 for virtual worlds

 Opened up many more problems
    Main-memory data management
    with decision-support-style
    update workloads
       Query optimization,
       query processing, indexing
    Steering
    Collaborative motion planning



                            DB Summit, 5/29/2008
Recipe Applied to Other Domains
 Complex Event Processing
 Personalization of three-tier applications
   Build full CMT in 15 minutes
   Personalize the system to add double-blind
   reviewing for your conference in 5 minutes
 Expressive ad auctions
   Submit bidding programs to Google according
   to an ROI strategy

                 DB Summit, 5/29/2008
Declarative Domain-Specific Languages
 Declarative
   Nice algebraic properties for ease of
   reasoning ...
     for the user / query writer
     for system designer / implementer
   (Note that the language could look
   imperative.)
 Domain-specific
   Language should be appropriate for domain
   Can’t have “one size fits all”
                  DB Summit, 5/29/2008
Summary and Discussion
 Declarative, domain-specific languages

There is much more:
  Multi-core
  Creativity
    Attractor for the next
    generation of students?
    Gate to a new way of
    enabling and understanding
    creativity?

                    DB Summit, 5/29/2008
Let’s Play!



    http://www.cs.cornell.edu/johannes


Thank you: National Science Foundation, Air Force Office of
Scientific Research, Microsoft, Yahoo!


                        DB Summit, 5/29/2008

Weitere ähnliche Inhalte

Ähnlich wie Declarative Domain Languages for Games

Game development
Game developmentGame development
Game developmentAsido_
 
Distributed load testing (Local vs Cloud)
Distributed load testing (Local vs Cloud)Distributed load testing (Local vs Cloud)
Distributed load testing (Local vs Cloud)TestCampRO
 
Game Design 1 - Intro and Game Engines
Game Design 1 - Intro and Game EnginesGame Design 1 - Intro and Game Engines
Game Design 1 - Intro and Game EnginesJay Crossler
 
Minko stage3d 20130222
Minko stage3d 20130222Minko stage3d 20130222
Minko stage3d 20130222Minko3D
 
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...Johan Andersson
 
Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)
Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)
Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)Johan Andersson
 
Albion Online - Software Architecture of an MMO (talk at Quo Vadis 2016, Berlin)
Albion Online - Software Architecture of an MMO (talk at Quo Vadis 2016, Berlin)Albion Online - Software Architecture of an MMO (talk at Quo Vadis 2016, Berlin)
Albion Online - Software Architecture of an MMO (talk at Quo Vadis 2016, Berlin)David Salz
 
Shibboleth Scripting – Domain Specific Languages in Games
Shibboleth Scripting – Domain Specific Languages in GamesShibboleth Scripting – Domain Specific Languages in Games
Shibboleth Scripting – Domain Specific Languages in GamesMartin Pichlmair
 
Gdc 14 bringing unreal engine 4 to open_gl
Gdc 14 bringing unreal engine 4 to open_glGdc 14 bringing unreal engine 4 to open_gl
Gdc 14 bringing unreal engine 4 to open_glchangehee lee
 
Game Engine In Scientific Research
Game Engine In Scientific ResearchGame Engine In Scientific Research
Game Engine In Scientific ResearchHuda Rasmey
 
2009 - Node XL v.84+ - Social Media Network Visualization Tools For Excel 2007
2009 - Node XL v.84+ - Social Media Network Visualization Tools For Excel 20072009 - Node XL v.84+ - Social Media Network Visualization Tools For Excel 2007
2009 - Node XL v.84+ - Social Media Network Visualization Tools For Excel 2007Marc Smith
 
Computer Games Inner Workings - I. Loukeris AIT
Computer Games Inner Workings - I. Loukeris AITComputer Games Inner Workings - I. Loukeris AIT
Computer Games Inner Workings - I. Loukeris AITAIT_Communications
 
World of scriptcraft. The collective remaking of computergames
World of scriptcraft. The collective remaking of computergamesWorld of scriptcraft. The collective remaking of computergames
World of scriptcraft. The collective remaking of computergameskristineask
 
infoShare 2013: Adam Frańczak - Techniki optymalizacyjne w UDK/ UE3
infoShare 2013: Adam Frańczak - Techniki optymalizacyjne w UDK/ UE3infoShare 2013: Adam Frańczak - Techniki optymalizacyjne w UDK/ UE3
infoShare 2013: Adam Frańczak - Techniki optymalizacyjne w UDK/ UE3Infoshare
 
BMOSLFGEMW: A Spectrum of Game Engine Architectures
BMOSLFGEMW: A Spectrum of Game Engine ArchitecturesBMOSLFGEMW: A Spectrum of Game Engine Architectures
BMOSLFGEMW: A Spectrum of Game Engine Architecturesrndmcnlly
 
Cross Platform Game Programming with Cocos2d-js
Cross Platform Game Programming with Cocos2d-jsCross Platform Game Programming with Cocos2d-js
Cross Platform Game Programming with Cocos2d-jsTroy Miles
 

Ähnlich wie Declarative Domain Languages for Games (20)

Game development
Game developmentGame development
Game development
 
Distributed load testing (Local vs Cloud)
Distributed load testing (Local vs Cloud)Distributed load testing (Local vs Cloud)
Distributed load testing (Local vs Cloud)
 
Game Design 1 - Intro and Game Engines
Game Design 1 - Intro and Game EnginesGame Design 1 - Intro and Game Engines
Game Design 1 - Intro and Game Engines
 
Minko stage3d 20130222
Minko stage3d 20130222Minko stage3d 20130222
Minko stage3d 20130222
 
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...
 
Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)
Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)
Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)
 
Lang Net
Lang NetLang Net
Lang Net
 
Albion Online - Software Architecture of an MMO (talk at Quo Vadis 2016, Berlin)
Albion Online - Software Architecture of an MMO (talk at Quo Vadis 2016, Berlin)Albion Online - Software Architecture of an MMO (talk at Quo Vadis 2016, Berlin)
Albion Online - Software Architecture of an MMO (talk at Quo Vadis 2016, Berlin)
 
Shibboleth Scripting – Domain Specific Languages in Games
Shibboleth Scripting – Domain Specific Languages in GamesShibboleth Scripting – Domain Specific Languages in Games
Shibboleth Scripting – Domain Specific Languages in Games
 
Gdc 14 bringing unreal engine 4 to open_gl
Gdc 14 bringing unreal engine 4 to open_glGdc 14 bringing unreal engine 4 to open_gl
Gdc 14 bringing unreal engine 4 to open_gl
 
Game Engine In Scientific Research
Game Engine In Scientific ResearchGame Engine In Scientific Research
Game Engine In Scientific Research
 
Pixel shaders
Pixel shadersPixel shaders
Pixel shaders
 
2009 - Node XL v.84+ - Social Media Network Visualization Tools For Excel 2007
2009 - Node XL v.84+ - Social Media Network Visualization Tools For Excel 20072009 - Node XL v.84+ - Social Media Network Visualization Tools For Excel 2007
2009 - Node XL v.84+ - Social Media Network Visualization Tools For Excel 2007
 
GPU - how can we use it?
GPU - how can we use it?GPU - how can we use it?
GPU - how can we use it?
 
Computer Games Inner Workings - I. Loukeris AIT
Computer Games Inner Workings - I. Loukeris AITComputer Games Inner Workings - I. Loukeris AIT
Computer Games Inner Workings - I. Loukeris AIT
 
World of scriptcraft. The collective remaking of computergames
World of scriptcraft. The collective remaking of computergamesWorld of scriptcraft. The collective remaking of computergames
World of scriptcraft. The collective remaking of computergames
 
Level Designing and Mapping
Level Designing and MappingLevel Designing and Mapping
Level Designing and Mapping
 
infoShare 2013: Adam Frańczak - Techniki optymalizacyjne w UDK/ UE3
infoShare 2013: Adam Frańczak - Techniki optymalizacyjne w UDK/ UE3infoShare 2013: Adam Frańczak - Techniki optymalizacyjne w UDK/ UE3
infoShare 2013: Adam Frańczak - Techniki optymalizacyjne w UDK/ UE3
 
BMOSLFGEMW: A Spectrum of Game Engine Architectures
BMOSLFGEMW: A Spectrum of Game Engine ArchitecturesBMOSLFGEMW: A Spectrum of Game Engine Architectures
BMOSLFGEMW: A Spectrum of Game Engine Architectures
 
Cross Platform Game Programming with Cocos2d-js
Cross Platform Game Programming with Cocos2d-jsCross Platform Game Programming with Cocos2d-js
Cross Platform Game Programming with Cocos2d-js
 

Mehr von infoblog

CIDR 2009: James Hamilton Keynote
CIDR 2009: James Hamilton KeynoteCIDR 2009: James Hamilton Keynote
CIDR 2009: James Hamilton Keynoteinfoblog
 
CIDR 2009: Jeff Heer Keynote
CIDR 2009: Jeff Heer KeynoteCIDR 2009: Jeff Heer Keynote
CIDR 2009: Jeff Heer Keynoteinfoblog
 
Claremont Report on Database Research: Research Directions (Le Gruenwald)
Claremont Report on Database Research: Research Directions (Le Gruenwald)Claremont Report on Database Research: Research Directions (Le Gruenwald)
Claremont Report on Database Research: Research Directions (Le Gruenwald)infoblog
 
Claremont Report on Database Research: Research Directions (Rakesh Agrawal)
Claremont Report on Database Research: Research Directions (Rakesh Agrawal)Claremont Report on Database Research: Research Directions (Rakesh Agrawal)
Claremont Report on Database Research: Research Directions (Rakesh Agrawal)infoblog
 
Claremont Report on Database Research: Research Directions (Beng Chin Ooi)
Claremont Report on Database Research: Research Directions (Beng Chin Ooi)Claremont Report on Database Research: Research Directions (Beng Chin Ooi)
Claremont Report on Database Research: Research Directions (Beng Chin Ooi)infoblog
 
Claremont Report on Database Research: Research Directions (Alon Y. Halevy)
Claremont Report on Database Research: Research Directions (Alon Y. Halevy)Claremont Report on Database Research: Research Directions (Alon Y. Halevy)
Claremont Report on Database Research: Research Directions (Alon Y. Halevy)infoblog
 
Claremont Report on Database Research: Research Directions (Anastasia Ailamaki)
Claremont Report on Database Research: Research Directions (Anastasia Ailamaki)Claremont Report on Database Research: Research Directions (Anastasia Ailamaki)
Claremont Report on Database Research: Research Directions (Anastasia Ailamaki)infoblog
 
Database Research Principles Revealed (Small Size)
Database Research Principles Revealed (Small Size)Database Research Principles Revealed (Small Size)
Database Research Principles Revealed (Small Size)infoblog
 
Database Research Principles Revealed
Database Research Principles RevealedDatabase Research Principles Revealed
Database Research Principles Revealedinfoblog
 

Mehr von infoblog (10)

CIDR 2009: James Hamilton Keynote
CIDR 2009: James Hamilton KeynoteCIDR 2009: James Hamilton Keynote
CIDR 2009: James Hamilton Keynote
 
CIDR 2009: Jeff Heer Keynote
CIDR 2009: Jeff Heer KeynoteCIDR 2009: Jeff Heer Keynote
CIDR 2009: Jeff Heer Keynote
 
Claremont Report on Database Research: Research Directions (Le Gruenwald)
Claremont Report on Database Research: Research Directions (Le Gruenwald)Claremont Report on Database Research: Research Directions (Le Gruenwald)
Claremont Report on Database Research: Research Directions (Le Gruenwald)
 
Claremont Report on Database Research: Research Directions (Rakesh Agrawal)
Claremont Report on Database Research: Research Directions (Rakesh Agrawal)Claremont Report on Database Research: Research Directions (Rakesh Agrawal)
Claremont Report on Database Research: Research Directions (Rakesh Agrawal)
 
Claremont Report on Database Research: Research Directions (Beng Chin Ooi)
Claremont Report on Database Research: Research Directions (Beng Chin Ooi)Claremont Report on Database Research: Research Directions (Beng Chin Ooi)
Claremont Report on Database Research: Research Directions (Beng Chin Ooi)
 
Claremont Report on Database Research: Research Directions (Alon Y. Halevy)
Claremont Report on Database Research: Research Directions (Alon Y. Halevy)Claremont Report on Database Research: Research Directions (Alon Y. Halevy)
Claremont Report on Database Research: Research Directions (Alon Y. Halevy)
 
Claremont Report on Database Research: Research Directions (Anastasia Ailamaki)
Claremont Report on Database Research: Research Directions (Anastasia Ailamaki)Claremont Report on Database Research: Research Directions (Anastasia Ailamaki)
Claremont Report on Database Research: Research Directions (Anastasia Ailamaki)
 
Spot Sigs
Spot SigsSpot Sigs
Spot Sigs
 
Database Research Principles Revealed (Small Size)
Database Research Principles Revealed (Small Size)Database Research Principles Revealed (Small Size)
Database Research Principles Revealed (Small Size)
 
Database Research Principles Revealed
Database Research Principles RevealedDatabase Research Principles Revealed
Database Research Principles Revealed
 

Kürzlich hochgeladen

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 

Kürzlich hochgeladen (20)

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 

Declarative Domain Languages for Games

  • 1. Domain-Specific Declarative Languages Johannes Gehrke Cornell University (Currently on sabbatical at FAST, A Microsoft Subsidiary) http://www.cs.cornell.edu/johannes DB Summit, 5/29/2008
  • 2. Declarative Domain-Specific Languages Declarative Nice algebraic properties for ease of reasoning ... for the user / query writer for system designer / implementer (Note that the language could look imperative.) Domain-specific Language should be appropriate for domain Can’t have “one size fits all” DB Summit, 5/29/2008
  • 3. Computer Games Unique challenges Virtual environments High degree of interactivity $17B in sales in 2007 Rivals movie industry DB Summit, 5/29/2008
  • 4. Data-Driven Game Design Game design brings together many disciplines Art, music, computer science, etc... Today’s games are designed data-driven Game content is separated from game code Examples: Art and music are kept in separate, industry-standard file formats Character data is kept in XML Character behavior is specified through scripts DB Summit, 5/29/2008
  • 5. Advantages of Data-Driven Design Engine is reusable. Able to recoup R&D costs over several games. Possible to license engine to other companies. Can extend the life span of the game Adjust game balance Players can change the character of the game Modder communities develop around the game. Half-life Counter Strike (Air Force uses modded StarCraft in officer training.) DB Summit, 5/29/2008
  • 6. Modding: Simulation Games Non-Player Characters (NPCs): Characters not directly controlled by the player. Controlled either by built-in or by player-designed scripts. “Doll House” games (e.g., The Sims) NPCs have needs and desires. Objects can satisfy needs and desires. Player controls the game via object placement. Real-Time Strategy games Troops move and fight in real time. Player controls the game via a limited number of commands. Player multitasks between large number of units. DB Summit, 5/29/2008
  • 7. Simulation Games: NPCs Games need complex NPC behavior. Example: Units are afraid of skeletons Likelihood of staying inverse proportional to number of skeletons around Simple example: morale 3 units Units afraid of skeletons Morale proportional to 2 units number of skeletons seen Processing cost: 1 unit O(n) to count skeletons O(n2) to process all units Time per tick DB Summit, 5/29/2008
  • 8. Expressiveness vs. Performance Expressiveness: the range of behavior scriptable by modders As # of NPCs increases, expressiveness decreases Neverwinter Nights 2 Each NPC fully scriptable WarCraft III Script armies, not NPCs Little NPC coordination Midieval: Total War No individual scripting at all 6/8/2008 Database DB Summit, in Computer Games Processing 5/29/2008
  • 9. Expressiveness vs. Performance Expressiveness: the range of behavior scriptable by modders Midieval: High Total War As # of NPCs increases, Number of NPCs expressiveness decreases WarCraft III Neverwinter Nights 2 Each NPC fully scriptable The Sims 2 WarCraft III Neverwinter Script armies, not NPCs Low Nights 2 Little NPC coordination Low High Midieval: Total War Expressiveness No individual scripting at all 6/8/2008 Database DB Summit, in Computer Games Processing 5/29/2008
  • 10. Expressiveness vs. Performance Expressiveness: the range of behavior scriptable by modders Midieval: High Goal Total War As # of NPCs increases, Number of NPCs expressiveness decreases WarCraft III Neverwinter Nights 2 Each NPC fully scriptable The Sims 2 WarCraft III Neverwinter Script armies, not NPCs Low Nights 2 Little NPC coordination Low High Midieval: Total War Expressiveness No individual scripting at all 6/8/2008 Database DB Summit, in Computer Games Processing 5/29/2008
  • 11. What We Have Done Developed domain-specific imperative language Game designers find SQL difficult Cannot program at the individual level m ain : Uni { t / Co mpute # skeletons, group center / accu m c with su m , sx wi su m, th sy with su m over u f rom UNIT { i( f isEne mySkeleton(u) && d t m e,u) < r is ( ange) { c < 1 sx <- u sy <- u y; - ; .x; . } } in { / I too m any skeletons /f i (c > morale) { f le (norm=(x-sx/c * -sx c)+ t ) (x / (y-sy/c)* y-sy/c) i { ( )n / Run in opposi d r ion / te i ect vx <-(x /c) -sx /norm; vy <-(y /c) -sy /norm; }} .. . DB Summit, 5/29/2008
  • 12. What We Have Done Developed domain-specific imperative language Compiles down to set-at-a-time Bag Algebra m ain : Unit { / Co mpute # skeletons, group center / accu m c wi su m, sx with sum, th sy with sum over u f rom U NIT { i( f isEne mySkeleton(u) && d t m e,u) < range) { is ( c <-1; sx <-u.x; sy <- u.y; } } in { / I too many skeletons /f i (c > m orale) { f le (norm=(x-sx/c)* t (x-sx/c)+ (y /c)* -sy )in { -sy (y /c) / Run in opposi direct / te ion vx <-(x /c) -sx /norm; vy <-(y /c) -sy /norm; }} ... DB Summit, 5/29/2008
  • 13. What We Have Done Developed domain-specific imperative language Compiles down to set-at-a-time Bag Algebra Built prototype of a game engine Integrated crowd simulations into SGL Developed novel transactional models for virtual worlds Opened up many more problems Main-memory data management with decision-support-style update workloads Query optimization, query processing, indexing Steering Collaborative motion planning DB Summit, 5/29/2008
  • 14. Recipe Applied to Other Domains Complex Event Processing Personalization of three-tier applications Build full CMT in 15 minutes Personalize the system to add double-blind reviewing for your conference in 5 minutes Expressive ad auctions Submit bidding programs to Google according to an ROI strategy DB Summit, 5/29/2008
  • 15. Declarative Domain-Specific Languages Declarative Nice algebraic properties for ease of reasoning ... for the user / query writer for system designer / implementer (Note that the language could look imperative.) Domain-specific Language should be appropriate for domain Can’t have “one size fits all” DB Summit, 5/29/2008
  • 16. Summary and Discussion Declarative, domain-specific languages There is much more: Multi-core Creativity Attractor for the next generation of students? Gate to a new way of enabling and understanding creativity? DB Summit, 5/29/2008
  • 17. Let’s Play! http://www.cs.cornell.edu/johannes Thank you: National Science Foundation, Air Force Office of Scientific Research, Microsoft, Yahoo! DB Summit, 5/29/2008