nagalun / multiplayerpiano-server

Unofficial server for the http://multiplayerpiano.com client.
https://piano.ourworldofpixels.com
ISC License
12 stars 17 forks source link

Client? #4

Closed lithiumjs closed 6 years ago

lithiumjs commented 6 years ago

Alright, I have downloaded, compiled and started the server. How do I connect to it?

nagalun commented 6 years ago

You can use the official client's API to connect:

MPP.client.uri = "ws://localhost:1234";
MPP.client.ws.close();
lithiumjs commented 6 years ago

But what if I want to host the client publicly?

nagalun commented 6 years ago

Then you need to copy the client, and host those files using a separate http server. Here's a recent client from MPP: http://ourworldofpixels.com/piano/mpp-client-2017-12-03.zip

If you are not hosting the piano server on the same address as the http server, or need to change the default port (8080), change it at script.js (line 1.100)

lithiumjs commented 6 years ago

Thanks! Also, what do I use the password for?

nagalun commented 6 years ago

The only use it has is to change a user's color with it, like this:

MPP.client.sendArray([{m: "adminmsg", password: "password_here", message: {m: "color", id: "user's id (not _id)", color: "#hexcolor"}}]);
ghost commented 4 years ago

http://ourworldofpixels.com/piano/mpp-client-2017-12-03.zip

https://piano.ourworldofpixels.com/mpp-client-2017-12-03.zip