by a Thinker, Sailor, Blogger, Irreverent Guy from Madras

What is new in Google Chrome 22 - new techniques


In the previous post, we took a look at the prominent changes in the way we interact with the newly released Google Chrome 22.  Now we will see about the new technology and improved gaming features implemented in Google Chrome 22.
  • a brand new ‘Pointer Lock’ or ‘Mouse Lock’ API in Chrome 22, and
  • the continuation from Chrome 21 of the WebRTC API.
WebRTC:
Before we go into pointer lock, let us take a look at WebRTC, or “Web Real Time Communication”.  In simple terms it enhances the browser by giving it access to the PC’s webcam and microphone.
What it means is, the browser will be able to use the PC’s webcam and mic just as it uses the speakers (ear phones).  Confused?  Here is a very, very basic explanation. 

Chrome (or Firefox or Opera or IE), as such, do not need any extra software/plugin to play a sound on your speakers.  Click a button and you can hear the .mp3 music.

But with a webcam or a microphone, a browser isn’t enough.  You need something extra - like Skype, to speak or display your beautiful face to others.  With WebRTC (actually the 1st step in WebRTC), Chrome 22 is the first browser to give you the ability to use microphone and webcam without additional plugins.
  • From if your browser works
    • ‘you can hear sound’,
  • we have moved to
    • ‘you can talk to and view others’.
Great, isn’t it?

BTW people have already build demos on enhancing the browser with WebRTC techniques here [http://www.webrtc.org/].  While you can play around with all of them, let us take a closer look at the audio chat demo by Jérome Étienne (http://webglmeeting.appspot.com/).

Go to the URL and don’t be bothered if no one joins you there.  That page has an unintended demo for the next technique we are going to see - the pointer lock or mouse lock.

Pointer Lock:
We’ve all experienced the mouse lock glitch when playing online games (especially).  When we play first person shooter 3D games, the mouse inadvertently lands up on one side of the screen and we are unable to continue the turn or movement.  Before we can react, we are fragged by the enemies.

In the chat demo page, moving the mouse around - left, right, top or bottom, twirls the TV sets as if in a 3D game.  But however you move the mouse, you cannot actually get to the back (or top, bottom) of the TV sets.  It is like you are in an invisible box and cannot get out of it.

The Pointer Lock or Mouse Lock API disables that restriction on the limits.  Keep moving the mouse and the display will actually turn around without hitting any boundaries.  It is great - have a look at the tutorial (http://www.html5rocks.com/en/tutorials/pointerlock/intro/) to actually see its implementation.

If that API is also implemented by Jérome Étienne in that demo page, we would be able to go ‘around’ the TV sets - from left, right - or float on top or look up from underneath.

I just can’t wait for someone to take a panoramic snap of the Forever Marilyn (Monroe) statue and place it online.
:-D

Here is a screengrab from another Pointer Lock demo webpage (http://dl.dropbox.com/u/7851949/fullscreen-pointer-api/index.html):

pointer_lock_example

Note: 
To experience WebRTC, you need Google Chrome 21 or 22.  It doesn’t work on Firefox 15.0.1, Opera 12.02 (x64) or IE 8 (x32 / x64).
To experience Pointer Lock, you need Google Chrome 22.  It doesn’t work on Firefox 15.0.1, Opera 12.02 (x64) or IE 8 (x32 / x64) or Chrome 21.



No comments:

Post a Comment

Support - Donate

Your Blog is

Donate thro ECWID

Contact Form

Follow by Email