📜 ⬆️ ⬇️

Demonstration of WebRTC, WebGL and Go from Google



Google showed one of its experiments on the use of the latest features of web technologies - the game CubeSlam , where you can play with a friend via the Internet, if its browser also supports WebRTC.

The game itself is quite simple, and its graphics are “pixelated” (probably for the sake of performance). Gameplay - throwing a cube that moves on the playing field and which must be fought off at the right moment. Along the way, you can shoot down various obstacles, getting something like achievements; sometimes the game is animated by “spectators” in the form of animals roaming around.
')
In addition to playing with a computer, or rather, with a bear, Bob, you can play it with a friend - for this you need to send him a link and the game will let you know when the offer is accepted. If a friend wants to turn on the webcam, then it will be visible in real time on the board of the playing field and it will be possible to fully communicate with it.

Thus, the main advantage of CubeSlam is, of course, not entertainment or gameplay, but a demonstration of the possibilities of user interaction only through the browser.

Moreover, for developers there is a detailed description of the technologies used. So, on the link " Technologies ", you can find out that the game uses the Google Cloud Platform, the getUserMedia API is used to access the webcam and microphone, and RTCDataChannel is responsible for exchanging game data of both players.

CubeSlam sources written in Go are available here .

[ Source ]

Source: https://habr.com/ru/post/183144/


All Articles