[Plugin] PeerJS

Post your completed addons to share with the community

Post » Tue Nov 19, 2013 9:24 pm

PeerJS plugin version 1.1

Hi,
I've been sitting on this one for a bit. It allows for networking peers together without needing to write a server.

Here is the JavaScript libary it's based on:
http://peerjs.com/

The plugin:
https://www.dropbox.com/s/0ueuv9wr4wcmg ... S.zip?dl=1
/plugins/peerjsPlugin/rojo_PeerJS.zip
An example:
https://www.dropbox.com/s/kmh03nxaxn4ry ... .capx?dl=1
/plugins/peerjsPlugin/peerjs_2player.capx

To connect to someone else you need to know their id. The capx should help to show how it's done.

Now for the disclaimer:
This plugin is based on PeerJS, which in turn is based on webrtc. Webrtc is in an experimental state so it won't work on all browsers.

It currently only works on Chrome and Firefox, both on Windows and Android. It likely works on Mac and Linux as well but I haven't tested it there. It currently doesn't work on ios.

Also connections can only be made between the same browser types. AKA chrome with chrome or firefox with firefox. Chrome and firefox can't communicate with each other with peerjs.

Lastly this plugin doesn't work with the minifier when exporting.

cheers.R0J0hound2013-11-20 19:14:25
Last edited by R0J0hound on Thu May 25, 2017 6:02 pm, edited 1 time in total.
B
92
S
32
G
106
Posts: 5,272
Reputation: 69,455

Post » Wed Nov 20, 2013 4:00 am

Edit. R0J0hound2013-11-20 04:01:58
B
92
S
32
G
106
Posts: 5,272
Reputation: 69,455

Post » Wed Nov 20, 2013 7:09 am

Great thanks for the share @R0J0hound, it's exciting, for now it is turn based , but turn based games can also be made really nice and good.
B
94
S
19
G
15
Posts: 198
Reputation: 14,421

Post » Wed Nov 20, 2013 8:10 am

Woooooow that's great, as always @R0J0hound
B
57
S
13
G
5
Posts: 101
Reputation: 7,522

Post » Wed Nov 20, 2013 9:11 am

Great stuff, thanks for sharing! :P
B
16
S
7
G
6
Posts: 163
Reputation: 5,304

Post » Wed Nov 20, 2013 9:14 am

I have a problem with that

http://powerupware.com/multiplayer/

We are trying to connect bewteen my home and Australia.

We shared our ID, the text says "trying to connect to [ID]" connection between chrome and firefox... then it takes too long time... it seems it doesn't work
Joannesalfa2013-11-20 09:36:54
B
97
S
35
G
29
Posts: 3,139
Reputation: 28,371

Post » Wed Nov 20, 2013 9:44 am

@ joannesalfa I think @R0j0hound already told us that only Chrome to Chrome and Firefox to Firefox connection can be done. So if you are trying to make connection between Chrome and Firefox that cannot be done.

Hope that helps.
B
94
S
19
G
15
Posts: 198
Reputation: 14,421

Post » Wed Nov 20, 2013 9:53 am

@thehorseman007


Updated: I told him to use Chrome (Version 31), the result is "error undefined"Joannesalfa2013-11-20 09:55:47
B
97
S
35
G
29
Posts: 3,139
Reputation: 28,371

Post » Wed Nov 20, 2013 10:03 am

@joannesalfa

Now that will be handle by @R0J0hound because I am not that much good in solving the errors, did you get success any time or the same error comes every time.
B
94
S
19
G
15
Posts: 198
Reputation: 14,421

Post » Wed Nov 20, 2013 10:08 am

@thehorseman007

I'm sorry, but look, can we use?

http://powerupware.com/multiplayer/

connect my id: evrixbhtu3sg7gb9

I wont close this browser
B
97
S
35
G
29
Posts: 3,139
Reputation: 28,371

Next

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 0 guests