SlideShare a Scribd company logo
Ready to Play:
                        JavaScript / HTML5
                        Game Development
                               @zacharyjohnson
                        http://www.zachstronaut.com/



Friday, June 10, 2011
What does HTML5 have
              to do with video games?


Friday, June 10, 2011
And what the hell is
                         HTML5 anyway?
                 Mostly, HTML5 the markup language, is just a
                  bunch of new tags like: <canvas>, <audio>,
                          <video>, <article>, <nav> ...



Friday, June 10, 2011
And what the hell is
                         HTML5 anyway?
                ... but, HTML5 the marketing buzz word, has
             come to mean: all those new tags, plus CSS3 and
               highly optimized browser JavaScript engines.



Friday, June 10, 2011
Can I actually use
                         this stuff now?


Friday, June 10, 2011
Yes, let’s start with
                  <canvas> and <audio>!


Friday, June 10, 2011
<audio> lets you play... audio.
                        Background music, sound effects, volume
                               control, multiple channels.

                           Basic and generic JavaScript API.



Friday, June 10, 2011
<canvas> is a 2D
                            drawing surface.
                   Low level pixel manipulation or higher level
                 functions to draw paths, images, circles, etc.

                    Generic JavaScript API, not game-specific.


Friday, June 10, 2011
Can I see it in action?
                           Why yes! Yes you can!




Friday, June 10, 2011
Commander Clone
                          http://a.stronaut.com/z1e

                             -<canvas> and <audio>
                               -Akihabara Engine
                        -Experimental Gameplay Project


Friday, June 10, 2011
Re-Infiltration at Dusk
                          http://a.stronaut.com/z1b

                           -<canvas> and <audio>
                              -Custom Engine


Friday, June 10, 2011
Works in Safari,
              Chrome, Firefox, Opera,
                      and...

Friday, June 10, 2011
... [drum roll] ...


Friday, June 10, 2011
... Internet Explorer 9!


Friday, June 10, 2011
[applause]


Friday, June 10, 2011
Yeah but it probably sucks
                               in IE right?
                No, actually it is crazy fast in IE9 because it is
                     hardware accelerated via DirectX.




Friday, June 10, 2011
Good point Zach, how is the
                        performance of <canvas>?
                                Why thank you.




Friday, June 10, 2011
Performance of <canvas>
                        on your desktop/laptop is
                               very good.
                 Hardware acceleration of graphics in Chrome
                  and IE9, partial acceleration in Safari and
                         Firefox... rapidly progressing.



Friday, June 10, 2011
How good is very good?
              You could get 60 FPS if you made Tiny Wings or
             Angry Birds or Super Mario World or Zelda: A Link
                                to the Past.



Friday, June 10, 2011
What about the physics part of
                    Angry Birds though?
                        HTML5’s <canvas> only gives you
                          a place to draw graphics...




Friday, June 10, 2011
Fast JavaScript engines
                              to the rescue!
                        There are now at least two ports of the
                         Box2D physics library to JavaScript.




Friday, June 10, 2011
Impact Demo
                        http://impactjs.com/demos/physics/




Friday, June 10, 2011
2D Physics / 3D Blocks
                          http://a.stronaut.com/z1i

                           -NO <canvas> this time
                              -HTML and CSS3
                                 -Box2D.js


Friday, June 10, 2011
So you don’t have to use
                        <canvas> to make a game?
                  Sometimes it is better to use your web
              development skillz and make all your sprites and
                       layers with HTML and CSS.



Friday, June 10, 2011
When/why would I use
                              HTML/CSS?
                           -High level, can shorten dev cycle
                         -Can be more backwards compatible
                        -Can outperform <canvas> on mobile/
                                     iOS (for now)


Friday, June 10, 2011
If I make a game with HTML5
                    and JavaScript won’t it just
                           work on iOS?
                          Well... that depends!




Friday, June 10, 2011
So what are the gotchyas for
                      mobile HTML5 games?
                  -<audio> is crippled in mobile web browser
             -<canvas> is slow, not yet hardware accelerated
                 -HTML/CSS *do* have some acceleration!!
                -Should use touch events, not mouse events
               -JavaScript engine slower, trouble with math-
                          heavy things like physics

Friday, June 10, 2011
That sounds like a lot of
                              problems...
             Actually there are plenty of games you can make
                 for mobile phones with “HTML5” and a
                 commercial market is already forming.



Friday, June 10, 2011
Are there any tools to help me?
                        Sure, let me tell you about a few tools...




Friday, June 10, 2011
Akihabara
                        http://www.kesiev.com/akihabara/

                    -<canvas> based game library/framework
                       -Free and open source (MIT license)
                          -several game genre examples
                       -mobile web support out-of-the-box,
                     but keep your game and graphics simple


Friday, June 10, 2011
Impact
                             http://impactjs.com/

                    -<canvas> based game library/framework
                      -$99 flat fee, supports custom modules
                                 -Visual level editor
                        -Box2D physics already plugged in
                          -mobile support out-of-the-box,
                    web *AND* beta conversion tool to make a
                              native OpenGL iOS app

Friday, June 10, 2011
What about distribution?
                 Of course you can put your HTML5 game on a
                 web site, but there are other options as well...




Friday, June 10, 2011
Titanium
                        http://www.appcelerator.com/

                             -Free and open source
                   -Package game as native app for Windows,
                   Linux, Mac, Mac App Store, iOS App Store,
                                    Android.


Friday, June 10, 2011
See also...
              PhoneGap, NimbleKit, Chrome Web Store, and a
             reminder: Impact can port to iOS (alpha support)




Friday, June 10, 2011
Aren’t you forgetting
                    something? You haven’t said
                         much about 3D...
                  That’s because all the good games are in 2D.

                                   I kid, I kid.



Friday, June 10, 2011
Quickly, let me mention WebGL
                   -WebGL is an implementation of OpenGL
                  -It is hardware accelerated and low level
               -GL pros will be right at home with shaders, etc.
                  -Google already ported Quake II to WebGL



Friday, June 10, 2011
That sounds spiffy, when can I
                           use that?
                You can use it now in Chrome 10 and Firefox 4.
                Safari support is imminent, and Opera support
                                   will follow.

                        NO <3 on Internet Explorer or iOS.

Friday, June 10, 2011
Anything else I should know?
              Yeah... come to think of it you should know about
                 Web Sockets. This brings network i/o for
               multiplayer games to Safari, Chrome, and iOS
                      with Firefox support coming soon.

                        Check out: http://caniuse.com/


Friday, June 10, 2011
Thanks, do you have a
                           closing thought?
               Yes... web technology is moving so rapidly that,
                the longer your game’s dev cycle is, the more
                  compelling JavaScript / HTML5 become!



Friday, June 10, 2011
It’s dangerous to go alone!
                                 Take this!
                            http://a.stronaut.com/z1g




Friday, June 10, 2011
I’ve got a question!
                           I’ve got an answer!




Friday, June 10, 2011
Thank You


Friday, June 10, 2011

More Related Content

Similar to Ready to Play: JavaScript / HTML5 Game Development

YOU WILL REGRET THIS
YOU WILL REGRET THISYOU WILL REGRET THIS
YOU WILL REGRET THIS
MononcQc
 
Modern Browser Support
Modern Browser SupportModern Browser Support
Modern Browser SupportMark Meeker
 
HTML5 & JavaScript Games
HTML5 & JavaScript GamesHTML5 & JavaScript Games
HTML5 & JavaScript Games
Robin Hawkes
 
BSGO - next generation browser game development with unity3 d 1.5
BSGO - next generation browser game development with unity3 d 1.5BSGO - next generation browser game development with unity3 d 1.5
BSGO - next generation browser game development with unity3 d 1.5
Nick Porsche
 
Bringing HTML5 Video to Mobile Devices
Bringing HTML5 Video to Mobile DevicesBringing HTML5 Video to Mobile Devices
Bringing HTML5 Video to Mobile DevicesBrian Crescimanno
 
Android Development Slides
Android Development SlidesAndroid Development Slides
Android Development Slides
Victor Miclovich
 
3D in the Browser via WebGL: It's Go Time
3D in the Browser via WebGL: It's Go Time 3D in the Browser via WebGL: It's Go Time
3D in the Browser via WebGL: It's Go Time
Pascal Rettig
 
node.js for front-end developers
node.js for front-end developersnode.js for front-end developers
node.js for front-end developers
Garann Means
 
Boston Globe: Responsive Web Design
Boston Globe: Responsive Web DesignBoston Globe: Responsive Web Design
Boston Globe: Responsive Web DesignThe Media Consortium
 
Mobile Web on Drupal!
Mobile Web on Drupal!Mobile Web on Drupal!
Mobile Web on Drupal!
Lyza Gardner
 
"Probably, Maybe, No: The State of HTML5 Audio" - Scott Schiller
"Probably, Maybe, No: The State of HTML5 Audio" - Scott Schiller"Probably, Maybe, No: The State of HTML5 Audio" - Scott Schiller
"Probably, Maybe, No: The State of HTML5 Audio" - Scott Schiller
scottschiller
 
Sencha Touch beta — Amazing Mobile Web Apps with HTML5, CSS3 & JavaScript
Sencha Touch beta — Amazing Mobile Web Apps with HTML5, CSS3 & JavaScriptSencha Touch beta — Amazing Mobile Web Apps with HTML5, CSS3 & JavaScript
Sencha Touch beta — Amazing Mobile Web Apps with HTML5, CSS3 & JavaScript
David Kaneda
 
A Look at the Future of HTML5
A Look at the Future of HTML5A Look at the Future of HTML5
A Look at the Future of HTML5
Tim Wright
 
RIA Unleashed - Developing for the TV with litl os
RIA Unleashed - Developing for the TV with litl osRIA Unleashed - Developing for the TV with litl os
RIA Unleashed - Developing for the TV with litl osryancanulla
 
Web performance at WDCNZ
Web performance at WDCNZWeb performance at WDCNZ
Web performance at WDCNZ
John Clegg
 
Smart phone development
Smart phone developmentSmart phone development
Smart phone development
Myles Eftos
 
Using JavaScript for Mobile Development
Using JavaScript for Mobile DevelopmentUsing JavaScript for Mobile Development
Using JavaScript for Mobile Development
Stephen G
 
Groke
GrokeGroke
Play with html games
Play with html gamesPlay with html games
Play with html games
Huan Du
 
Koss, How to make desktop caliber browser apps
Koss, How to make desktop caliber browser appsKoss, How to make desktop caliber browser apps
Koss, How to make desktop caliber browser appsEvil Martians
 

Similar to Ready to Play: JavaScript / HTML5 Game Development (20)

YOU WILL REGRET THIS
YOU WILL REGRET THISYOU WILL REGRET THIS
YOU WILL REGRET THIS
 
Modern Browser Support
Modern Browser SupportModern Browser Support
Modern Browser Support
 
HTML5 & JavaScript Games
HTML5 & JavaScript GamesHTML5 & JavaScript Games
HTML5 & JavaScript Games
 
BSGO - next generation browser game development with unity3 d 1.5
BSGO - next generation browser game development with unity3 d 1.5BSGO - next generation browser game development with unity3 d 1.5
BSGO - next generation browser game development with unity3 d 1.5
 
Bringing HTML5 Video to Mobile Devices
Bringing HTML5 Video to Mobile DevicesBringing HTML5 Video to Mobile Devices
Bringing HTML5 Video to Mobile Devices
 
Android Development Slides
Android Development SlidesAndroid Development Slides
Android Development Slides
 
3D in the Browser via WebGL: It's Go Time
3D in the Browser via WebGL: It's Go Time 3D in the Browser via WebGL: It's Go Time
3D in the Browser via WebGL: It's Go Time
 
node.js for front-end developers
node.js for front-end developersnode.js for front-end developers
node.js for front-end developers
 
Boston Globe: Responsive Web Design
Boston Globe: Responsive Web DesignBoston Globe: Responsive Web Design
Boston Globe: Responsive Web Design
 
Mobile Web on Drupal!
Mobile Web on Drupal!Mobile Web on Drupal!
Mobile Web on Drupal!
 
"Probably, Maybe, No: The State of HTML5 Audio" - Scott Schiller
"Probably, Maybe, No: The State of HTML5 Audio" - Scott Schiller"Probably, Maybe, No: The State of HTML5 Audio" - Scott Schiller
"Probably, Maybe, No: The State of HTML5 Audio" - Scott Schiller
 
Sencha Touch beta — Amazing Mobile Web Apps with HTML5, CSS3 & JavaScript
Sencha Touch beta — Amazing Mobile Web Apps with HTML5, CSS3 & JavaScriptSencha Touch beta — Amazing Mobile Web Apps with HTML5, CSS3 & JavaScript
Sencha Touch beta — Amazing Mobile Web Apps with HTML5, CSS3 & JavaScript
 
A Look at the Future of HTML5
A Look at the Future of HTML5A Look at the Future of HTML5
A Look at the Future of HTML5
 
RIA Unleashed - Developing for the TV with litl os
RIA Unleashed - Developing for the TV with litl osRIA Unleashed - Developing for the TV with litl os
RIA Unleashed - Developing for the TV with litl os
 
Web performance at WDCNZ
Web performance at WDCNZWeb performance at WDCNZ
Web performance at WDCNZ
 
Smart phone development
Smart phone developmentSmart phone development
Smart phone development
 
Using JavaScript for Mobile Development
Using JavaScript for Mobile DevelopmentUsing JavaScript for Mobile Development
Using JavaScript for Mobile Development
 
Groke
GrokeGroke
Groke
 
Play with html games
Play with html gamesPlay with html games
Play with html games
 
Koss, How to make desktop caliber browser apps
Koss, How to make desktop caliber browser appsKoss, How to make desktop caliber browser apps
Koss, How to make desktop caliber browser apps
 

Recently uploaded

Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
UiPathCommunity
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
ViralQR
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 

Recently uploaded (20)

Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 

Ready to Play: JavaScript / HTML5 Game Development

  • 1. Ready to Play: JavaScript / HTML5 Game Development @zacharyjohnson http://www.zachstronaut.com/ Friday, June 10, 2011
  • 2. What does HTML5 have to do with video games? Friday, June 10, 2011
  • 3. And what the hell is HTML5 anyway? Mostly, HTML5 the markup language, is just a bunch of new tags like: <canvas>, <audio>, <video>, <article>, <nav> ... Friday, June 10, 2011
  • 4. And what the hell is HTML5 anyway? ... but, HTML5 the marketing buzz word, has come to mean: all those new tags, plus CSS3 and highly optimized browser JavaScript engines. Friday, June 10, 2011
  • 5. Can I actually use this stuff now? Friday, June 10, 2011
  • 6. Yes, let’s start with <canvas> and <audio>! Friday, June 10, 2011
  • 7. <audio> lets you play... audio. Background music, sound effects, volume control, multiple channels. Basic and generic JavaScript API. Friday, June 10, 2011
  • 8. <canvas> is a 2D drawing surface. Low level pixel manipulation or higher level functions to draw paths, images, circles, etc. Generic JavaScript API, not game-specific. Friday, June 10, 2011
  • 9. Can I see it in action? Why yes! Yes you can! Friday, June 10, 2011
  • 10. Commander Clone http://a.stronaut.com/z1e -<canvas> and <audio> -Akihabara Engine -Experimental Gameplay Project Friday, June 10, 2011
  • 11. Re-Infiltration at Dusk http://a.stronaut.com/z1b -<canvas> and <audio> -Custom Engine Friday, June 10, 2011
  • 12. Works in Safari, Chrome, Firefox, Opera, and... Friday, June 10, 2011
  • 13. ... [drum roll] ... Friday, June 10, 2011
  • 14. ... Internet Explorer 9! Friday, June 10, 2011
  • 16. Yeah but it probably sucks in IE right? No, actually it is crazy fast in IE9 because it is hardware accelerated via DirectX. Friday, June 10, 2011
  • 17. Good point Zach, how is the performance of <canvas>? Why thank you. Friday, June 10, 2011
  • 18. Performance of <canvas> on your desktop/laptop is very good. Hardware acceleration of graphics in Chrome and IE9, partial acceleration in Safari and Firefox... rapidly progressing. Friday, June 10, 2011
  • 19. How good is very good? You could get 60 FPS if you made Tiny Wings or Angry Birds or Super Mario World or Zelda: A Link to the Past. Friday, June 10, 2011
  • 20. What about the physics part of Angry Birds though? HTML5’s <canvas> only gives you a place to draw graphics... Friday, June 10, 2011
  • 21. Fast JavaScript engines to the rescue! There are now at least two ports of the Box2D physics library to JavaScript. Friday, June 10, 2011
  • 22. Impact Demo http://impactjs.com/demos/physics/ Friday, June 10, 2011
  • 23. 2D Physics / 3D Blocks http://a.stronaut.com/z1i -NO <canvas> this time -HTML and CSS3 -Box2D.js Friday, June 10, 2011
  • 24. So you don’t have to use <canvas> to make a game? Sometimes it is better to use your web development skillz and make all your sprites and layers with HTML and CSS. Friday, June 10, 2011
  • 25. When/why would I use HTML/CSS? -High level, can shorten dev cycle -Can be more backwards compatible -Can outperform <canvas> on mobile/ iOS (for now) Friday, June 10, 2011
  • 26. If I make a game with HTML5 and JavaScript won’t it just work on iOS? Well... that depends! Friday, June 10, 2011
  • 27. So what are the gotchyas for mobile HTML5 games? -<audio> is crippled in mobile web browser -<canvas> is slow, not yet hardware accelerated -HTML/CSS *do* have some acceleration!! -Should use touch events, not mouse events -JavaScript engine slower, trouble with math- heavy things like physics Friday, June 10, 2011
  • 28. That sounds like a lot of problems... Actually there are plenty of games you can make for mobile phones with “HTML5” and a commercial market is already forming. Friday, June 10, 2011
  • 29. Are there any tools to help me? Sure, let me tell you about a few tools... Friday, June 10, 2011
  • 30. Akihabara http://www.kesiev.com/akihabara/ -<canvas> based game library/framework -Free and open source (MIT license) -several game genre examples -mobile web support out-of-the-box, but keep your game and graphics simple Friday, June 10, 2011
  • 31. Impact http://impactjs.com/ -<canvas> based game library/framework -$99 flat fee, supports custom modules -Visual level editor -Box2D physics already plugged in -mobile support out-of-the-box, web *AND* beta conversion tool to make a native OpenGL iOS app Friday, June 10, 2011
  • 32. What about distribution? Of course you can put your HTML5 game on a web site, but there are other options as well... Friday, June 10, 2011
  • 33. Titanium http://www.appcelerator.com/ -Free and open source -Package game as native app for Windows, Linux, Mac, Mac App Store, iOS App Store, Android. Friday, June 10, 2011
  • 34. See also... PhoneGap, NimbleKit, Chrome Web Store, and a reminder: Impact can port to iOS (alpha support) Friday, June 10, 2011
  • 35. Aren’t you forgetting something? You haven’t said much about 3D... That’s because all the good games are in 2D. I kid, I kid. Friday, June 10, 2011
  • 36. Quickly, let me mention WebGL -WebGL is an implementation of OpenGL -It is hardware accelerated and low level -GL pros will be right at home with shaders, etc. -Google already ported Quake II to WebGL Friday, June 10, 2011
  • 37. That sounds spiffy, when can I use that? You can use it now in Chrome 10 and Firefox 4. Safari support is imminent, and Opera support will follow. NO <3 on Internet Explorer or iOS. Friday, June 10, 2011
  • 38. Anything else I should know? Yeah... come to think of it you should know about Web Sockets. This brings network i/o for multiplayer games to Safari, Chrome, and iOS with Firefox support coming soon. Check out: http://caniuse.com/ Friday, June 10, 2011
  • 39. Thanks, do you have a closing thought? Yes... web technology is moving so rapidly that, the longer your game’s dev cycle is, the more compelling JavaScript / HTML5 become! Friday, June 10, 2011
  • 40. It’s dangerous to go alone! Take this! http://a.stronaut.com/z1g Friday, June 10, 2011
  • 41. I’ve got a question! I’ve got an answer! Friday, June 10, 2011

Editor's Notes

  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. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n