SlideShare a Scribd company logo
ES
                      M t
                     A rip
                    G
                   B avaSc
                 E
               W L5 & J                                              es

             EN TM                                              bH
                                                                  aw
                                                                    k


           OP ing H                                           Ro

               s            U


Hi, I’m Rob Hawkes and I’m here today to talk about creating games on the open Web using
HTML5 and JavaScript.
I work at Mozilla, a non-profit fighting for a better Web. The guys who make Firefox.

Unsure about how much I like Mozilla? This here is a beautiful chicken and leek pie with extra
Firefox goodness.

It was made by my talented girlfriend and it was delicious.
I’m not sure how much time we’ll have for questions at the end, but feel free to grab me in
person after the talk or on Twitter.

These slides will go online after this talk.

I’ll put all the details up at the end.
Before we move on I just have a quick disclaimer.

This whole talk is about HTML5 and JavaScript as technologies for the creation of games.

They’re technologies that are intrinsically linked to each other by nature, but saying HTML5
and JavaScript every single time makes my head hurt.

So instead I’ll just be saying HTML5.

Just bear in mind that whenever I mention HTML5 I’m also referring to JavaScript as well.
So let’s go back in time for a moment.

Now I don’t actually remember when I first started playing computer games, although I know
that I started with consoles.
My first experience was with the ZX Spectrum and its amazing noises and epic loading times,
which I sorely miss…
Then there was the SNES, which really got me addicted to gaming.

Although it turns out my SNES was stolen when I was a kid. I did wonder where it went…
My parents replaced it with the Megadrive which, although not quite as awesome, was just as
fun.

From there it has been a constant stream of consoles, each smashing the performance and
functionality of its predecessor.

The N64, the Gamecube, the Dreamcast, the Playstation, the xBox.

You get the idea…
And spread throughout that time I dabbled in PC gaming, starting with games like Sim City…
And Megarace.

Who remembers this one?
And playing multiplayer Doom at my Dad’s Internet cafe.

What I’m getting at here is that gaming has been a big part of my life growing up, as it has
been with a lot of other people as well.

They’re fun to play, and they’re surprisingly fun to make.
ow
                                                            is n
                                                e                 cool
                                             tim            thing
                                          he             om
                                                           e
                                         T           do
                                                       fs
                                                   ol
                                               resh
                                             Th




Today we’re now on the threshold of something cool; being able to create awesome and
addictive games with nothing more than the technologies that we normally use to make
websites, namely HTML5 and JavaScript.

Since I began developing on the Web I really can’t remember a time when so many people are
working together to achieve something like this.
es
                                                       g a m
                                                  ing            ples
                                               ist           exam
                                             Ex      he
                                                        be
                                                          st
                                                      ft
                                                    eo
                                                 Som




The number of HTML5 games out there is growing every day.

I’d show you a selection of my favourites, just a tiny amount of what’s out there.
Quake II




Fully-functional multiplayer Quake II port.

http://code.google.com/p/quake2-gwt-port/
Cut The Rope

Cut The Rope, ported from iOS.

http://www.cuttherope.ie
Bejeweled

Bejeweled is a massively popular game on a whole variety of platforms.

Popcap recently released a purely HTML5 version.

http://bejeweled.popcap.com/html5
Command & Conquer

Command & Conquer: Tiberium Alliances is a HTML5 game from EA that is part real-time
strategy, part Farmville.

http://alliances.commandandconquer.com
GT Racing




GT Racing: Motor Academy is a 3D racing game by Gameloft and Mandreel.

http://www.mandreel.com/?page_id=1312
BrowserQuest




BrowserQuest is a massively-multiplayer RPG that Mozilla recently launched to the public.

It works great on mobile and desktop devices but what’s even better is that, aside from being
an addictive game, the entire source code is on GitHub.

http://browserquest.mozilla.org
https://github.com/mozilla/BrowserQuest
http://hacks.mozilla.org/2012/03/browserquest/
It’s clear that HTML5 is something that is really becoming a contender for games on the Web.

It’s an open technology stack that is plugin-less, doesn’t require compilation, and works the
same across devices and platforms.
g y
                                                       o lo
                                                    chn         es
                                                  Te      L5g
                                                             am
                                                       TM
                                                        fH
                                                      so
                                                  cene
                                                 s
                                           he
                                         dt
                                      hin
                                    Be


There are a few key technologies that are involved in the development of HTML5 games.

Here are some of my favourites.
vas
                                                             an
                                                            C    tfo
                                                                    rm
                                                                    pla
                                                                ics
                                                            raph
                                                           g
                                                      2D




Canvas is a 2D graphics platform that uses both HTML5 and JavaScript.

It’s quite amazing what can be done with such simple drawing and image manipulation tools.

https://developer.mozilla.org/en/HTML/Canvas
Silk is a stunning example of what can be achieved by combining the simple drawing tools
available in canvas.

http://weavesilk.com
Canvas




     <canvas id='myCanvasElement' width='400' height='400'></canvas>




Using canvas is very straight forward.

The first thing you need to do is add a canvas DOM element to your HTML page.
Canvas

    var canvas = document.getElementById('myCanvasElement');  
    var ctx = canvas.getContext('2d');


    ctx.fillStyle = "rgb(200,0,0)";  
    ctx.fillRect(10, 10, 55, 50);  
      
    ctx.fillStyle = "rgba(0, 0, 200, 0.5)";  
    ctx.fillRect(30, 30, 55, 50);




From there you can then access the canvas through JavaScript to draw on it and do other cool
stuff.

This is small canvas demo that draws a solid red square underneath a blue one with half
transparency.

‘myCanvasElement’ refers to a HTML <canvas> element that you’ll need to place in your
HTML file somewhere. In this example, I’m assuming that you’ve already done that.
GL
                                                              eb
                                                             W form
                                                                     lat
                                                                   sp
                                                                hic
                                                            grap
                                                       3D




WebGL brings the ability to provide advanced 3D graphics directly within the browser.

https://developer.mozilla.org/en/WebGL
HelloRacer is a little game that lets you drive a Formula One car around your browser. It’s a
beautiful example of WebGL in action.

http://helloracer.com/webgl/
Rome is a music video created with WebGL. It’s an amazing example of what the technology
can achieve in a real-world situation given a large team.

http://ro.me
Tinkercad is probably the best use of WebGL that I’ve seen in a production situation.

It’s a Web app that allows you to create 3D objects in your browser using WebGL, then get
them printed and sent to your doorstep in just a few simple clicks. It’s seriously awesome.

https://tinkercad.com
Both Google Maps and Nokia have recently added support for WebGL. The Nokia version is
particularly impressive because they fully render and texture 3D shapes of buildings.

http://support.google.com/maps/bin/answer.py?hl=en&answer=1630790
http://maps.nokia.com/webgl/
I’m not going to lie, WebGL isn’t the easiest thing to learn. Then again, no raw 3D code is
that simple.

Instead, I recommend checking out a library called three.js which abstracts WebGL and makes
it much easier to implement.

https://github.com/mrdoob/three.js/
m   e
                                        Fra
                                      on           ps
                                   ati    ati
                                             on
                                                loo

                               nim d anim
                           estA timise
                         qu      Op
                       re

requestAnimationFrame is the new, better way of managing animation in JavaScript.

Instead of constantly running a setTimeout or setInterval function, which lack performance
and spike CPU usage, requestAnimation frame puts the browser in control of things and
keeps things running smoothly.

Right now you can’t easily set a specific framerate when using requestAnimationFrame but so
long as you use time-based updates (not frame-based) in your game then you’ll be fine.
requestAnimationFrame

    function update(timestamp) {  
      // DO SOMETHING


      window.mozRequestAnimationFrame(update);  
    }
     
    window.mozRequestAnimationFrame(update);




In this example, I’m only using the Mozilla prefixed version of requestAnimationFrame. In
reality, there’s a really good shim by Paul Irish that handles cross-browser
requestAnimationFrame.

http://paulirish.com/2011/requestanimationframe-for-smart-animating/
d io
                                                    a  u
                                                 L5          usic
                                               TM       nd
                                                           m
                                              H     grou
                                                        ck
                                                      ba
                                                   nd
                                               ctsa
                                           effe
                                      nd
                                   Sou


HTML5 audio allows for plugin-less game sound effects and background music.

Audio data APIs implemented by Mozilla and Google allow for manipulation of audio and
much more fine-grained control.

https://developer.mozilla.org/en/HTML/Element/audio
This is something I made especially for the ASSEMBLY 2011 event in Finland.

It’s an audio visualiser that uses WebGL and the HTML5 Audio Data API.

http://robhawkes.github.com/webgl-html5-audio-visualiser/
Audio



     <audio id='myAudioElement' controls>
       <source src='audiofile.ogg' type='audio/ogg'>
     </audio>




Like canvas, using audio is also straight forward.

The first thing you need to do is add an audio DOM element to your HTML page.
Audio


    var audio = document.getElementById('myAudioElement');


    audio.play();


    audio.pause();




From there you can then access the audio element through JavaScript to control it.
e ts
                                                     ock
                                                   bS       ation
                                                  e
                                                 W omm  un
                                                          ic

                                                      yerc
                                                ltipla
                                              Mu




WebSockets can be used for the real-time communication between a player and the game
server.

With WebSockets you can create multiplayer games with relative ease.

https://developer.mozilla.org/en/WebSockets
WebSockets


    var ws = new WebSocket('http://example.com/socketserver');


    ws.send('This message is sent to the WebSocket server');


    ws.onmessage = function (event) {  
      console.log(event.data);  
    }




WebSockets are created entirely from JavaScript without the need to add elements to the
HTML page.

A new WebSocket connection can be opened by calling the ‘new WebSocket’ constructor and
passing it the URL to the WebSocket server.

From there you can call the ‘send’ method to push data to the server.

Or listen for the ‘onmessage’ event to handle data pushed to you from the server.
PI
                                                          n  A
                                                    re  e           ul
                                                 Sc             we
                                                                  rf
                                             ull           et
                                                              po
                                            F      im
                                                      ple
                                                         ,y
                                                        S




The Full Screen API allows you to expand any HTML element to fill the users screen, even if
the browser isn’t running full screen itself.

For games, this is great because you can make the small canvas element fill the entire screen.

Outside of games, this is useful for video elements and Web applications.

https://bugzilla.mozilla.org/show_bug.cgi?id=545812
http://blog.pearce.org.nz/2011/09/mozilla-full-screen-api-progress-update.html
https://wiki.mozilla.org/Platform/Features/Full_Screen_APIs
Full Screen API



    var canvas = document.getElementById('myCanvasElement');


    canvas.mozRequestFullScreen();




The Full Screen API can be requested from any DOM element.

In this example you’re asking a canvas element to expand to fill the screen.

One thing to note is that you can’t just make any element fill the screen whenever you want.
Right now, the user has to click or press a key to initiate the Full Screen API.
P  I
                                                          A
                                                    o ck ace
                                                r L           pl
                                              te           ne
                                           oin      rso
                                                       rino
                                          P       cu
                                                     he
                                                   gt
                                              ockin
                                             L



The Pointer Lock API is an attempt at improving the mouse as an input device.

It would be used in situations like games and 3D visualisations where the mouse position
rotates or moves you around a 3D space.

As it stands there’d still be a cursor moving around the screen causing all sorts of trouble
when you want to click on something in your game.

With the new API you can lock your mouse position and stop it from getting in the way and
being a nuisance.

Both Google and Mozilla are working on an implementation of this right now, it’s available in
a custom build of Firefox.

https://developer.mozilla.org/en/API/Pointer_Lock_API
https://bugzilla.mozilla.org/show_bug.cgi?id=633602
Full Screen API



    var canvas = document.getElementById('myCanvasElement');


    canvas.mozRequestPointerLock();




The Pointer Lock API can be requested from any DOM element that is already in full screen.
P I
                                                          d A
                                                     p a           eb
                                                   me         he
                                                                 W
                                                 Ga      et
                                                            ot
                                                       ol
                                                     ns co
                                                     he
                                                   gt
                                                gin
                                            Brin



The Gamepad API is one of the major improvements to input that is coming.

Both Mozilla and Google are working an an implementation of this and there is actually an
experimental build of Firefox available to the public that has it working. The API is also in the
dev build of Chrome.

What I find most interesting about the Gamepad API is that it might be just the thing we need
to finally justify HTML5 gaming on a TV or console.

Who wants to use a keyboard and mouse while sitting on the sofa?

https://wiki.mozilla.org/GamepadAPI
http://www.gamepadjs.com
https://github.com/jbuck/input.js
Gamepad API demo
I’d like to show you a quick demo of the Gamepad API working in Firefox Nightly and Google
Chrome.

In this example I’ve connected my Logitech controller to my Mac, but I could also use a PS3
controller or practically any other USB controller.
This is another little demo that I put together to show off the Gamepad API implemented in
my game Rawkets.
Connection


    function onGamepadConnected(e) {
      var controller = e.gamepad;
      console.log("Gamepad connected", controller.id);
    }


    window.addEventListener("MozGamepadConnected",
                            onGamepadConnected);




MozGamepadConnected

It passes an event object that itself contains a gamepad object in reference to the connected
gamepad.
Disconnection


     function onGamepadDisconnected(e) {
       var controller = e.gamepad;
       console.log("Gamepad disconnected", controller.id);
     }


     window.addEventListener("MozGamepadDisconnected",
                             onGamepadDisconnected);




MozGamepadDisconnected

It passes an event object that itself contains a gamepad object in reference to the
disconnected gamepad.
Button events
    function onGamepadButtonDown(e) {
      var button = e.button;
      console.log("Gamepad button pressed", button);
    }


    function onGamepadButtonUp(e) {
      var button = e.button;
      console.log("Gamepad button released", button);
    }


    window.addEventListener("MozGamepadButtonDown", onGamepadButtonDown);
    window.addEventListener("MozGamepadButtonUp", onGamepadButtonUp);


MozGamepadButtonDown
MozGamepadButtonUp

Each pass an event object that contains a button property.

The button property is the index number of the specific button, respective to the entire array
of buttons on the gamepad.
Axis events


    function onGamepadAxisMove(e) {
      var axis = e.axis;
      var value = e.value;


        console.log("Gamepad axis move", axis, value);
    }


    window.addEventListener("MozGamepadAxisMove", onGamepadAxisMove);




MozGamepadAxisMove is fired on movement of a joystick or analogue trigger.

Passes an event object that contains axis and value properties.

The axis property is the index number of the specific axis that was moved, respective to the
entire array of axes on the gamepad.

The value property is a -1.0 to 1.0 float. For example, an x-axis on a joystick when fully
pressed to the left would have a -1.0 value.
Gamepad state

     function checkState() {
       for (var i = 0; i < controller.buttons.length; i++) {
         console.log("Button state", i, controller.buttons[i]);
       }


         for (var j = 0; j < controller.axes.length; j++) {
           console.log("Axis state", j, controller.axes[j]);
         }
     }



If you don’t want to use events you can also poll the entire gamepad state whenever you
want.

The only pre-requisite is that a gamepad is already connected and you’ve stored a reference
to it somewhere, perhaps in a variable or array.

Once you have reference to a gamepad you get the state by reading its buttons and axes
objects. These are both arrays that contain data about every single button and axis available.

The value of each button in the buttons array is a boolean that tells you whether the button is
pressed down (true) or not (false).

The value of each axis in the axes array is a -1.0 to 1.0 float that tell you exactly where a
joystick is or how far a trigger has been pulled.
P  I
                                                   n   A
                                             a t io            es
                                          n t             de
                                                            vic
                                     ri e           ob
                                                      ile
                                  n O          on
                                                  m

                               ree        ha
                                            ve
                             Sc     M ust-




The Screen Orientation API allows you to do things like changing and locking, you guessed it,
the orientation of the screen.

Before now, it’s been incredibly difficult to lock orientation on a website or game using
nothing but JavaScript.

https://bugzilla.mozilla.org/show_bug.cgi?id=740188
http://dvcs.w3.org/hg/screen-orientation/raw-file/default/Overview.html
Screen Orientation API




                      screen.mozLockOrientation('landscape');




The Screen Orientation API is another relatively simple one.

It just landed in Firefox Nightly on mobile.

All you need to do is call the ‘lockOrientation’ method of the screen object and pass it a
orientation string.

It’s important to note that you also need to be using the Full Screen API for the orientation
lock to work.
n s
                                                      tio
                                               plica bsite
                                             ap         yw
                                                          e
                                          eb     ta
                                                    fanc
                                         W ot jus
                                                     N




The concept of Web apps is something that is gaining a lot of traction at the moment.

HTML5 games are effectively glorified Web apps.

It’s no doubt this this traction is as a result of the success of native applications and games
on the desktop and mobile, particularly with iOS and Android.
It’s something we’re spending a lot of time on at Mozilla.

We envisage Web apps to run on any device, any browser, and to be distributed through any
store or website.

https://apps.mozillalabs.com
https://developer.mozilla.org/en/OpenWebApps
nce
                                                            erie
                                                         exp      scre
                                                                      en

                                         like                  ho
                                                                 me
                                       p-                op
                                                            or
                                     Ap              eskt
                                                 thed
                                       from
                                    ch
                                  un
                                La

Something that needs to be tackled with Web apps is how to make them feel like real
applications rather than glorified websites.

One way that is being considered is completely removing the browser chrome and running
the application in it’s own window.

This will effectively mean that you have full control of the app UI and it won’t look like it’s
being run in a browser.
At Mozilla we call this WebRT, which stands for Web Run-Time.

By using WebRT you can install a Web app directly into the OS just like you would a native
application.

The WebRT app will look and feel like a native application when launched but will actually be
running a browser rendering engine behind the scenes.
e s
                                                      gin
                                                  e n         ay
                                                e
                                               m game     st
                                                            od
                                             Ga
                                                  ML5
                                                     HT
                                                  te
                                              Crea




If you haven’t already then I encourage you to give HTML5 game development a go.

And you don't have to create an entire game infrastructure from scratch, you can use some of
the existing engines that are proving popular.
Impact. A 2D game engine.

I used this recently, and it’s really well made and has a good level editor and development
tools.

The documentation is great and the author is active and very helpful.

http://impactjs.com/
Crafty. Another 2D game engine.

It’s a free engine and is doing much better than other free engines out there.

http://craftyjs.com/
Isongenic Engine. A 2D to 2.5D game engine.

One of the most promising engines out there today.

Massively multiplayer networking built in, uses Node and MongoDB, and has canvas or DOM-
based graphics.

http://www.isogenicengine.com
u p
                                                              g
                                                            in zon
                                                         eep       ri
                                                        K      e ho
                                                                th
                                                          ff on
                                                        tu
                                                    uchs
                                                   m
                                                So



I’ve really only touched the tip of the iceberg here.

There is much more coming in the near future.

Here are a few ways to keep up with things and get yourself prepared, particularly the things
happening at Mozilla.
Are We Fun Yet?

https://wiki.mozilla.org/Platform/AreWeFunYet
Firefox Aurora

“Get a first look at the latest developer tools, security features and innovative HTML5 and
other Web technologies.”

http://www.mozilla.org/en-US/firefox/channel/#aurora
Firefox Nightly

Bleeding edge functionality.

Testing only.

http://nightly.mozilla.org
Rob Hawkes
                       @robhawkes




             Rawkes.com
             Personal website and blog

   RECENT PROJECTS                              MORE COOL STUFF


             Twitter sentiment analysis                   Rawket Scientist
             Delving into your soul                       Technical Evangelist at Mozilla


             Rawkets.com                                  Slides
             HTML5 & WebSockets game                      slideshare.net/robhawkes



Get in touch with me on Twitter: @robhawkes

Follow my blog (Rawkes) to keep up to date with stuff that I’m working on: http://
rawkes.com

I’ve recently worked on a project that analyses sentiment on Twitter: http://rawkes.com/
blog/2011/05/05/people-love-a-good-smooch-on-a-balcony

Rawkets is my multiplayer HTML5 and JavaScript game. Play it, it’s fun: http://rawkets.com

These slides are online at slideshare.net/robhawkes

More Related Content

Viewers also liked

Metodos de enseñanza...
Metodos de enseñanza...Metodos de enseñanza...
Metodos de enseñanza...
yeissy14
 
Dosieer para la celebración del evento
Dosieer para la celebración del eventoDosieer para la celebración del evento
Dosieer para la celebración del eventoAna Garcia
 
Building 21st Century Smart Workplace
Building 21st Century Smart WorkplaceBuilding 21st Century Smart Workplace
Building 21st Century Smart Workplace
Lpcube Systems India Pvt. Ltd.
 
Makalah pembuatan email 3
Makalah pembuatan email 3Makalah pembuatan email 3
Makalah pembuatan email 3
Septian Muna Barakati
 
Evolucion de los modelos CMMI
Evolucion de los modelos CMMIEvolucion de los modelos CMMI
Evolucion de los modelos CMMI
Enrique Morey
 
Parque Nacional de Kenai (Alaska)
Parque Nacional de Kenai (Alaska)Parque Nacional de Kenai (Alaska)
Parque Nacional de Kenai (Alaska)
Emilio Gil (unjubilado)
 
Vito Gamberale, F2i - Oltre la crisi: attori e infrastrutture per lo sviluppo
Vito Gamberale, F2i - Oltre la crisi: attori e infrastrutture per lo sviluppoVito Gamberale, F2i - Oltre la crisi: attori e infrastrutture per lo sviluppo
Vito Gamberale, F2i - Oltre la crisi: attori e infrastrutture per lo sviluppo
Vito Gamberale
 
Docentes y contenidos 1ª ed. Postgrado Gestión Empresarial de la Música
Docentes y contenidos 1ª ed.  Postgrado Gestión Empresarial de la MúsicaDocentes y contenidos 1ª ed.  Postgrado Gestión Empresarial de la Música
Docentes y contenidos 1ª ed. Postgrado Gestión Empresarial de la Música
Postmusicauv Universitat València
 
creating a trading zone around twitter srchives. case study: paris attacks
creating a trading zone around twitter srchives. case study: paris attackscreating a trading zone around twitter srchives. case study: paris attacks
creating a trading zone around twitter srchives. case study: paris attacks
FIAT/IFTA
 
Ecologia Yaneth Liera 602
Ecologia Yaneth Liera 602Ecologia Yaneth Liera 602
Ecologia Yaneth Liera 602Yaneth Liera
 
Content Marketing Masterclassing Week NYC with censhare
Content Marketing Masterclassing Week NYC with censhareContent Marketing Masterclassing Week NYC with censhare
Content Marketing Masterclassing Week NYC with censhare
IO Integration
 
Empleados municipales como miembros de Juntas Intermedias de Escrutinio
Empleados municipales como miembros de Juntas Intermedias de EscrutinioEmpleados municipales como miembros de Juntas Intermedias de Escrutinio
Empleados municipales como miembros de Juntas Intermedias de Escrutinio
23suma
 
ChineseTariffAdjustmentJuneLucy17
ChineseTariffAdjustmentJuneLucy17ChineseTariffAdjustmentJuneLucy17
ChineseTariffAdjustmentJuneLucy17Lucy Lu
 
Valor de la tecnología, experiencias del CID-GIRSA
Valor de la tecnología, experiencias del CID-GIRSAValor de la tecnología, experiencias del CID-GIRSA
Valor de la tecnología, experiencias del CID-GIRSA
Academia de Ingeniería de México
 
Videnskabsteori, teori og metode, rennison
Videnskabsteori, teori og metode, rennisonVidenskabsteori, teori og metode, rennison
Videnskabsteori, teori og metode, rennisonBetina Rennison
 
Seminar: Fertigungsverfahren und Reparaturstrategien für Faserverbundwerkstoffe
Seminar: Fertigungsverfahren und Reparaturstrategien für FaserverbundwerkstoffeSeminar: Fertigungsverfahren und Reparaturstrategien für Faserverbundwerkstoffe
Seminar: Fertigungsverfahren und Reparaturstrategien für Faserverbundwerkstoffe
stzepm
 
Benchmark banco santander
Benchmark banco santanderBenchmark banco santander
Benchmark banco santanderMarta Jp
 
Internet-based Medical Education
Internet-based Medical EducationInternet-based Medical Education
Internet-based Medical Education
Iris Thiele Isip-Tan
 

Viewers also liked (19)

Metodos de enseñanza...
Metodos de enseñanza...Metodos de enseñanza...
Metodos de enseñanza...
 
Dosieer para la celebración del evento
Dosieer para la celebración del eventoDosieer para la celebración del evento
Dosieer para la celebración del evento
 
Building 21st Century Smart Workplace
Building 21st Century Smart WorkplaceBuilding 21st Century Smart Workplace
Building 21st Century Smart Workplace
 
Makalah pembuatan email 3
Makalah pembuatan email 3Makalah pembuatan email 3
Makalah pembuatan email 3
 
Evolucion de los modelos CMMI
Evolucion de los modelos CMMIEvolucion de los modelos CMMI
Evolucion de los modelos CMMI
 
Parque Nacional de Kenai (Alaska)
Parque Nacional de Kenai (Alaska)Parque Nacional de Kenai (Alaska)
Parque Nacional de Kenai (Alaska)
 
Vito Gamberale, F2i - Oltre la crisi: attori e infrastrutture per lo sviluppo
Vito Gamberale, F2i - Oltre la crisi: attori e infrastrutture per lo sviluppoVito Gamberale, F2i - Oltre la crisi: attori e infrastrutture per lo sviluppo
Vito Gamberale, F2i - Oltre la crisi: attori e infrastrutture per lo sviluppo
 
Docentes y contenidos 1ª ed. Postgrado Gestión Empresarial de la Música
Docentes y contenidos 1ª ed.  Postgrado Gestión Empresarial de la MúsicaDocentes y contenidos 1ª ed.  Postgrado Gestión Empresarial de la Música
Docentes y contenidos 1ª ed. Postgrado Gestión Empresarial de la Música
 
creating a trading zone around twitter srchives. case study: paris attacks
creating a trading zone around twitter srchives. case study: paris attackscreating a trading zone around twitter srchives. case study: paris attacks
creating a trading zone around twitter srchives. case study: paris attacks
 
Ecologia Yaneth Liera 602
Ecologia Yaneth Liera 602Ecologia Yaneth Liera 602
Ecologia Yaneth Liera 602
 
Content Marketing Masterclassing Week NYC with censhare
Content Marketing Masterclassing Week NYC with censhareContent Marketing Masterclassing Week NYC with censhare
Content Marketing Masterclassing Week NYC with censhare
 
Empleados municipales como miembros de Juntas Intermedias de Escrutinio
Empleados municipales como miembros de Juntas Intermedias de EscrutinioEmpleados municipales como miembros de Juntas Intermedias de Escrutinio
Empleados municipales como miembros de Juntas Intermedias de Escrutinio
 
ChineseTariffAdjustmentJuneLucy17
ChineseTariffAdjustmentJuneLucy17ChineseTariffAdjustmentJuneLucy17
ChineseTariffAdjustmentJuneLucy17
 
Valor de la tecnología, experiencias del CID-GIRSA
Valor de la tecnología, experiencias del CID-GIRSAValor de la tecnología, experiencias del CID-GIRSA
Valor de la tecnología, experiencias del CID-GIRSA
 
Uso adecuado de las redes sociales
Uso adecuado de las redes socialesUso adecuado de las redes sociales
Uso adecuado de las redes sociales
 
Videnskabsteori, teori og metode, rennison
Videnskabsteori, teori og metode, rennisonVidenskabsteori, teori og metode, rennison
Videnskabsteori, teori og metode, rennison
 
Seminar: Fertigungsverfahren und Reparaturstrategien für Faserverbundwerkstoffe
Seminar: Fertigungsverfahren und Reparaturstrategien für FaserverbundwerkstoffeSeminar: Fertigungsverfahren und Reparaturstrategien für Faserverbundwerkstoffe
Seminar: Fertigungsverfahren und Reparaturstrategien für Faserverbundwerkstoffe
 
Benchmark banco santander
Benchmark banco santanderBenchmark banco santander
Benchmark banco santander
 
Internet-based Medical Education
Internet-based Medical EducationInternet-based Medical Education
Internet-based Medical Education
 

Similar to MDN Hackday London - Open Web Games with HTML5 & JavaScript

Open Web Games with HTML5 & JavaScript
Open Web Games with HTML5 & JavaScriptOpen Web Games with HTML5 & JavaScript
Open Web Games with HTML5 & JavaScript
Robin Hawkes
 
NY HTML5 - Game Development with HTML5 & JavaScript
NY HTML5 - Game Development with HTML5 & JavaScriptNY HTML5 - Game Development with HTML5 & JavaScript
NY HTML5 - Game Development with HTML5 & JavaScript
Robin Hawkes
 
Open Web Games using HTML5 & JavaScript
Open Web Games using HTML5 & JavaScriptOpen Web Games using HTML5 & JavaScript
Open Web Games using HTML5 & JavaScript
Robin Hawkes
 
Inside Rawkets - onGameStart
Inside Rawkets - onGameStartInside Rawkets - onGameStart
Inside Rawkets - onGameStart
Robin Hawkes
 
HTML5 & JavaScript: The Future Now
HTML5 & JavaScript: The Future NowHTML5 & JavaScript: The Future Now
HTML5 & JavaScript: The Future Now
Robin Hawkes
 
Awesome Technology on the Web - Oxygen Accelerator
Awesome Technology on the Web - Oxygen AcceleratorAwesome Technology on the Web - Oxygen Accelerator
Awesome Technology on the Web - Oxygen AcceleratorRobin Hawkes
 
HTML5 Technologies for Game Development - Web Directions Code
HTML5 Technologies for Game Development - Web Directions CodeHTML5 Technologies for Game Development - Web Directions Code
HTML5 Technologies for Game Development - Web Directions Code
Robin Hawkes
 
The State of HTML5 Games - Fluent JS
The State of HTML5 Games - Fluent JSThe State of HTML5 Games - Fluent JS
The State of HTML5 Games - Fluent JSRobin Hawkes
 
Tomorrow's Web and Future Technologies - WDC2011
Tomorrow's Web and Future Technologies - WDC2011Tomorrow's Web and Future Technologies - WDC2011
Tomorrow's Web and Future Technologies - WDC2011
Robin Hawkes
 
MelbJS - Inside Rawkets
MelbJS - Inside RawketsMelbJS - Inside Rawkets
MelbJS - Inside RawketsRobin Hawkes
 
Boot to Gecko – The Web as a Platform
Boot to Gecko – The Web as a PlatformBoot to Gecko – The Web as a Platform
Boot to Gecko – The Web as a PlatformRobin Hawkes
 
Melbourne Geek Night - Boot to Gecko – The Web as a Platform
Melbourne Geek Night - Boot to Gecko – The Web as a PlatformMelbourne Geek Night - Boot to Gecko – The Web as a Platform
Melbourne Geek Night - Boot to Gecko – The Web as a PlatformRobin Hawkes
 
Open Web Apps and the Mozilla Labs Apps project
Open Web Apps and the Mozilla Labs Apps projectOpen Web Apps and the Mozilla Labs Apps project
Open Web Apps and the Mozilla Labs Apps project
Robin Hawkes
 
Firefox OS / B2G and the future of the web
Firefox OS / B2G and the future of the webFirefox OS / B2G and the future of the web
Firefox OS / B2G and the future of the web
Christian Heilmann
 
Targeting Screens with HTML5, Flash & Native
Targeting Screens with HTML5, Flash & NativeTargeting Screens with HTML5, Flash & Native
Targeting Screens with HTML5, Flash & Native
Eric Fickes
 
HTML5 Games - Not Just for Gamers
HTML5 Games - Not Just for GamersHTML5 Games - Not Just for Gamers
HTML5 Games - Not Just for Gamers
Robin Hawkes
 
Progressing and enhancing
Progressing and enhancingProgressing and enhancing
Progressing and enhancing
Christian Heilmann
 

Similar to MDN Hackday London - Open Web Games with HTML5 & JavaScript (17)

Open Web Games with HTML5 & JavaScript
Open Web Games with HTML5 & JavaScriptOpen Web Games with HTML5 & JavaScript
Open Web Games with HTML5 & JavaScript
 
NY HTML5 - Game Development with HTML5 & JavaScript
NY HTML5 - Game Development with HTML5 & JavaScriptNY HTML5 - Game Development with HTML5 & JavaScript
NY HTML5 - Game Development with HTML5 & JavaScript
 
Open Web Games using HTML5 & JavaScript
Open Web Games using HTML5 & JavaScriptOpen Web Games using HTML5 & JavaScript
Open Web Games using HTML5 & JavaScript
 
Inside Rawkets - onGameStart
Inside Rawkets - onGameStartInside Rawkets - onGameStart
Inside Rawkets - onGameStart
 
HTML5 & JavaScript: The Future Now
HTML5 & JavaScript: The Future NowHTML5 & JavaScript: The Future Now
HTML5 & JavaScript: The Future Now
 
Awesome Technology on the Web - Oxygen Accelerator
Awesome Technology on the Web - Oxygen AcceleratorAwesome Technology on the Web - Oxygen Accelerator
Awesome Technology on the Web - Oxygen Accelerator
 
HTML5 Technologies for Game Development - Web Directions Code
HTML5 Technologies for Game Development - Web Directions CodeHTML5 Technologies for Game Development - Web Directions Code
HTML5 Technologies for Game Development - Web Directions Code
 
The State of HTML5 Games - Fluent JS
The State of HTML5 Games - Fluent JSThe State of HTML5 Games - Fluent JS
The State of HTML5 Games - Fluent JS
 
Tomorrow's Web and Future Technologies - WDC2011
Tomorrow's Web and Future Technologies - WDC2011Tomorrow's Web and Future Technologies - WDC2011
Tomorrow's Web and Future Technologies - WDC2011
 
MelbJS - Inside Rawkets
MelbJS - Inside RawketsMelbJS - Inside Rawkets
MelbJS - Inside Rawkets
 
Boot to Gecko – The Web as a Platform
Boot to Gecko – The Web as a PlatformBoot to Gecko – The Web as a Platform
Boot to Gecko – The Web as a Platform
 
Melbourne Geek Night - Boot to Gecko – The Web as a Platform
Melbourne Geek Night - Boot to Gecko – The Web as a PlatformMelbourne Geek Night - Boot to Gecko – The Web as a Platform
Melbourne Geek Night - Boot to Gecko – The Web as a Platform
 
Open Web Apps and the Mozilla Labs Apps project
Open Web Apps and the Mozilla Labs Apps projectOpen Web Apps and the Mozilla Labs Apps project
Open Web Apps and the Mozilla Labs Apps project
 
Firefox OS / B2G and the future of the web
Firefox OS / B2G and the future of the webFirefox OS / B2G and the future of the web
Firefox OS / B2G and the future of the web
 
Targeting Screens with HTML5, Flash & Native
Targeting Screens with HTML5, Flash & NativeTargeting Screens with HTML5, Flash & Native
Targeting Screens with HTML5, Flash & Native
 
HTML5 Games - Not Just for Gamers
HTML5 Games - Not Just for GamersHTML5 Games - Not Just for Gamers
HTML5 Games - Not Just for Gamers
 
Progressing and enhancing
Progressing and enhancingProgressing and enhancing
Progressing and enhancing
 

More from Robin Hawkes

ViziCities - Lessons Learnt Visualising Real-world Cities in 3D
ViziCities - Lessons Learnt Visualising Real-world Cities in 3DViziCities - Lessons Learnt Visualising Real-world Cities in 3D
ViziCities - Lessons Learnt Visualising Real-world Cities in 3D
Robin Hawkes
 
Understanding cities using ViziCities and 3D data visualisation
Understanding cities using ViziCities and 3D data visualisationUnderstanding cities using ViziCities and 3D data visualisation
Understanding cities using ViziCities and 3D data visualisation
Robin Hawkes
 
Calculating building heights using a phone camera
Calculating building heights using a phone cameraCalculating building heights using a phone camera
Calculating building heights using a phone camera
Robin Hawkes
 
WebVisions – ViziCities: Bringing Cities to Life Using Big Data
WebVisions – ViziCities: Bringing Cities to Life Using Big DataWebVisions – ViziCities: Bringing Cities to Life Using Big Data
WebVisions – ViziCities: Bringing Cities to Life Using Big Data
Robin Hawkes
 
Understanding cities using ViziCities and 3D data visualisation
Understanding cities using ViziCities and 3D data visualisationUnderstanding cities using ViziCities and 3D data visualisation
Understanding cities using ViziCities and 3D data visualisation
Robin Hawkes
 
ViziCities: Creating Real-World Cities in 3D using OpenStreetMap and WebGL
ViziCities: Creating Real-World Cities in 3D using OpenStreetMap and WebGLViziCities: Creating Real-World Cities in 3D using OpenStreetMap and WebGL
ViziCities: Creating Real-World Cities in 3D using OpenStreetMap and WebGL
Robin Hawkes
 
Beautiful Data Visualisation & D3
Beautiful Data Visualisation & D3Beautiful Data Visualisation & D3
Beautiful Data Visualisation & D3
Robin Hawkes
 
ViziCities: Making SimCity for the Real World
ViziCities: Making SimCity for the Real WorldViziCities: Making SimCity for the Real World
ViziCities: Making SimCity for the Real World
Robin Hawkes
 
The State of WebRTC
The State of WebRTCThe State of WebRTC
The State of WebRTC
Robin Hawkes
 
Bringing Cities to Life Using Big Data & WebGL
Bringing Cities to Life Using Big Data & WebGLBringing Cities to Life Using Big Data & WebGL
Bringing Cities to Life Using Big Data & WebGL
Robin Hawkes
 
Mobile App Development - Pitfalls & Helpers
Mobile App Development - Pitfalls & HelpersMobile App Development - Pitfalls & Helpers
Mobile App Development - Pitfalls & HelpersRobin Hawkes
 
Mozilla Firefox: Present and Future - Fluent JS
Mozilla Firefox: Present and Future - Fluent JSMozilla Firefox: Present and Future - Fluent JS
Mozilla Firefox: Present and Future - Fluent JSRobin Hawkes
 
Hacking with B2G – Web Apps and Customisation
Hacking with B2G – Web Apps and CustomisationHacking with B2G – Web Apps and Customisation
Hacking with B2G – Web Apps and CustomisationRobin Hawkes
 
MDN Hackday London - Boot to Gecko: The Future of Mobile
MDN Hackday London - Boot to Gecko: The Future of MobileMDN Hackday London - Boot to Gecko: The Future of Mobile
MDN Hackday London - Boot to Gecko: The Future of Mobile
Robin Hawkes
 
Geek Meet - Boot to Gecko: The Future of Mobile?
Geek Meet - Boot to Gecko: The Future of Mobile?Geek Meet - Boot to Gecko: The Future of Mobile?
Geek Meet - Boot to Gecko: The Future of Mobile?
Robin Hawkes
 

More from Robin Hawkes (15)

ViziCities - Lessons Learnt Visualising Real-world Cities in 3D
ViziCities - Lessons Learnt Visualising Real-world Cities in 3DViziCities - Lessons Learnt Visualising Real-world Cities in 3D
ViziCities - Lessons Learnt Visualising Real-world Cities in 3D
 
Understanding cities using ViziCities and 3D data visualisation
Understanding cities using ViziCities and 3D data visualisationUnderstanding cities using ViziCities and 3D data visualisation
Understanding cities using ViziCities and 3D data visualisation
 
Calculating building heights using a phone camera
Calculating building heights using a phone cameraCalculating building heights using a phone camera
Calculating building heights using a phone camera
 
WebVisions – ViziCities: Bringing Cities to Life Using Big Data
WebVisions – ViziCities: Bringing Cities to Life Using Big DataWebVisions – ViziCities: Bringing Cities to Life Using Big Data
WebVisions – ViziCities: Bringing Cities to Life Using Big Data
 
Understanding cities using ViziCities and 3D data visualisation
Understanding cities using ViziCities and 3D data visualisationUnderstanding cities using ViziCities and 3D data visualisation
Understanding cities using ViziCities and 3D data visualisation
 
ViziCities: Creating Real-World Cities in 3D using OpenStreetMap and WebGL
ViziCities: Creating Real-World Cities in 3D using OpenStreetMap and WebGLViziCities: Creating Real-World Cities in 3D using OpenStreetMap and WebGL
ViziCities: Creating Real-World Cities in 3D using OpenStreetMap and WebGL
 
Beautiful Data Visualisation & D3
Beautiful Data Visualisation & D3Beautiful Data Visualisation & D3
Beautiful Data Visualisation & D3
 
ViziCities: Making SimCity for the Real World
ViziCities: Making SimCity for the Real WorldViziCities: Making SimCity for the Real World
ViziCities: Making SimCity for the Real World
 
The State of WebRTC
The State of WebRTCThe State of WebRTC
The State of WebRTC
 
Bringing Cities to Life Using Big Data & WebGL
Bringing Cities to Life Using Big Data & WebGLBringing Cities to Life Using Big Data & WebGL
Bringing Cities to Life Using Big Data & WebGL
 
Mobile App Development - Pitfalls & Helpers
Mobile App Development - Pitfalls & HelpersMobile App Development - Pitfalls & Helpers
Mobile App Development - Pitfalls & Helpers
 
Mozilla Firefox: Present and Future - Fluent JS
Mozilla Firefox: Present and Future - Fluent JSMozilla Firefox: Present and Future - Fluent JS
Mozilla Firefox: Present and Future - Fluent JS
 
Hacking with B2G – Web Apps and Customisation
Hacking with B2G – Web Apps and CustomisationHacking with B2G – Web Apps and Customisation
Hacking with B2G – Web Apps and Customisation
 
MDN Hackday London - Boot to Gecko: The Future of Mobile
MDN Hackday London - Boot to Gecko: The Future of MobileMDN Hackday London - Boot to Gecko: The Future of Mobile
MDN Hackday London - Boot to Gecko: The Future of Mobile
 
Geek Meet - Boot to Gecko: The Future of Mobile?
Geek Meet - Boot to Gecko: The Future of Mobile?Geek Meet - Boot to Gecko: The Future of Mobile?
Geek Meet - Boot to Gecko: The Future of Mobile?
 

Recently uploaded

Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
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
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
Abida Shariff
 
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
 
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
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
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
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
CatarinaPereira64715
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
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
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
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
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 

Recently uploaded (20)

Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
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
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
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
 
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...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
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
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
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
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 

MDN Hackday London - Open Web Games with HTML5 & JavaScript

  • 1. ES M t A rip G B avaSc E W L5 & J es EN TM bH aw k OP ing H Ro s U Hi, I’m Rob Hawkes and I’m here today to talk about creating games on the open Web using HTML5 and JavaScript.
  • 2. I work at Mozilla, a non-profit fighting for a better Web. The guys who make Firefox. Unsure about how much I like Mozilla? This here is a beautiful chicken and leek pie with extra Firefox goodness. It was made by my talented girlfriend and it was delicious.
  • 3. I’m not sure how much time we’ll have for questions at the end, but feel free to grab me in person after the talk or on Twitter. These slides will go online after this talk. I’ll put all the details up at the end.
  • 4. Before we move on I just have a quick disclaimer. This whole talk is about HTML5 and JavaScript as technologies for the creation of games. They’re technologies that are intrinsically linked to each other by nature, but saying HTML5 and JavaScript every single time makes my head hurt. So instead I’ll just be saying HTML5. Just bear in mind that whenever I mention HTML5 I’m also referring to JavaScript as well.
  • 5. So let’s go back in time for a moment. Now I don’t actually remember when I first started playing computer games, although I know that I started with consoles.
  • 6. My first experience was with the ZX Spectrum and its amazing noises and epic loading times, which I sorely miss…
  • 7. Then there was the SNES, which really got me addicted to gaming. Although it turns out my SNES was stolen when I was a kid. I did wonder where it went…
  • 8. My parents replaced it with the Megadrive which, although not quite as awesome, was just as fun. From there it has been a constant stream of consoles, each smashing the performance and functionality of its predecessor. The N64, the Gamecube, the Dreamcast, the Playstation, the xBox. You get the idea…
  • 9. And spread throughout that time I dabbled in PC gaming, starting with games like Sim City…
  • 11. And playing multiplayer Doom at my Dad’s Internet cafe. What I’m getting at here is that gaming has been a big part of my life growing up, as it has been with a lot of other people as well. They’re fun to play, and they’re surprisingly fun to make.
  • 12. ow is n e cool tim thing he om e T do fs ol resh Th Today we’re now on the threshold of something cool; being able to create awesome and addictive games with nothing more than the technologies that we normally use to make websites, namely HTML5 and JavaScript. Since I began developing on the Web I really can’t remember a time when so many people are working together to achieve something like this.
  • 13. es g a m ing ples ist exam Ex he be st ft eo Som The number of HTML5 games out there is growing every day. I’d show you a selection of my favourites, just a tiny amount of what’s out there.
  • 14. Quake II Fully-functional multiplayer Quake II port. http://code.google.com/p/quake2-gwt-port/
  • 15. Cut The Rope Cut The Rope, ported from iOS. http://www.cuttherope.ie
  • 16. Bejeweled Bejeweled is a massively popular game on a whole variety of platforms. Popcap recently released a purely HTML5 version. http://bejeweled.popcap.com/html5
  • 17. Command & Conquer Command & Conquer: Tiberium Alliances is a HTML5 game from EA that is part real-time strategy, part Farmville. http://alliances.commandandconquer.com
  • 18. GT Racing GT Racing: Motor Academy is a 3D racing game by Gameloft and Mandreel. http://www.mandreel.com/?page_id=1312
  • 19. BrowserQuest BrowserQuest is a massively-multiplayer RPG that Mozilla recently launched to the public. It works great on mobile and desktop devices but what’s even better is that, aside from being an addictive game, the entire source code is on GitHub. http://browserquest.mozilla.org https://github.com/mozilla/BrowserQuest http://hacks.mozilla.org/2012/03/browserquest/
  • 20. It’s clear that HTML5 is something that is really becoming a contender for games on the Web. It’s an open technology stack that is plugin-less, doesn’t require compilation, and works the same across devices and platforms.
  • 21. g y o lo chn es Te L5g am TM fH so cene s he dt hin Be There are a few key technologies that are involved in the development of HTML5 games. Here are some of my favourites.
  • 22. vas an C tfo rm pla ics raph g 2D Canvas is a 2D graphics platform that uses both HTML5 and JavaScript. It’s quite amazing what can be done with such simple drawing and image manipulation tools. https://developer.mozilla.org/en/HTML/Canvas
  • 23. Silk is a stunning example of what can be achieved by combining the simple drawing tools available in canvas. http://weavesilk.com
  • 24. Canvas <canvas id='myCanvasElement' width='400' height='400'></canvas> Using canvas is very straight forward. The first thing you need to do is add a canvas DOM element to your HTML page.
  • 25. Canvas var canvas = document.getElementById('myCanvasElement');   var ctx = canvas.getContext('2d'); ctx.fillStyle = "rgb(200,0,0)";   ctx.fillRect(10, 10, 55, 50);      ctx.fillStyle = "rgba(0, 0, 200, 0.5)";   ctx.fillRect(30, 30, 55, 50); From there you can then access the canvas through JavaScript to draw on it and do other cool stuff. This is small canvas demo that draws a solid red square underneath a blue one with half transparency. ‘myCanvasElement’ refers to a HTML <canvas> element that you’ll need to place in your HTML file somewhere. In this example, I’m assuming that you’ve already done that.
  • 26. GL eb W form lat sp hic grap 3D WebGL brings the ability to provide advanced 3D graphics directly within the browser. https://developer.mozilla.org/en/WebGL
  • 27. HelloRacer is a little game that lets you drive a Formula One car around your browser. It’s a beautiful example of WebGL in action. http://helloracer.com/webgl/
  • 28. Rome is a music video created with WebGL. It’s an amazing example of what the technology can achieve in a real-world situation given a large team. http://ro.me
  • 29. Tinkercad is probably the best use of WebGL that I’ve seen in a production situation. It’s a Web app that allows you to create 3D objects in your browser using WebGL, then get them printed and sent to your doorstep in just a few simple clicks. It’s seriously awesome. https://tinkercad.com
  • 30. Both Google Maps and Nokia have recently added support for WebGL. The Nokia version is particularly impressive because they fully render and texture 3D shapes of buildings. http://support.google.com/maps/bin/answer.py?hl=en&answer=1630790 http://maps.nokia.com/webgl/
  • 31. I’m not going to lie, WebGL isn’t the easiest thing to learn. Then again, no raw 3D code is that simple. Instead, I recommend checking out a library called three.js which abstracts WebGL and makes it much easier to implement. https://github.com/mrdoob/three.js/
  • 32. m e Fra on ps ati ati on loo nim d anim estA timise qu Op re requestAnimationFrame is the new, better way of managing animation in JavaScript. Instead of constantly running a setTimeout or setInterval function, which lack performance and spike CPU usage, requestAnimation frame puts the browser in control of things and keeps things running smoothly. Right now you can’t easily set a specific framerate when using requestAnimationFrame but so long as you use time-based updates (not frame-based) in your game then you’ll be fine.
  • 33. requestAnimationFrame function update(timestamp) {   // DO SOMETHING   window.mozRequestAnimationFrame(update);   }   window.mozRequestAnimationFrame(update); In this example, I’m only using the Mozilla prefixed version of requestAnimationFrame. In reality, there’s a really good shim by Paul Irish that handles cross-browser requestAnimationFrame. http://paulirish.com/2011/requestanimationframe-for-smart-animating/
  • 34. d io a u L5 usic TM nd m H grou ck ba nd ctsa effe nd Sou HTML5 audio allows for plugin-less game sound effects and background music. Audio data APIs implemented by Mozilla and Google allow for manipulation of audio and much more fine-grained control. https://developer.mozilla.org/en/HTML/Element/audio
  • 35. This is something I made especially for the ASSEMBLY 2011 event in Finland. It’s an audio visualiser that uses WebGL and the HTML5 Audio Data API. http://robhawkes.github.com/webgl-html5-audio-visualiser/
  • 36. Audio <audio id='myAudioElement' controls>   <source src='audiofile.ogg' type='audio/ogg'> </audio> Like canvas, using audio is also straight forward. The first thing you need to do is add an audio DOM element to your HTML page.
  • 37. Audio var audio = document.getElementById('myAudioElement'); audio.play(); audio.pause(); From there you can then access the audio element through JavaScript to control it.
  • 38. e ts ock bS ation e W omm un ic yerc ltipla Mu WebSockets can be used for the real-time communication between a player and the game server. With WebSockets you can create multiplayer games with relative ease. https://developer.mozilla.org/en/WebSockets
  • 39. WebSockets var ws = new WebSocket('http://example.com/socketserver'); ws.send('This message is sent to the WebSocket server'); ws.onmessage = function (event) {     console.log(event.data);   } WebSockets are created entirely from JavaScript without the need to add elements to the HTML page. A new WebSocket connection can be opened by calling the ‘new WebSocket’ constructor and passing it the URL to the WebSocket server. From there you can call the ‘send’ method to push data to the server. Or listen for the ‘onmessage’ event to handle data pushed to you from the server.
  • 40. PI n A re e ul Sc we rf ull et po F im ple ,y S The Full Screen API allows you to expand any HTML element to fill the users screen, even if the browser isn’t running full screen itself. For games, this is great because you can make the small canvas element fill the entire screen. Outside of games, this is useful for video elements and Web applications. https://bugzilla.mozilla.org/show_bug.cgi?id=545812 http://blog.pearce.org.nz/2011/09/mozilla-full-screen-api-progress-update.html https://wiki.mozilla.org/Platform/Features/Full_Screen_APIs
  • 41. Full Screen API var canvas = document.getElementById('myCanvasElement'); canvas.mozRequestFullScreen(); The Full Screen API can be requested from any DOM element. In this example you’re asking a canvas element to expand to fill the screen. One thing to note is that you can’t just make any element fill the screen whenever you want. Right now, the user has to click or press a key to initiate the Full Screen API.
  • 42. P I A o ck ace r L pl te ne oin rso rino P cu he gt ockin L The Pointer Lock API is an attempt at improving the mouse as an input device. It would be used in situations like games and 3D visualisations where the mouse position rotates or moves you around a 3D space. As it stands there’d still be a cursor moving around the screen causing all sorts of trouble when you want to click on something in your game. With the new API you can lock your mouse position and stop it from getting in the way and being a nuisance. Both Google and Mozilla are working on an implementation of this right now, it’s available in a custom build of Firefox. https://developer.mozilla.org/en/API/Pointer_Lock_API https://bugzilla.mozilla.org/show_bug.cgi?id=633602
  • 43. Full Screen API var canvas = document.getElementById('myCanvasElement'); canvas.mozRequestPointerLock(); The Pointer Lock API can be requested from any DOM element that is already in full screen.
  • 44. P I d A p a eb me he W Ga et ot ol ns co he gt gin Brin The Gamepad API is one of the major improvements to input that is coming. Both Mozilla and Google are working an an implementation of this and there is actually an experimental build of Firefox available to the public that has it working. The API is also in the dev build of Chrome. What I find most interesting about the Gamepad API is that it might be just the thing we need to finally justify HTML5 gaming on a TV or console. Who wants to use a keyboard and mouse while sitting on the sofa? https://wiki.mozilla.org/GamepadAPI http://www.gamepadjs.com https://github.com/jbuck/input.js
  • 45. Gamepad API demo I’d like to show you a quick demo of the Gamepad API working in Firefox Nightly and Google Chrome. In this example I’ve connected my Logitech controller to my Mac, but I could also use a PS3 controller or practically any other USB controller.
  • 46. This is another little demo that I put together to show off the Gamepad API implemented in my game Rawkets.
  • 47. Connection function onGamepadConnected(e) { var controller = e.gamepad; console.log("Gamepad connected", controller.id); } window.addEventListener("MozGamepadConnected", onGamepadConnected); MozGamepadConnected It passes an event object that itself contains a gamepad object in reference to the connected gamepad.
  • 48. Disconnection function onGamepadDisconnected(e) { var controller = e.gamepad; console.log("Gamepad disconnected", controller.id); } window.addEventListener("MozGamepadDisconnected", onGamepadDisconnected); MozGamepadDisconnected It passes an event object that itself contains a gamepad object in reference to the disconnected gamepad.
  • 49. Button events function onGamepadButtonDown(e) { var button = e.button; console.log("Gamepad button pressed", button); } function onGamepadButtonUp(e) { var button = e.button; console.log("Gamepad button released", button); } window.addEventListener("MozGamepadButtonDown", onGamepadButtonDown); window.addEventListener("MozGamepadButtonUp", onGamepadButtonUp); MozGamepadButtonDown MozGamepadButtonUp Each pass an event object that contains a button property. The button property is the index number of the specific button, respective to the entire array of buttons on the gamepad.
  • 50. Axis events function onGamepadAxisMove(e) { var axis = e.axis; var value = e.value; console.log("Gamepad axis move", axis, value); } window.addEventListener("MozGamepadAxisMove", onGamepadAxisMove); MozGamepadAxisMove is fired on movement of a joystick or analogue trigger. Passes an event object that contains axis and value properties. The axis property is the index number of the specific axis that was moved, respective to the entire array of axes on the gamepad. The value property is a -1.0 to 1.0 float. For example, an x-axis on a joystick when fully pressed to the left would have a -1.0 value.
  • 51. Gamepad state function checkState() { for (var i = 0; i < controller.buttons.length; i++) { console.log("Button state", i, controller.buttons[i]); } for (var j = 0; j < controller.axes.length; j++) { console.log("Axis state", j, controller.axes[j]); } } If you don’t want to use events you can also poll the entire gamepad state whenever you want. The only pre-requisite is that a gamepad is already connected and you’ve stored a reference to it somewhere, perhaps in a variable or array. Once you have reference to a gamepad you get the state by reading its buttons and axes objects. These are both arrays that contain data about every single button and axis available. The value of each button in the buttons array is a boolean that tells you whether the button is pressed down (true) or not (false). The value of each axis in the axes array is a -1.0 to 1.0 float that tell you exactly where a joystick is or how far a trigger has been pulled.
  • 52. P I n A a t io es n t de vic ri e ob ile n O on m ree ha ve Sc M ust- The Screen Orientation API allows you to do things like changing and locking, you guessed it, the orientation of the screen. Before now, it’s been incredibly difficult to lock orientation on a website or game using nothing but JavaScript. https://bugzilla.mozilla.org/show_bug.cgi?id=740188 http://dvcs.w3.org/hg/screen-orientation/raw-file/default/Overview.html
  • 53. Screen Orientation API screen.mozLockOrientation('landscape'); The Screen Orientation API is another relatively simple one. It just landed in Firefox Nightly on mobile. All you need to do is call the ‘lockOrientation’ method of the screen object and pass it a orientation string. It’s important to note that you also need to be using the Full Screen API for the orientation lock to work.
  • 54. n s tio plica bsite ap yw e eb ta fanc W ot jus N The concept of Web apps is something that is gaining a lot of traction at the moment. HTML5 games are effectively glorified Web apps. It’s no doubt this this traction is as a result of the success of native applications and games on the desktop and mobile, particularly with iOS and Android.
  • 55. It’s something we’re spending a lot of time on at Mozilla. We envisage Web apps to run on any device, any browser, and to be distributed through any store or website. https://apps.mozillalabs.com https://developer.mozilla.org/en/OpenWebApps
  • 56. nce erie exp scre en like ho me p- op or Ap eskt thed from ch un La Something that needs to be tackled with Web apps is how to make them feel like real applications rather than glorified websites. One way that is being considered is completely removing the browser chrome and running the application in it’s own window. This will effectively mean that you have full control of the app UI and it won’t look like it’s being run in a browser.
  • 57. At Mozilla we call this WebRT, which stands for Web Run-Time. By using WebRT you can install a Web app directly into the OS just like you would a native application. The WebRT app will look and feel like a native application when launched but will actually be running a browser rendering engine behind the scenes.
  • 58. e s gin e n ay e m game st od Ga ML5 HT te Crea If you haven’t already then I encourage you to give HTML5 game development a go. And you don't have to create an entire game infrastructure from scratch, you can use some of the existing engines that are proving popular.
  • 59. Impact. A 2D game engine. I used this recently, and it’s really well made and has a good level editor and development tools. The documentation is great and the author is active and very helpful. http://impactjs.com/
  • 60. Crafty. Another 2D game engine. It’s a free engine and is doing much better than other free engines out there. http://craftyjs.com/
  • 61. Isongenic Engine. A 2D to 2.5D game engine. One of the most promising engines out there today. Massively multiplayer networking built in, uses Node and MongoDB, and has canvas or DOM- based graphics. http://www.isogenicengine.com
  • 62. u p g in zon eep ri K e ho th ff on tu uchs m So I’ve really only touched the tip of the iceberg here. There is much more coming in the near future. Here are a few ways to keep up with things and get yourself prepared, particularly the things happening at Mozilla.
  • 63. Are We Fun Yet? https://wiki.mozilla.org/Platform/AreWeFunYet
  • 64. Firefox Aurora “Get a first look at the latest developer tools, security features and innovative HTML5 and other Web technologies.” http://www.mozilla.org/en-US/firefox/channel/#aurora
  • 65. Firefox Nightly Bleeding edge functionality. Testing only. http://nightly.mozilla.org
  • 66. Rob Hawkes @robhawkes Rawkes.com Personal website and blog RECENT PROJECTS MORE COOL STUFF Twitter sentiment analysis Rawket Scientist Delving into your soul Technical Evangelist at Mozilla Rawkets.com Slides HTML5 & WebSockets game slideshare.net/robhawkes Get in touch with me on Twitter: @robhawkes Follow my blog (Rawkes) to keep up to date with stuff that I’m working on: http:// rawkes.com I’ve recently worked on a project that analyses sentiment on Twitter: http://rawkes.com/ blog/2011/05/05/people-love-a-good-smooch-on-a-balcony Rawkets is my multiplayer HTML5 and JavaScript game. Play it, it’s fun: http://rawkets.com These slides are online at slideshare.net/robhawkes