Skip to content

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

Open

Description

@notqdoctor

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.

Activity

  1. cymno commented on Mar 28, 2020

    @cymno

    #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

  2. notqdoctor commented on Apr 5, 2020

    @notqdoctor
    Author
  3. cymno commented on Apr 6, 2020

    @cymno

    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;

  4. KytoonTycoon commented on Feb 18, 2021

    @KytoonTycoon

    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)

  5. imwuffle commented on Mar 19, 2022

    @imwuffle

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions