Re:Show HN: Arcade – Play retro games streamed inside a browser
by rubicon33 on Friday July 10, 2015 @12:39AM
(#9862322)
This is beyond awesome. How did you do it?
[ Parent
| on HN ]
Re:Show HN: Arcade – Play retro games streamed inside a browser
by colhom on Friday July 10, 2015 @03:15AM
(#9862674)
h264 frames/opus packets over websockets. Broadway.js is doing the video decoding, something similar to (EDIT: opus.js) for the audio.
All decode loops are in webworkers, separate websocket connection for each data stream (video,audio,input). Broadway has a lovely option to use WebGL for pushing the pixels to a canvas as well, which really helps free up the CPU.
Put it all together, and you'd be surprised how close you can push an (up-to-date) browser towards realtime sans plugin.