Play Cube Slam Like A Boss And Watch Your Friend Lose Over Video

Smriti Jha

Smriti Jha

@smriti-jha-RIDWQb Oct 25, 2024
Chrome's latest experiment is a real-time video game built with #-Link-Snipped-#. WebRTC is an open web-based technology that allows real-time communication without the hassle of plug-ins. Once Cube Slam has your approval, it uses getUserMedia to access your webcam and microphone.
RTCPeerConnection streams your video to a friend, and RTCDataChannel transfers the bits that keep the gameplay in sync. So, if and when there's lag and you are going to ragequit, direct all your curses at RTCDataChannel.

Cube Slam
If you and your opponent use firewalls, RTCPeerConnection uses a TURN relay server which is hosted on Google Compute Engine to make the connection. However, if you are cool like that and have no interfering firewalls in the way, the entire game runs directly peer-to-peer, reducing latency for players and server costs for developers. How nice and generous.

The break down goes like this, the RTCDataChannel provides an API similar to #-Link-Snipped-#, but unlike WebSocket's Client-Server configuration, it sends the data over the RTCPeerConnection peer-to-peer link. The RTCDataChannel usually sends the data securely, but switches to "unreliable" mode to maintain high performance by compromising on the chances of every packet making it across the network. Ideal for situations where low delay matters more than 100% delivery. Case in point, Games. So, if a single packet decides to wander, it doesn't bring the whole app down.

WebRTC will also be made available for Chrome on Android later this year. Know more about the game #-Link-Snipped-#. Nerd out!

Source: <a href="https://blog.chromium.org/2013/06/play-cube-slam-real-time-webrtc-video.html" target="_blank" rel="nofollow noopener noreferrer">Chromium Blog: Play Cube Slam, a real-time WebRTC video game</a>

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform