networking - Connecting to specific ip and port -


this summer working @ computer summer camp. kids love playing slither.io

the kids want play on same world slither.io doesn't provide easy way , instead spreads them out through multiple servers. have limited networking knowledge familiar working websockets.

what hoping them on same world was: have 1 kid connect slither.io , enter game. once in open dev tools in chrome , ip , port connected bso.ip , bso.po other kids using dev tools run

connect("ws:\\123.123.123.123:444") 

with ip , port set whatever first kid had.

running connect gets them slither.io 90% of time on different server/ip address

is there way them in same world?

connecting websocket alone not enough register game use it. looking @ source code, there function forceserver, sets ip , port:

function forceserver (a, b) {  sos = [];  forcing = true;  bso = {};  bso.ip = a;  bso.po = b;  bso.ac = 999;  sos.push(bso); } 

the sos array global , used later on connect websocket , register game instance. exact details difficult follow because it's minified in game73gig.js, think function sets up.

run following in console instead:

forceserver("123.123.123.123", "443"); 

there tampermonkey snippet inject form element , javascript automatically. haven't tried it's called slitherio-plugin.


Comments