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

Node.js http server multiplayer: I need help #46

Open
HPestock opened this issue Mar 25, 2020 · 5 comments
Open

Node.js http server multiplayer: I need help #46

HPestock opened this issue Mar 25, 2020 · 5 comments

Comments

@HPestock
Copy link

I have been working on this for some time now, but I can't seem to figure out how to use multiplayer. I am using node.js http-server, and I would really like some insight on how to get this running.

@cymno
Copy link

cymno commented Mar 28, 2020

#18 (comment)

Install node, go to project directory, run node server.js. If necessary install socket.io etc. with npm

Go to http://localhost:3000/multiplayer.html while server is running. You can test 2 players by connecting both via Chrome and Firefox. To connect from different computer replace localhost with the server's IP address

@HPestock
Copy link
Author

HPestock commented Apr 5, 2020 via email

@cymno
Copy link

cymno commented Apr 6, 2020

There's a restriction of block placement around world spawn. Change this line to modify at which distance placement becomes possible:

if ( Math.sqrt( (data.x-world.spawnPoint.x)*(data.x-world.spawnPoint.x) + (data.y-world.spawnPoint.y)*(data.y-world.spawnPoint.y) + (data.z-world.spawnPoint.z)*(data.z-world.spawnPoint.z) ) < 10 ) return false;

@KytoonTycoon
Copy link

KytoonTycoon commented Feb 18, 2021

is it possible to get it running without having it on a local host but like in herokuapp or something?(I code and program on my school chromebook so local hosting is unavailable for me)

@imwuffle
Copy link

Is there any way to do this with vercel?

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