Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JavaScript or C# impl / wrapper #42

Closed
dougajmcdonald opened this issue Jun 21, 2017 · 14 comments
Closed

JavaScript or C# impl / wrapper #42

dougajmcdonald opened this issue Jun 21, 2017 · 14 comments

Comments

@dougajmcdonald
Copy link

This project looks really interesting. Me and a colleague are interested in something which can send and receive UDP in the browser from either a JS or C# backend for game development.

I will have a look over the code and concepts to see if we can make use / fork this and add our work to help the project,

@gafferongames
Copy link
Contributor

I'm afraid we're going to have to convince browser manufacturers to allow this spec to be implemented in-browser, as browsers do not allow sending and receiving of UDP packets directly, which would be required to implement this in a browser.

I'm working on it.

@gafferongames
Copy link
Contributor

My advice is to focus on Mozilla and Brave browsers first.

@dougajmcdonald
Copy link
Author

Thanks for the swift reply, interestingly I did see this:

https://developer.chrome.com/apps/sockets_udp

But chrome only of course.

@gafferongames
Copy link
Contributor

gafferongames commented Jun 21, 2017

You could of course prototype with that, but I don't think JavaScript in a web browser is allowed to call it, only plug-ins.

@dougajmcdonald
Copy link
Author

You're probably right! I feel like browser UDP is close but not quite there at this second, interested to see how it could be pushed along. I often hear the argument against webRTC being 'its complicated' but if the alternative is nothing I don't see a sensible way round it. Hence why your project is interesting, implementing some like this in the browser might be tricky but would be widely appreciated. Will keep you posted

@gafferongames
Copy link
Contributor

Agreed. Thanks for your help!

@gafferongames
Copy link
Contributor

ps. There is already an early set of C# bindings here: https://github.com/RedpointGames/netcode.io, but I think they are a bit out of date relative to the current C implementation in this repository. -- cheers

@tobeorla
Copy link

If you want UDP for the browser using js:
https://nodejs.org/api/dgram.html
https://github.com/alexstrat/simudp

@gafferongames
Copy link
Contributor

I like the proxy idea for a proof of concept, but moving it beyond that, we'd want to be able to run with zero cost install on all browser platforms, eg. get the browsers updated to support netcode.io

@benaadams
Copy link

Should be able to expose to javascript via:

npm package -> node/Electron which gives access to desktop install, and Steam via greenworks; may give angle for Brave

C# client lib (max .NET Standard 1.4) -> UWP (HTML+JS) which gives access to Win10 + XBox

At which point it would be running in Chrome (Electron) and Edge (UWP); though not the actual browsers themselves - but it gives a concrete use/example via the browser engines; as well as several gaming platforms.

@benaadams
Copy link

Additionally may be able to add chrome extension; using sockets_udp; then do support detection; so a game could do multipath networking io based on whether is available; or gate on extension (though poor for game adoption)

@gafferongames
Copy link
Contributor

Sounds pretty good. Prove it out first, the rest will follow.

@gafferongames
Copy link
Contributor

Looks like this issue is solved: https://github.com/RedpointGames/netcode.io-browser

@benaadams
Copy link

Nice 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants