Cube Slam: Google's video game plays up WebRTC, WebGL

Jun 14, 2013 by Nancy Owano report
Cube Slam: Google’s video game plays up WebRTC, WebGL

(Phys.org) —Google has a new game called Cube Slam where you get to slam a cube into another player's screen target. If you hit the cube against the other player's screen three times, terrific, the screen shatters. To keep the game from getting dull, varied levels are part of the mix, complete with obstacles and gravity fields to keep players challenged. This is as addictive as an old-time video arcade game but supplemented with video chat as well. A share link gets the two players going. Google's CubeSlam debut falls under the Google umbrella of Chrome Experiments, a showcase for web experiments. Most of these experiments are built with the latest open technologies: HTML5, Canvas, SVG, and WebGL. "We hope they show how the web has become faster, more fun, and more open – the same spirit in which we built Google Chrome."

To underscore not only fun but technologies such as WebRTC and WebGL as great ingredients for innovating, a like Cube Slam with ample pointers to the way it was built appears to be a clever slam dunk. The blurb on the home page of Chrome Experiments invites first-time hopefuls to play the game where " meets video game in this new experiment featuring WebGL and WebRTC. Play face-to-face against a friend just by sending a link."

WebRTC is a that enables web browsers with (RTC) capabilities via simple Javascript APIs. That means that RTC applications can be developed right in the browser. The underlying technology comes from Global IP Solutions, a 2010 Google acquisition. Google opened the source code, with the intention of greasing the wheels toward standardization. Web RTC stands for Web Real Time Communication. Google does not own it; it's an open source project supported by Google, along with Mozilla and Opera. Components such as VoiceEngine, VideoEngine, NetEQ stem from the acquisition. "Cube Slam is built using WebRTC, an technology that lets you video chat with your friends right in the browser, no plug-ins necessary. The getUserMedia API provides access to your webcam and microphone, RTCPeerConnection sends the audio and video to your friends, and RTCDataChannel exchanges all the bits and pieces that keep the game in sync. When there are no firewalls in the way, game data can be sent directly peer-to-peer, greatly reducing server costs."

This video is not supported by your browser at this time.

WebRTC is available on desktop Chrome and Chrome OS, and will be available on mobile later this year. Game visitors, though, can play Cube Slam against Bob the Bear on a smartphone or tablet.

Cube Slam's graphics are rendered in WebGL. For Chrome and Firefox users, WebGL brings hardware-accelerated 3-D graphics to the browser without installing additional software. If you don't have WebGL, says Google, you can still play Cube Slam in 3-D with CSS3, which allows developers to build their web pages with the same game engine running under the hood. CSS3 stands for Cascading Style Sheets. noted that all the graphics run on your GPU, freeing the CPU for other tasks.

The soundtrack comes by way of Web Audio, which is used for games and interactive applications. The Cube Slam music-tracker and sound manager are built on the Web Audio API. The soundtrack adapts in real-time to every level reached.

Explore further: BPG image format judged awesome versus JPEG

More information: plus.google.com/+chrome/posts/BkJmjzDicSh

Related Stories

WebRTC puts video chats all in the browser

Apr 10, 2012

(Phys.org) -- “It’s all in the browser. No plugins. And you don’t just need only Chrome either, Good stuff.” Those are the comments you can hear when in WebRTC circles. For those who have ...

Chrome Beta gets built-in webcam and microphone support

Jul 10, 2012

(Phys.org) -- A Google company blog announcement this week announced the Google Chrome Beta (of Chrome 21) and all that it brings, namely fresh ways to grant Web applications access to your camera and micr ...

Superior 3D Graphics for the Web a Step Closer

Sep 22, 2009

(PhysOrg.com) -- The development of improved three-dimensional graphics in Web-based applications took a step forward recently, when programmers began building WebGL into the Mozilla Firefox nightly builds, ...

Angry Birds lands in Chrome Web browser

May 11, 2011

Rovio's "Angry Birds" is landing on Chrome in the first version of the addictively popular smartphone and tablet game tailored for play on a computer Web browser.

Google adds player matching to Android

May 15, 2013

Google is adding leaderboards and the ability to match players in online games to its Android operating system for smartphones and tablet computers.

Recommended for you

BPG image format judged awesome versus JPEG

14 hours ago

If these three letters could talk, BPG, they would say something like "Farewell, JPEG." Better Portable Graphics (BPG) is a new image format based on HEVC and supported by browsers with a small Javascript ...

Atari's 'E.T.' game joins Smithsonian collection

Dec 15, 2014

One of the "E.T." Atari game cartridges unearthed this year from a heap of garbage buried deep in the New Mexico desert has been added to the video game history collection at the Smithsonian.

People finding their 'waze' to once-hidden streets

Dec 14, 2014

When the people whose houses hug the narrow warren of streets paralleling the busiest urban freeway in America began to see bumper-to-bumper traffic crawling by their homes a year or so ago, they were baffled.

User comments : 0

Please sign in to add a comment. Registration is free, and takes less than a minute. Read more

Click here to reset your password.
Sign in to get notified via email when new comments are made.