SlideShare una empresa de Scribd logo
1 de 24
Browser Game Development with
           HTML5
       Chances and Pitfalls
Outline

Introduction
HTML 5
Developing with HTML and JavaScript
Showcases
Conclusion
Bytro Labs


Founded in 2009
Focus: browser based online games
Development and distribution
15 employees
2 mio. registered users
Completely independent
Bytro Labs Games

Supremacy 1914




                                Industrie Tycoon

PanzerWars



                       <HTML>
Goals:
  State of the art social browser game
  High quality graphics
  Massive number of objects rendered in real-time
  Graphical effects
     Animations
     Object Highlighting
     (Semi-) transparent Masking
  Low latency client server
  communication
  Easy access, good outreach
Outline

Introduction
HTML 5
Developing with HTML and JavaScript
Showcases
Conclusion
What is HTML 5

Collection of standards, extensions and technologies
New tags, JavaScript APIs and styling options
Plug-in less
Increasing hardware acceleration support (for graphics)
Standard(s) not finalized – “Living Standard”
HTML 5 Support




                                                        caniuse.com




                                            browser-statistik.de
- For older IE versions: Chrome Frame       25.09.2012 – Last 30 Days
HTML 5 in Topia Island


Canvas 2D
Web Sockets
CSS3
Web Storage

Planned
  Audio
  Web Worker
Outline

Introduction
HTML 5
Developing with HTML and JavaScript
Showcases
Conclusion
Client Server Architecture


    JavaScript                                        •   Visualization
                                                      •   User Interaction
                                      Client          •   Data Structures
                          client.js
             index.html                               •   Simulation Logic


                     Web Socket            Protocol: JSON


                                                     • Data Structures
Web Server                       Game Server         • Game Logic
              Java
                                                  Cassandra
                                                     DB
Developing with HTML and JavaScript


Client Server Code
  Keep Java and JavaScript data structures and code in sync
     Google Web Toolkit (GWT) – Everything in Java; JS cross-compiled
     note.js – Everything in JavaScript
     Strongly-Typed JavaScript (st-js) – Simple Java to JavaScript cross-compiler


JavaScript Code Structuring and Management
  Use supporting tools and libraries, e.g. require.js, Google Closure


JavaScript Tools Support
  Syntax highlighting and autocompleting can break easily
  Disciplined development (e.g. use Constructor / Prototype syntax,
  JSDoc type hints /** @type {string} */ var example; )
Developing with HTML and JavaScript


Backwards compatibility and Cross-Browser support
  Cross Browser libraries (e.g. jQuery)
  Polyfills


HTML GUI Development
  Missing WYSIWYG editor
      Code generation problem
  Application Suitability
      e.g. Multi-layer mouse listener problem


Future Development:
  Editors for HTML5 (e.g. Adobe Edge)
  HTML5 Libraries (e.g. CreateJS)
Outline

Introduction
HTML 5
Developing with HTML and JavaScript
Showcases
Conclusion
HTML 5 Laser Engine


Client


              Canvas 2D
mainloop
update();
render();
requestAnimationFrame();

                                   Web
                                  Storage
                      WebSocket
HTML 5 Laser Engine Showcases


Selection Bitmask
Highlight Outline
Transparent Masking
Animation
Selection Bitmask




Receive Image Data
Store Bitmask with JavaScript Bit Operations
                     imageData = canvasContext.getImageData(0, 0, image.width, image.height);
                     while(...) {
Selection Test                    ...
                                  pixelAlphaValue = imageData.data[(x + y * image.width) * 4 + 3];
                                  ...
   1. Bounding Box                if(pixelAlphaValue > threshold) {
                                              bitmask[byteIndex] |= (1 << bitIndex);
   2. Bitmask                     }
                                  ...
                     }
Highlight Outline




Setup / Init

offscreenCanvas = document.createElement('canvas');
offscreenCanvas.setAttribute('width', image.width);
offscreencanvas.setAttribute('height', image.height);
offscreenContext = offscreenCanvas.getContext('2d');
offscreenContext.drawImage(image, 0, 0);

imageData = offscreenContext.getImageData(0, 0, image.width, image.height);

while(...) {
               ...
               pixelAlphaValue = imageData.data[(x + y * image.width) * 4 + 3];
               ...
}

Draw Highlight
                                                                                        Vectorization
                                                                                  (Simplified potrace algorithm)
mainContext.beginPath();
mainContext.moveTo(point[0][0], point[0][1]);
while(...) {
             context.lineTo(point[i][0], point[i][1]);
}
context.stroke();
Transparent Masking




Draw Masked Sprite

maskBufferContext.clearRect(0, 0, spriteWidth, spriteHeight);

maskBufferContext.drawImage(spriteImage, 0, 0, spriteWidth, spriteHeight);

gradient = maskBufferContextctx.createRadialGradient(midX, midY, 0, midX, midY, spriteWidth/2);
gradient.addColorStop(0.2, 'white');
gradient.addColorStop(1, 'rgba(255,255,255,0)');
maskBufferContext.fillStyle = gradient;
maskBufferContext.globalCompositeOperation = 'destination-out';

maskBufferContext.beginPath();
maskBufferContext.arc(midX, midY, spriteWidth/2, 0, 360);
maskBufferContext.closePath();

maskBufferContext.fill();

mainContext.drawImage(maskBufferContext.canvas, spriteX, spriteY, spriteWidth, spriteHeight);
Animation




Sprite Animation
  drawImage(image, source rectangle, destination rectangle)


2D Animation
  2D Transformations
     Translate
     Scale
     Rotate
     Matrix Stack
Outline

Introduction
HTML 5
Developing with HTML and JavaScript
Showcases
Conclusion
Performance
    HTML5 Canvas 2D performance comparable with Flash and Java
    performance
    HW acceleration can not be presumed

Comparable Flash Game                       Topia Island
       ~13 FPS                                 ~18 FPS
Conclusion
   Browser Game Development with HTML5



Chances
   Browser Plug-in-less
   Increasing support
   High quality, high performance graphics


Pitfalls
   Large scale JavaScript undersupported
   Disciplined development required
   Different competing HTML5 technologies
Thank you!




www.topiaisland.com




   jobs@bytro.com

Más contenido relacionado

Destacado

Systematic Bytes - profile
Systematic Bytes - profileSystematic Bytes - profile
Systematic Bytes - profileJawad Bokhari
 
Horror Ideas Moodboard
Horror Ideas MoodboardHorror Ideas Moodboard
Horror Ideas Moodboardmarrd005
 
Ejemplo entrega de análisis previo Estrategia de Neuromarketing Digital Avanti
Ejemplo entrega de análisis previo Estrategia de Neuromarketing Digital AvantiEjemplo entrega de análisis previo Estrategia de Neuromarketing Digital Avanti
Ejemplo entrega de análisis previo Estrategia de Neuromarketing Digital AvantiAlexander Montoya
 
Seminario n° 13 evaluación diente pilar y áreas edéntulas
Seminario n° 13   evaluación diente pilar y áreas edéntulasSeminario n° 13   evaluación diente pilar y áreas edéntulas
Seminario n° 13 evaluación diente pilar y áreas edéntulasSebastián Meneses
 
KB 1 Aspek Keuangan
KB 1 Aspek KeuanganKB 1 Aspek Keuangan
KB 1 Aspek Keuanganpjj_kemenkes
 
77 2015 linea di indirizzo “le modalità di collaborazione alla valutazion...
77   2015   linea di indirizzo “le modalità di collaborazione alla valutazion...77   2015   linea di indirizzo “le modalità di collaborazione alla valutazion...
77 2015 linea di indirizzo “le modalità di collaborazione alla valutazion...http://www.studioingvolpi.it
 
Premier Gold Corporate Presentation
Premier Gold Corporate PresentationPremier Gold Corporate Presentation
Premier Gold Corporate PresentationCompany Spotlight
 
Examen de admision unasam 2013 I
Examen de admision unasam 2013 IExamen de admision unasam 2013 I
Examen de admision unasam 2013 IJoe Arroyo Suárez
 
Lalo Huber - Calidad en servicios de TI
Lalo Huber - Calidad en servicios de TILalo Huber - Calidad en servicios de TI
Lalo Huber - Calidad en servicios de TILalo Huber
 
Packet light short1
Packet light short1Packet light short1
Packet light short1Kurt Rahrig
 
WoTSF: A Framework for Searching in the Web of Things (WoT)
WoTSF: A Framework for Searching in the Web of Things (WoT)WoTSF: A Framework for Searching in the Web of Things (WoT)
WoTSF: A Framework for Searching in the Web of Things (WoT)Mina Younan
 
Catálogo formación tecnicos otp 2012 ed 1 comprimido slideshare
Catálogo formación tecnicos otp 2012 ed 1 comprimido slideshareCatálogo formación tecnicos otp 2012 ed 1 comprimido slideshare
Catálogo formación tecnicos otp 2012 ed 1 comprimido slideshareGrupotp
 
Rehabilitacion tras cirugia de ligamento cruzado anterior
Rehabilitacion tras cirugia de ligamento cruzado anteriorRehabilitacion tras cirugia de ligamento cruzado anterior
Rehabilitacion tras cirugia de ligamento cruzado anteriorGuillermo Rodriguez Maruri
 

Destacado (19)

Roberto Moya Clemente
Roberto Moya ClementeRoberto Moya Clemente
Roberto Moya Clemente
 
Systematic Bytes - profile
Systematic Bytes - profileSystematic Bytes - profile
Systematic Bytes - profile
 
Horror Ideas Moodboard
Horror Ideas MoodboardHorror Ideas Moodboard
Horror Ideas Moodboard
 
3 claves para logres tu libertad financiera
3 claves para logres tu libertad financiera 3 claves para logres tu libertad financiera
3 claves para logres tu libertad financiera
 
Ejemplo entrega de análisis previo Estrategia de Neuromarketing Digital Avanti
Ejemplo entrega de análisis previo Estrategia de Neuromarketing Digital AvantiEjemplo entrega de análisis previo Estrategia de Neuromarketing Digital Avanti
Ejemplo entrega de análisis previo Estrategia de Neuromarketing Digital Avanti
 
Seminario n° 13 evaluación diente pilar y áreas edéntulas
Seminario n° 13   evaluación diente pilar y áreas edéntulasSeminario n° 13   evaluación diente pilar y áreas edéntulas
Seminario n° 13 evaluación diente pilar y áreas edéntulas
 
KB 1 Aspek Keuangan
KB 1 Aspek KeuanganKB 1 Aspek Keuangan
KB 1 Aspek Keuangan
 
77 2015 linea di indirizzo “le modalità di collaborazione alla valutazion...
77   2015   linea di indirizzo “le modalità di collaborazione alla valutazion...77   2015   linea di indirizzo “le modalità di collaborazione alla valutazion...
77 2015 linea di indirizzo “le modalità di collaborazione alla valutazion...
 
Premier Gold Corporate Presentation
Premier Gold Corporate PresentationPremier Gold Corporate Presentation
Premier Gold Corporate Presentation
 
Examen de admision unasam 2013 I
Examen de admision unasam 2013 IExamen de admision unasam 2013 I
Examen de admision unasam 2013 I
 
Lalo Huber - Calidad en servicios de TI
Lalo Huber - Calidad en servicios de TILalo Huber - Calidad en servicios de TI
Lalo Huber - Calidad en servicios de TI
 
Packet light short1
Packet light short1Packet light short1
Packet light short1
 
Tema libre
Tema libreTema libre
Tema libre
 
luke-luobio_59_2016
luke-luobio_59_2016luke-luobio_59_2016
luke-luobio_59_2016
 
Vogue mediakit 2013
Vogue mediakit 2013Vogue mediakit 2013
Vogue mediakit 2013
 
WoTSF: A Framework for Searching in the Web of Things (WoT)
WoTSF: A Framework for Searching in the Web of Things (WoT)WoTSF: A Framework for Searching in the Web of Things (WoT)
WoTSF: A Framework for Searching in the Web of Things (WoT)
 
Catálogo formación tecnicos otp 2012 ed 1 comprimido slideshare
Catálogo formación tecnicos otp 2012 ed 1 comprimido slideshareCatálogo formación tecnicos otp 2012 ed 1 comprimido slideshare
Catálogo formación tecnicos otp 2012 ed 1 comprimido slideshare
 
Rehabilitacion tras cirugia de ligamento cruzado anterior
Rehabilitacion tras cirugia de ligamento cruzado anteriorRehabilitacion tras cirugia de ligamento cruzado anterior
Rehabilitacion tras cirugia de ligamento cruzado anterior
 
Taller de Blogger
Taller de BloggerTaller de Blogger
Taller de Blogger
 

Similar a HTML5 - Chances and Pitfalls (Bytro Labs GmbH)

Windows 8 Pure Imagination - 2012-11-24 - Getting your HTML5 game Windows 8 r...
Windows 8 Pure Imagination - 2012-11-24 - Getting your HTML5 game Windows 8 r...Windows 8 Pure Imagination - 2012-11-24 - Getting your HTML5 game Windows 8 r...
Windows 8 Pure Imagination - 2012-11-24 - Getting your HTML5 game Windows 8 r...Frédéric Harper
 
HTML5: An Overview
HTML5: An OverviewHTML5: An Overview
HTML5: An OverviewNagendra Um
 
An Introduction to Microsoft Edge
An Introduction to Microsoft EdgeAn Introduction to Microsoft Edge
An Introduction to Microsoft EdgeChris Love
 
JavaONE 2012 Using Java with HTML5 and CSS3
JavaONE 2012 Using Java with HTML5 and CSS3JavaONE 2012 Using Java with HTML5 and CSS3
JavaONE 2012 Using Java with HTML5 and CSS3Helder da Rocha
 
Windows8 lightningtalk
Windows8 lightningtalkWindows8 lightningtalk
Windows8 lightningtalkcarlspierre
 
Introduction to HTML5 & CSS3
Introduction to HTML5 & CSS3Introduction to HTML5 & CSS3
Introduction to HTML5 & CSS3Pravasini Sahoo
 
Building a Better Web with HTML5 and CSS3
Building a Better Web with HTML5 and CSS3Building a Better Web with HTML5 and CSS3
Building a Better Web with HTML5 and CSS3Karambir Singh Nain
 
Talk Paris Infovis 091207132953 Phpapp01(2)
Talk Paris Infovis 091207132953 Phpapp01(2)Talk Paris Infovis 091207132953 Phpapp01(2)
Talk Paris Infovis 091207132953 Phpapp01(2)johnnybiz
 
Using Web Standards to create Interactive Data Visualizations for the Web
Using Web Standards to create Interactive Data Visualizations for the WebUsing Web Standards to create Interactive Data Visualizations for the Web
Using Web Standards to create Interactive Data Visualizations for the Webphilogb
 
Building a game engine with jQuery
Building a game engine with jQueryBuilding a game engine with jQuery
Building a game engine with jQueryPaul Bakaus
 
Canvas in html5 - TungVD
Canvas in html5 - TungVDCanvas in html5 - TungVD
Canvas in html5 - TungVDFramgia Vietnam
 
Creating 3D Worlds with WebGL and Babylon.js - Codemotion.es
Creating 3D Worlds with WebGL and Babylon.js - Codemotion.esCreating 3D Worlds with WebGL and Babylon.js - Codemotion.es
Creating 3D Worlds with WebGL and Babylon.js - Codemotion.esdavrous
 
HTML5 Intoduction for Web Developers
HTML5 Intoduction for Web DevelopersHTML5 Intoduction for Web Developers
HTML5 Intoduction for Web DevelopersSascha Corti
 
qooxdoo - Open Source Ajax Framework
qooxdoo - Open Source Ajax Frameworkqooxdoo - Open Source Ajax Framework
qooxdoo - Open Source Ajax Frameworkecker
 
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5Sadaaki HIRAI
 

Similar a HTML5 - Chances and Pitfalls (Bytro Labs GmbH) (20)

Windows 8 Pure Imagination - 2012-11-24 - Getting your HTML5 game Windows 8 r...
Windows 8 Pure Imagination - 2012-11-24 - Getting your HTML5 game Windows 8 r...Windows 8 Pure Imagination - 2012-11-24 - Getting your HTML5 game Windows 8 r...
Windows 8 Pure Imagination - 2012-11-24 - Getting your HTML5 game Windows 8 r...
 
HTML5: An Overview
HTML5: An OverviewHTML5: An Overview
HTML5: An Overview
 
An Introduction to Microsoft Edge
An Introduction to Microsoft EdgeAn Introduction to Microsoft Edge
An Introduction to Microsoft Edge
 
What is HTML5
What is HTML5What is HTML5
What is HTML5
 
JavaONE 2012 Using Java with HTML5 and CSS3
JavaONE 2012 Using Java with HTML5 and CSS3JavaONE 2012 Using Java with HTML5 and CSS3
JavaONE 2012 Using Java with HTML5 and CSS3
 
Jsf2 html5-jazoon
Jsf2 html5-jazoonJsf2 html5-jazoon
Jsf2 html5-jazoon
 
Windows8 lightningtalk
Windows8 lightningtalkWindows8 lightningtalk
Windows8 lightningtalk
 
Introduction to HTML5 & CSS3
Introduction to HTML5 & CSS3Introduction to HTML5 & CSS3
Introduction to HTML5 & CSS3
 
Building a Better Web with HTML5 and CSS3
Building a Better Web with HTML5 and CSS3Building a Better Web with HTML5 and CSS3
Building a Better Web with HTML5 and CSS3
 
Talk Paris Infovis 091207132953 Phpapp01(2)
Talk Paris Infovis 091207132953 Phpapp01(2)Talk Paris Infovis 091207132953 Phpapp01(2)
Talk Paris Infovis 091207132953 Phpapp01(2)
 
Using Web Standards to create Interactive Data Visualizations for the Web
Using Web Standards to create Interactive Data Visualizations for the WebUsing Web Standards to create Interactive Data Visualizations for the Web
Using Web Standards to create Interactive Data Visualizations for the Web
 
HTML5 - A Whirlwind tour
HTML5 - A Whirlwind tourHTML5 - A Whirlwind tour
HTML5 - A Whirlwind tour
 
Building a game engine with jQuery
Building a game engine with jQueryBuilding a game engine with jQuery
Building a game engine with jQuery
 
Canvas in html5 - TungVD
Canvas in html5 - TungVDCanvas in html5 - TungVD
Canvas in html5 - TungVD
 
Creating 3D Worlds with WebGL and Babylon.js - Codemotion.es
Creating 3D Worlds with WebGL and Babylon.js - Codemotion.esCreating 3D Worlds with WebGL and Babylon.js - Codemotion.es
Creating 3D Worlds with WebGL and Babylon.js - Codemotion.es
 
HTML5 Intoduction for Web Developers
HTML5 Intoduction for Web DevelopersHTML5 Intoduction for Web Developers
HTML5 Intoduction for Web Developers
 
qooxdoo - Open Source Ajax Framework
qooxdoo - Open Source Ajax Frameworkqooxdoo - Open Source Ajax Framework
qooxdoo - Open Source Ajax Framework
 
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
 
Word camp nextweb
Word camp nextwebWord camp nextweb
Word camp nextweb
 
Word camp nextweb
Word camp nextwebWord camp nextweb
Word camp nextweb
 

Último

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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
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
 
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
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
[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
 
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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
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
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 

Último (20)

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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
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
 
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
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
[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
 
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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 

HTML5 - Chances and Pitfalls (Bytro Labs GmbH)

  • 1. Browser Game Development with HTML5 Chances and Pitfalls
  • 2. Outline Introduction HTML 5 Developing with HTML and JavaScript Showcases Conclusion
  • 3. Bytro Labs Founded in 2009 Focus: browser based online games Development and distribution 15 employees 2 mio. registered users Completely independent
  • 4. Bytro Labs Games Supremacy 1914 Industrie Tycoon PanzerWars <HTML>
  • 5. Goals: State of the art social browser game High quality graphics Massive number of objects rendered in real-time Graphical effects Animations Object Highlighting (Semi-) transparent Masking Low latency client server communication Easy access, good outreach
  • 6. Outline Introduction HTML 5 Developing with HTML and JavaScript Showcases Conclusion
  • 7. What is HTML 5 Collection of standards, extensions and technologies New tags, JavaScript APIs and styling options Plug-in less Increasing hardware acceleration support (for graphics) Standard(s) not finalized – “Living Standard”
  • 8. HTML 5 Support caniuse.com browser-statistik.de - For older IE versions: Chrome Frame 25.09.2012 – Last 30 Days
  • 9. HTML 5 in Topia Island Canvas 2D Web Sockets CSS3 Web Storage Planned Audio Web Worker
  • 10. Outline Introduction HTML 5 Developing with HTML and JavaScript Showcases Conclusion
  • 11. Client Server Architecture JavaScript • Visualization • User Interaction Client • Data Structures client.js index.html • Simulation Logic Web Socket Protocol: JSON • Data Structures Web Server Game Server • Game Logic Java Cassandra DB
  • 12. Developing with HTML and JavaScript Client Server Code Keep Java and JavaScript data structures and code in sync Google Web Toolkit (GWT) – Everything in Java; JS cross-compiled note.js – Everything in JavaScript Strongly-Typed JavaScript (st-js) – Simple Java to JavaScript cross-compiler JavaScript Code Structuring and Management Use supporting tools and libraries, e.g. require.js, Google Closure JavaScript Tools Support Syntax highlighting and autocompleting can break easily Disciplined development (e.g. use Constructor / Prototype syntax, JSDoc type hints /** @type {string} */ var example; )
  • 13. Developing with HTML and JavaScript Backwards compatibility and Cross-Browser support Cross Browser libraries (e.g. jQuery) Polyfills HTML GUI Development Missing WYSIWYG editor Code generation problem Application Suitability e.g. Multi-layer mouse listener problem Future Development: Editors for HTML5 (e.g. Adobe Edge) HTML5 Libraries (e.g. CreateJS)
  • 14. Outline Introduction HTML 5 Developing with HTML and JavaScript Showcases Conclusion
  • 15. HTML 5 Laser Engine Client Canvas 2D mainloop update(); render(); requestAnimationFrame(); Web Storage WebSocket
  • 16. HTML 5 Laser Engine Showcases Selection Bitmask Highlight Outline Transparent Masking Animation
  • 17. Selection Bitmask Receive Image Data Store Bitmask with JavaScript Bit Operations imageData = canvasContext.getImageData(0, 0, image.width, image.height); while(...) { Selection Test ... pixelAlphaValue = imageData.data[(x + y * image.width) * 4 + 3]; ... 1. Bounding Box if(pixelAlphaValue > threshold) { bitmask[byteIndex] |= (1 << bitIndex); 2. Bitmask } ... }
  • 18. Highlight Outline Setup / Init offscreenCanvas = document.createElement('canvas'); offscreenCanvas.setAttribute('width', image.width); offscreencanvas.setAttribute('height', image.height); offscreenContext = offscreenCanvas.getContext('2d'); offscreenContext.drawImage(image, 0, 0); imageData = offscreenContext.getImageData(0, 0, image.width, image.height); while(...) { ... pixelAlphaValue = imageData.data[(x + y * image.width) * 4 + 3]; ... } Draw Highlight Vectorization (Simplified potrace algorithm) mainContext.beginPath(); mainContext.moveTo(point[0][0], point[0][1]); while(...) { context.lineTo(point[i][0], point[i][1]); } context.stroke();
  • 19. Transparent Masking Draw Masked Sprite maskBufferContext.clearRect(0, 0, spriteWidth, spriteHeight); maskBufferContext.drawImage(spriteImage, 0, 0, spriteWidth, spriteHeight); gradient = maskBufferContextctx.createRadialGradient(midX, midY, 0, midX, midY, spriteWidth/2); gradient.addColorStop(0.2, 'white'); gradient.addColorStop(1, 'rgba(255,255,255,0)'); maskBufferContext.fillStyle = gradient; maskBufferContext.globalCompositeOperation = 'destination-out'; maskBufferContext.beginPath(); maskBufferContext.arc(midX, midY, spriteWidth/2, 0, 360); maskBufferContext.closePath(); maskBufferContext.fill(); mainContext.drawImage(maskBufferContext.canvas, spriteX, spriteY, spriteWidth, spriteHeight);
  • 20. Animation Sprite Animation drawImage(image, source rectangle, destination rectangle) 2D Animation 2D Transformations Translate Scale Rotate Matrix Stack
  • 21. Outline Introduction HTML 5 Developing with HTML and JavaScript Showcases Conclusion
  • 22. Performance HTML5 Canvas 2D performance comparable with Flash and Java performance HW acceleration can not be presumed Comparable Flash Game Topia Island ~13 FPS ~18 FPS
  • 23. Conclusion Browser Game Development with HTML5 Chances Browser Plug-in-less Increasing support High quality, high performance graphics Pitfalls Large scale JavaScript undersupported Disciplined development required Different competing HTML5 technologies