WebCraft icon indicating copy to clipboard operation
WebCraft copied to clipboard

Node.js http server multiplayer: I need help

Open HPestock opened this issue 5 years ago • 5 comments

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.

HPestock avatar Mar 25 '20 05:03 HPestock

https://github.com/Overv/WebCraft/issues/18#issuecomment-355401612

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

cymno avatar Mar 28 '20 02:03 cymno

It now works, but I cannot place blocks, is there a way to fix this?

On Fri, Mar 27, 2020 at 9:35 PM cymno [email protected] wrote:

#18 (comment) https://github.com/Overv/WebCraft/issues/18#issuecomment-355401612

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

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Overv/WebCraft/issues/46#issuecomment-605383125, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFJ73FKSFTEMBAD76FR5T7DRJVO67ANCNFSM4LTF5MLQ .

HPestock avatar Apr 05 '20 20:04 HPestock

There's a restriction of block placement around world spawn. Change this line to modify at which distance placement becomes possible: https://github.com/Overv/WebCraft/blob/47b3f6910864ea0d35ed203e1e337aa958fad606/js/network.js#L500

cymno avatar Apr 06 '20 01:04 cymno

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)

KytoonTycoon avatar Feb 18 '21 20:02 KytoonTycoon

Is there any way to do this with vercel?

oblivioz avatar Mar 19 '22 00:03 oblivioz