It’s been roughly two years since Google announced plans to add real-time communication features into its browser via WebRTC, an open source project that would do away with the need for a third-party plug-in. Although still in its infancy, both Chrome and Firefox have already rollout initial support for the technology, and this week Google has made a new addition to the handful of demos designed to show its potential.
Specifically, the company has come up with a browser based pong clone called Cube Slam that you can play against the computer or a friend. A live video stream of your opponent is delivered via WebRTC, while graphics are rendered in WebGL and CSS 3D, and a custom soundtrack is delivered through Web Audio. It also uses RTCPeerConnection and RTCDataChannel to keep everything in sync between the two machines.
Cube Slam also lets users play against an animated bear, Bob, if no one's around. Each level features a combination of shields, obstacles, and a gravity-field changes you’ll have to deal with. As you move through levels you can unlock power-ups such as fireballs, lasers, bulletproof shields, ghost balls, resized paddles, fog, time bombs, extra lives, and more to improve your chances of winning.
Whoever is first to slam the cube against an opponent’s screen three times wins.
Cube Slam is available on Chrome for the desktop and Chrome OS. It’ll be available on Chrome for Android later this year when it gains WebRTC support. You can play the game here or read more about the technology here.