(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 web innovating, a game 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 "Video chat 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 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. Google 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