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

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."

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

WebRTC puts video chats all in the browser

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

© 2013 Phys.org

Citation: Cube Slam: Google's video game plays up WebRTC, WebGL (2013, June 14) retrieved 9 December 2019 from https://phys.org/news/2013-06-cube-slam-google-video-game.html
This document is subject to copyright. Apart from any fair dealing for the purpose of private study or research, no part may be reproduced without the written permission. The content is provided for information purposes only.
0 shares

Feedback to editors

User comments