SlideShare une entreprise Scribd logo
1  sur  41
Catan World
Grant Goodale
Dean Hudson
Mason Browne
                August 23, 2012
                    #gamedevjs
A year ago:
+


= ??
January 15: Go!

Port server-side engine to JavaScript
Redesign client-side engine for canvas, mobile
Design & build for scalability (up and down)
7 months later:
Catan World!
Catan World
Catan World
Catan++

Single massive game world
real time play - no turns!
Exploration, global trade, technology, and more
Catan World

Hardware-accelerated canvas rendering on desktop
and mobile
Realtime, cross-platform play
Inifinitely large world without sharding
Churchill
                A proper game engine


A full-stack JavaScript game engine
Dual-pipeline client rendering (DOM and canvas)
MMO server functionality with code parity between
client and server
Churchill
                 A proper game engine


~ 186 classes
~ 7412 lines of CoffeeScript
Compiles to ~10849 lines of JS, split out by target
platform
Churchill
 Engine
Front-End Architecture


  Ignore the Single Responsibility
       Principle At Your Peril
Game Entities

Manage position
Manage velocity
Manage collision / point intersection
Respond to update() calls
Rendering Primitives

 Implement draw specifics
 Separate draw calls for different renderers (visitor
 pattern)
 Delegated to by GameEntity for calls that require per
 pixel information (image hit detection, etc.)
Entity Manager

Keep track of entities in the game
Interface for adding, deleting, and retrieving entities
Provides component interface
Dispatches update calls and normalized events
Multiple Renderers

Pluggable renderers, adhering to a common interface
Allows canvas/DOM specific caching, double buffering,
etc.
Builds render queue
Makes draw calls to rects
Core Loop

Wrap it all together
Dispatch queued server/UI events
Make update calls
Build render queue
Call renderer.render()
Embracing Constraints


Using all canvas rendering in Catan World
Why?


Excessive DOM manipulation is slow and prone to
performance/memory issues
More consistent support for mobile wrappers
Because we can.
But...


 The DOM does A LOT of work
Infinite Scrolling


 Computationally expensive-nearly every pixel is dirty so
 we have fewer tricks to save drawImage calls
 Necessitates double buffering
 Relative positioning is hard
Building UI/UX in canvas


 Needed to implement our own click detection,
 windows, buttons, dragging handlers, etc.
 Use a JSON (esque) layout format to specify
 positioning
Building UI/UX in canvas
DOM events !=
Churchill events

 Need to normalize DOM events
 UI/UX events coming in on a single DOM element (the
 canvas)
 Touch and mouse normalized into pointer events
 Canvas relative positioning
Hit Detection

 See above
 Infer z-ordering
 Dispatch events to game entities based on x, y
 containment
 Bubbling behavior needs to be handled explicitly (brew
 your own!)
Hit Detection
Churchill
Services
Sage Advice


”Establish & Embrace Constraints” - @kevmoo
                             (or something to that effect)
On Node, Not Of Node

Churchill clients and services are pure.
Your JS engine is your runtime (V8, Nitro,
SpiderMonkey)
Node and browsers are platforms (runtime + features)
All code should run in all supported runtimes
Be Modular!


Factor out platform-specific feature functionality into
modules: File I/O, Network I/O, DB access
Supporting a given platform just means having the
supporting feature modules
Use Channels!

Discrete message & event channels
Abstraction lends itself well to composition and
chaining
In turn makes transport-agnostic message passing
easy
Support for TCP socket, in-memory (direct dispatch),
and socket.io (WebSocket, XHR, etc) transport
Emergent Properties!

Can run multiple, independent services in the same
runtime
Makes service composition a sane design decision
  No I/O overhead incurred for in-memory (direct
  dispatch) between services in the same runtime
  Scale!
Other Neat Stuff


 Message routing amongst cluster peers
 Leader election amongst cluster peers
 Locality-based message dispatching
Developing
With Churchill
Caveats


We’re an OS X shop
We like UNIX-y things: emacs, bash, sed/awk
We’re highly opinionated and not very nice
Node!

Development is node-centric
  engine is a set of npm modules
  express app for serving games in dev
Cake (make-alike) tasks for mobile client builds, tests
We Need You!


  Help us test before launch!
      http://catanworld.goko.com
We Need You!

     Come help us build the next
   generation of connected games

    iwanttowork@massivelyfun.com
     http://massivelyfun.com/jobs/

Contenu connexe

Tendances

Platform Virtualization
Platform VirtualizationPlatform Virtualization
Platform Virtualization/ /
 
5. IO virtualization
5. IO virtualization5. IO virtualization
5. IO virtualizationHwanju Kim
 
Deterministic Simulation - What modern online games can learn from the Game B...
Deterministic Simulation - What modern online games can learn from the Game B...Deterministic Simulation - What modern online games can learn from the Game B...
Deterministic Simulation - What modern online games can learn from the Game B...David Salz
 
Introduction to Virtualization
Introduction to VirtualizationIntroduction to Virtualization
Introduction to VirtualizationSplatDot.com Inc.
 
Virtual Machine Concept
Virtual Machine ConceptVirtual Machine Concept
Virtual Machine Conceptfatimaanique1
 
Implementation levels of virtualization
Implementation levels of virtualizationImplementation levels of virtualization
Implementation levels of virtualizationGokulnath S
 
Glance vBrownBagLatAm 2016
Glance vBrownBagLatAm 2016Glance vBrownBagLatAm 2016
Glance vBrownBagLatAm 2016Alvaro Soto
 
1.Introduction to virtualization
1.Introduction to virtualization1.Introduction to virtualization
1.Introduction to virtualizationHwanju Kim
 
Virtualization Technology Overview
Virtualization Technology OverviewVirtualization Technology Overview
Virtualization Technology OverviewOpenCity Community
 
Introduce to 3d rendering engine
Introduce to 3d rendering engineIntroduce to 3d rendering engine
Introduce to 3d rendering engineDaosheng Mu
 
LCA13: Citrix Keynote
LCA13: Citrix KeynoteLCA13: Citrix Keynote
LCA13: Citrix KeynoteLinaro
 
[UniteKorea2013] Memory profiling in Unity
[UniteKorea2013] Memory profiling in Unity[UniteKorea2013] Memory profiling in Unity
[UniteKorea2013] Memory profiling in UnityWilliam Hugo Yang
 
Scheduler Support for Video-oriented Multimedia on Client-side Virtualization
Scheduler Support for Video-oriented Multimedia on Client-side VirtualizationScheduler Support for Video-oriented Multimedia on Client-side Virtualization
Scheduler Support for Video-oriented Multimedia on Client-side VirtualizationHwanju Kim
 
Unity Internals: Memory and Performance
Unity Internals: Memory and PerformanceUnity Internals: Memory and Performance
Unity Internals: Memory and PerformanceDevGAMM Conference
 
Platform virtualization.raj
Platform virtualization.rajPlatform virtualization.raj
Platform virtualization.rajNRajaMohanReddy
 
GPU Renderfarm with Integrated Asset Management & Production System (AMPS)
GPU Renderfarm with Integrated Asset Management & Production System (AMPS)GPU Renderfarm with Integrated Asset Management & Production System (AMPS)
GPU Renderfarm with Integrated Asset Management & Production System (AMPS)Budianto Tandianus
 
Virtualization 101 - DeepDive
Virtualization 101 - DeepDiveVirtualization 101 - DeepDive
Virtualization 101 - DeepDiveAmit Agarwal
 

Tendances (20)

Platform Virtualization
Platform VirtualizationPlatform Virtualization
Platform Virtualization
 
5. IO virtualization
5. IO virtualization5. IO virtualization
5. IO virtualization
 
Deterministic Simulation - What modern online games can learn from the Game B...
Deterministic Simulation - What modern online games can learn from the Game B...Deterministic Simulation - What modern online games can learn from the Game B...
Deterministic Simulation - What modern online games can learn from the Game B...
 
Introduction to Virtualization
Introduction to VirtualizationIntroduction to Virtualization
Introduction to Virtualization
 
Virtual Machine Concept
Virtual Machine ConceptVirtual Machine Concept
Virtual Machine Concept
 
Virtualization
VirtualizationVirtualization
Virtualization
 
Implementation levels of virtualization
Implementation levels of virtualizationImplementation levels of virtualization
Implementation levels of virtualization
 
Glance vBrownBagLatAm 2016
Glance vBrownBagLatAm 2016Glance vBrownBagLatAm 2016
Glance vBrownBagLatAm 2016
 
1.Introduction to virtualization
1.Introduction to virtualization1.Introduction to virtualization
1.Introduction to virtualization
 
Virtualization Technology Overview
Virtualization Technology OverviewVirtualization Technology Overview
Virtualization Technology Overview
 
Introduce to 3d rendering engine
Introduce to 3d rendering engineIntroduce to 3d rendering engine
Introduce to 3d rendering engine
 
LCA13: Citrix Keynote
LCA13: Citrix KeynoteLCA13: Citrix Keynote
LCA13: Citrix Keynote
 
[UniteKorea2013] Memory profiling in Unity
[UniteKorea2013] Memory profiling in Unity[UniteKorea2013] Memory profiling in Unity
[UniteKorea2013] Memory profiling in Unity
 
Virtual machine
Virtual machineVirtual machine
Virtual machine
 
Scheduler Support for Video-oriented Multimedia on Client-side Virtualization
Scheduler Support for Video-oriented Multimedia on Client-side VirtualizationScheduler Support for Video-oriented Multimedia on Client-side Virtualization
Scheduler Support for Video-oriented Multimedia on Client-side Virtualization
 
Virtualization basics
Virtualization basics Virtualization basics
Virtualization basics
 
Unity Internals: Memory and Performance
Unity Internals: Memory and PerformanceUnity Internals: Memory and Performance
Unity Internals: Memory and Performance
 
Platform virtualization.raj
Platform virtualization.rajPlatform virtualization.raj
Platform virtualization.raj
 
GPU Renderfarm with Integrated Asset Management & Production System (AMPS)
GPU Renderfarm with Integrated Asset Management & Production System (AMPS)GPU Renderfarm with Integrated Asset Management & Production System (AMPS)
GPU Renderfarm with Integrated Asset Management & Production System (AMPS)
 
Virtualization 101 - DeepDive
Virtualization 101 - DeepDiveVirtualization 101 - DeepDive
Virtualization 101 - DeepDive
 

En vedette

Building for Real Time
Building for Real TimeBuilding for Real Time
Building for Real TimeGrant Goodale
 
Mapping Flatland: Using MongoDB for an MMO Crossword Game (GDC Online 2011)
Mapping Flatland: Using MongoDB for an MMO Crossword Game (GDC Online 2011)Mapping Flatland: Using MongoDB for an MMO Crossword Game (GDC Online 2011)
Mapping Flatland: Using MongoDB for an MMO Crossword Game (GDC Online 2011)Grant Goodale
 
Seattle javascript game development - Overview
Seattle javascript game development - OverviewSeattle javascript game development - Overview
Seattle javascript game development - OverviewGrant Goodale
 
Geospatial Indexing and Querying with MongoDB
Geospatial Indexing and Querying with MongoDBGeospatial Indexing and Querying with MongoDB
Geospatial Indexing and Querying with MongoDBGrant Goodale
 
Seni visual penggal 1: sejarah perkembangan seni lukis di malaysia
Seni visual penggal 1: sejarah perkembangan seni lukis di malaysia Seni visual penggal 1: sejarah perkembangan seni lukis di malaysia
Seni visual penggal 1: sejarah perkembangan seni lukis di malaysia Fairuz Alwi
 
Tokoh tokoh catan
Tokoh tokoh catanTokoh tokoh catan
Tokoh tokoh catanQing9595
 
Sejarah Seni Visual Malaysia
Sejarah Seni Visual MalaysiaSejarah Seni Visual Malaysia
Sejarah Seni Visual MalaysiaAbby Piong
 

En vedette (9)

Building for Real Time
Building for Real TimeBuilding for Real Time
Building for Real Time
 
Mapping Flatland: Using MongoDB for an MMO Crossword Game (GDC Online 2011)
Mapping Flatland: Using MongoDB for an MMO Crossword Game (GDC Online 2011)Mapping Flatland: Using MongoDB for an MMO Crossword Game (GDC Online 2011)
Mapping Flatland: Using MongoDB for an MMO Crossword Game (GDC Online 2011)
 
Seattle javascript game development - Overview
Seattle javascript game development - OverviewSeattle javascript game development - Overview
Seattle javascript game development - Overview
 
Geospatial Indexing and Querying with MongoDB
Geospatial Indexing and Querying with MongoDBGeospatial Indexing and Querying with MongoDB
Geospatial Indexing and Querying with MongoDB
 
Sejarah seni visual
Sejarah seni visualSejarah seni visual
Sejarah seni visual
 
Seni visual penggal 1: sejarah perkembangan seni lukis di malaysia
Seni visual penggal 1: sejarah perkembangan seni lukis di malaysia Seni visual penggal 1: sejarah perkembangan seni lukis di malaysia
Seni visual penggal 1: sejarah perkembangan seni lukis di malaysia
 
Tokoh seni
Tokoh seniTokoh seni
Tokoh seni
 
Tokoh tokoh catan
Tokoh tokoh catanTokoh tokoh catan
Tokoh tokoh catan
 
Sejarah Seni Visual Malaysia
Sejarah Seni Visual MalaysiaSejarah Seni Visual Malaysia
Sejarah Seni Visual Malaysia
 

Similaire à Catan world and Churchill

Leveraging Microsoft Embedded and Mobile Platforms
Leveraging Microsoft Embedded and Mobile PlatformsLeveraging Microsoft Embedded and Mobile Platforms
Leveraging Microsoft Embedded and Mobile Platformschristopherfairbairn
 
Building a game engine with jQuery
Building a game engine with jQueryBuilding a game engine with jQuery
Building a game engine with jQueryPaul Bakaus
 
Casual Engines 2009
Casual Engines 2009Casual Engines 2009
Casual Engines 2009David Fox
 
Game server development in node.js in jsconf eu
Game server development in node.js in jsconf euGame server development in node.js in jsconf eu
Game server development in node.js in jsconf euXie ChengChao
 
AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...
AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...
AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...DevClub_lv
 
JS Fest 2019. Денис Радин. AAA 3D графика в Web с ReactJS, BabylonJS и Unity3D
JS Fest 2019. Денис Радин. AAA 3D графика в Web с ReactJS, BabylonJS и Unity3DJS Fest 2019. Денис Радин. AAA 3D графика в Web с ReactJS, BabylonJS и Unity3D
JS Fest 2019. Денис Радин. AAA 3D графика в Web с ReactJS, BabylonJS и Unity3DJSFestUA
 
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
 
Paris Android LiveCode - Creating cross-platform 3D apps with Minko
Paris Android LiveCode - Creating cross-platform 3D apps with MinkoParis Android LiveCode - Creating cross-platform 3D apps with Minko
Paris Android LiveCode - Creating cross-platform 3D apps with MinkoMinko3D
 
Netflix Webkit-Based UI for TV Devices
Netflix Webkit-Based UI for TV DevicesNetflix Webkit-Based UI for TV Devices
Netflix Webkit-Based UI for TV DevicesMatt McCarthy
 
mloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game developmentmloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game developmentDavid Galeano
 
Techdays SE 2016 - Micros.. err Microcosmos
Techdays SE 2016 - Micros.. err MicrocosmosTechdays SE 2016 - Micros.. err Microcosmos
Techdays SE 2016 - Micros.. err MicrocosmosMike Martin
 
Minko - Creating cross-platform 3D apps with Minko
Minko - Creating cross-platform 3D apps with MinkoMinko - Creating cross-platform 3D apps with Minko
Minko - Creating cross-platform 3D apps with MinkoMinko3D
 
ITCamp 2011 - Mihai Nadas - Windows Azure interop
ITCamp 2011 - Mihai Nadas - Windows Azure interopITCamp 2011 - Mihai Nadas - Windows Azure interop
ITCamp 2011 - Mihai Nadas - Windows Azure interopITCamp
 
Google Dev Day2007
Google Dev Day2007Google Dev Day2007
Google Dev Day2007lucclaes
 
Dot netsupport in alpha five v11 coming soon
Dot netsupport in alpha five v11 coming soonDot netsupport in alpha five v11 coming soon
Dot netsupport in alpha five v11 coming soonRichard Rabins
 
Architecture of the Web browser
Architecture of the Web browserArchitecture of the Web browser
Architecture of the Web browserSabin Buraga
 
BitSquid Tech: Benefits of a data-driven renderer
BitSquid Tech: Benefits of a data-driven rendererBitSquid Tech: Benefits of a data-driven renderer
BitSquid Tech: Benefits of a data-driven renderertobias_persson
 
HTML5 Intoduction for Web Developers
HTML5 Intoduction for Web DevelopersHTML5 Intoduction for Web Developers
HTML5 Intoduction for Web DevelopersSascha Corti
 

Similaire à Catan world and Churchill (20)

Leveraging Microsoft Embedded and Mobile Platforms
Leveraging Microsoft Embedded and Mobile PlatformsLeveraging Microsoft Embedded and Mobile Platforms
Leveraging Microsoft Embedded and Mobile Platforms
 
Building a game engine with jQuery
Building a game engine with jQueryBuilding a game engine with jQuery
Building a game engine with jQuery
 
Casual Engines 2009
Casual Engines 2009Casual Engines 2009
Casual Engines 2009
 
Under The Hood
Under The HoodUnder The Hood
Under The Hood
 
CLI313
CLI313CLI313
CLI313
 
Game server development in node.js in jsconf eu
Game server development in node.js in jsconf euGame server development in node.js in jsconf eu
Game server development in node.js in jsconf eu
 
AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...
AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...
AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...
 
JS Fest 2019. Денис Радин. AAA 3D графика в Web с ReactJS, BabylonJS и Unity3D
JS Fest 2019. Денис Радин. AAA 3D графика в Web с ReactJS, BabylonJS и Unity3DJS Fest 2019. Денис Радин. AAA 3D графика в Web с ReactJS, BabylonJS и Unity3D
JS Fest 2019. Денис Радин. AAA 3D графика в Web с ReactJS, BabylonJS и Unity3D
 
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...
 
Paris Android LiveCode - Creating cross-platform 3D apps with Minko
Paris Android LiveCode - Creating cross-platform 3D apps with MinkoParis Android LiveCode - Creating cross-platform 3D apps with Minko
Paris Android LiveCode - Creating cross-platform 3D apps with Minko
 
Netflix Webkit-Based UI for TV Devices
Netflix Webkit-Based UI for TV DevicesNetflix Webkit-Based UI for TV Devices
Netflix Webkit-Based UI for TV Devices
 
mloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game developmentmloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game development
 
Techdays SE 2016 - Micros.. err Microcosmos
Techdays SE 2016 - Micros.. err MicrocosmosTechdays SE 2016 - Micros.. err Microcosmos
Techdays SE 2016 - Micros.. err Microcosmos
 
Minko - Creating cross-platform 3D apps with Minko
Minko - Creating cross-platform 3D apps with MinkoMinko - Creating cross-platform 3D apps with Minko
Minko - Creating cross-platform 3D apps with Minko
 
ITCamp 2011 - Mihai Nadas - Windows Azure interop
ITCamp 2011 - Mihai Nadas - Windows Azure interopITCamp 2011 - Mihai Nadas - Windows Azure interop
ITCamp 2011 - Mihai Nadas - Windows Azure interop
 
Google Dev Day2007
Google Dev Day2007Google Dev Day2007
Google Dev Day2007
 
Dot netsupport in alpha five v11 coming soon
Dot netsupport in alpha five v11 coming soonDot netsupport in alpha five v11 coming soon
Dot netsupport in alpha five v11 coming soon
 
Architecture of the Web browser
Architecture of the Web browserArchitecture of the Web browser
Architecture of the Web browser
 
BitSquid Tech: Benefits of a data-driven renderer
BitSquid Tech: Benefits of a data-driven rendererBitSquid Tech: Benefits of a data-driven renderer
BitSquid Tech: Benefits of a data-driven renderer
 
HTML5 Intoduction for Web Developers
HTML5 Intoduction for Web DevelopersHTML5 Intoduction for Web Developers
HTML5 Intoduction for Web Developers
 

Dernier

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
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
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
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
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
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
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
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
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
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
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
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
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
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 

Dernier (20)

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
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
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
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
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
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
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
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
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)
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
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
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
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
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
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
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 

Catan world and Churchill

  • 1. Catan World Grant Goodale Dean Hudson Mason Browne August 23, 2012 #gamedevjs
  • 3.
  • 5. January 15: Go! Port server-side engine to JavaScript Redesign client-side engine for canvas, mobile Design & build for scalability (up and down)
  • 10. Catan++ Single massive game world real time play - no turns! Exploration, global trade, technology, and more
  • 11. Catan World Hardware-accelerated canvas rendering on desktop and mobile Realtime, cross-platform play Inifinitely large world without sharding
  • 12. Churchill A proper game engine A full-stack JavaScript game engine Dual-pipeline client rendering (DOM and canvas) MMO server functionality with code parity between client and server
  • 13. Churchill A proper game engine ~ 186 classes ~ 7412 lines of CoffeeScript Compiles to ~10849 lines of JS, split out by target platform
  • 15. Front-End Architecture Ignore the Single Responsibility Principle At Your Peril
  • 16. Game Entities Manage position Manage velocity Manage collision / point intersection Respond to update() calls
  • 17. Rendering Primitives Implement draw specifics Separate draw calls for different renderers (visitor pattern) Delegated to by GameEntity for calls that require per pixel information (image hit detection, etc.)
  • 18. Entity Manager Keep track of entities in the game Interface for adding, deleting, and retrieving entities Provides component interface Dispatches update calls and normalized events
  • 19. Multiple Renderers Pluggable renderers, adhering to a common interface Allows canvas/DOM specific caching, double buffering, etc. Builds render queue Makes draw calls to rects
  • 20. Core Loop Wrap it all together Dispatch queued server/UI events Make update calls Build render queue Call renderer.render()
  • 21. Embracing Constraints Using all canvas rendering in Catan World
  • 22. Why? Excessive DOM manipulation is slow and prone to performance/memory issues More consistent support for mobile wrappers Because we can.
  • 23. But... The DOM does A LOT of work
  • 24. Infinite Scrolling Computationally expensive-nearly every pixel is dirty so we have fewer tricks to save drawImage calls Necessitates double buffering Relative positioning is hard
  • 25. Building UI/UX in canvas Needed to implement our own click detection, windows, buttons, dragging handlers, etc. Use a JSON (esque) layout format to specify positioning
  • 27. DOM events != Churchill events Need to normalize DOM events UI/UX events coming in on a single DOM element (the canvas) Touch and mouse normalized into pointer events Canvas relative positioning
  • 28. Hit Detection See above Infer z-ordering Dispatch events to game entities based on x, y containment Bubbling behavior needs to be handled explicitly (brew your own!)
  • 31. Sage Advice ”Establish & Embrace Constraints” - @kevmoo (or something to that effect)
  • 32. On Node, Not Of Node Churchill clients and services are pure. Your JS engine is your runtime (V8, Nitro, SpiderMonkey) Node and browsers are platforms (runtime + features) All code should run in all supported runtimes
  • 33. Be Modular! Factor out platform-specific feature functionality into modules: File I/O, Network I/O, DB access Supporting a given platform just means having the supporting feature modules
  • 34. Use Channels! Discrete message & event channels Abstraction lends itself well to composition and chaining In turn makes transport-agnostic message passing easy Support for TCP socket, in-memory (direct dispatch), and socket.io (WebSocket, XHR, etc) transport
  • 35. Emergent Properties! Can run multiple, independent services in the same runtime Makes service composition a sane design decision No I/O overhead incurred for in-memory (direct dispatch) between services in the same runtime Scale!
  • 36. Other Neat Stuff Message routing amongst cluster peers Leader election amongst cluster peers Locality-based message dispatching
  • 38. Caveats We’re an OS X shop We like UNIX-y things: emacs, bash, sed/awk We’re highly opinionated and not very nice
  • 39. Node! Development is node-centric engine is a set of npm modules express app for serving games in dev Cake (make-alike) tasks for mobile client builds, tests
  • 40. We Need You! Help us test before launch! http://catanworld.goko.com
  • 41. We Need You! Come help us build the next generation of connected games iwanttowork@massivelyfun.com http://massivelyfun.com/jobs/

Notes de l'éditeur

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. Can easily separate CPU-bound services into their own processes and scale them independently with minimal code changes (swap out the message dispatch strategy). You incur I/O overhead, but free up frontline dispatch loops.\n\n\n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n