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: Google's Waze app endangers police: LAPD chief

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

Sheriffs expand concerns about Waze mobile traffic app

1 hour ago

A law enforcement campaign to compel Google Inc. to disable a feature in its popular Waze traffic app that lets drivers warn others about nearby police activity shifted Wednesday when a sheriffs' organization ...

Mobile apps take students into the laboratory

5 hours ago

Mobile apps have proved to be valuable educational tools, but laboratory instructors thus far have been limited to using mobile devices only for virtual laboratories with simulated experiments. Now, researchers ...

Google's Waze app endangers police: LAPD chief

14 hours ago

Google's newly acquired Waze application poses a danger to police because of its ability to track their locations, the Los Angeles police chief said in a letter to the tech company's CEO.

Catch the northern lights with your mobile

Jan 26, 2015

Updates on the best opportunities to spot the Northern Lights in the UK are now available on a mobile phone app developed in association with scientists at Lancaster University.

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.