GSoC/GCI Archive
Google Code-in 2014 Copyleft Games

PySoy: WebRTC JS Example

completed by: Mayank Madan

mentors: AJ Williams, Arc Riley, David Czech

One of our long-term goals is to have PySoy working with a HTML/5 client using WebGL, WebRTC, etc. Toward that end we're making design modifications such as migrating to OpenGL ES 2.0 (which WebGL is based on) and implementing the more CPU intensive physics calculations as shaders. We will also need to make sure our networking is compatible with WebRTC.

In the past we've used raw UTP for game networking. WebRTC does not support raw UDP, only SRTP, which offers some improvements over UDP we can utilize such as data prioritization and channeling.

WebRTC supports arbitrary data which we'll need to test our implementation against for compatability. To help us do that, we could use a working example written in Javascript. Thankfully there are many examples of this.

Using examples you find, write a working WebRTC example which passes arbitrary data between two host, including a minimal server-side code to negotiate the connection. Upload this to one of our Mercurial repositories under the GNU AGPLv3 license so code from it can be reused.

While working on this task you should join and remain in #CopyleftGames on Freenode to get help, feedback, and guidance from mentors and other developers.

When you've done, commit your work and post the resulting changeset url to this task.