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: Security CTO to detail Android Fake ID flaw at Black Hat

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

Body by smartphone

4 hours ago

We love our smartphones. Since they marched out of the corporate world and into the hands of consumers about 10 years ago, we've relied more and more on our iPhone and Android devices to organize our schedules, ...

Breakthrough elastic cloud-to cloud networking

6 hours ago

Scientists from AT&T, IBM and Applied Communication Sciences (ACS) announced a proof-of-concept technology that reduces set up times for cloud-to-cloud connectivity from days to seconds. This advance is a major step forward ...

Security CTO to detail Android Fake ID flaw at Black Hat

20 hours ago

Where have you heard this before: A team of security researchers discover a security flaw in Android devices. This is, however, news. This time, experts are talking about a flaw that involves a widespread ...

Software provides a clear overview in long documents

Jul 25, 2014

In the future, a software will help users better analyze long texts such as the documents for calls for bids, which are often more than one thousand pages long. Experts at Siemens' global research unit Corporate ...

User comments : 0