Official Everybody Edits Forums

Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?

You are not logged in.

#1 2022-07-08 04:33:02

N1KF
Wiki Mod
From: ̺̺̺̺̺̺̺̺̺̺̺̺̺̺̺̺̺̺̺̺̺̺̺̺̺̺̺̺̺̺
Joined: 2015-02-15
Posts: 10,802
Website

Connecting to a Player.IO Development Server

How do I connect to a PlayerIO Development Server, specifically EEmulator in JavaScript? The closest documentation I could find was multiplayer.developmentServer, but this seems to require a client object from connecting to a server hosted by PlayerIO. I get this error when I try to authenticate. (The ActionScript counterpart used in EE, connect seems to be missing here for some reason, though I doubt this will make much of a difference until I can actually connect to the game.)

PlayerIOError[UnknownGame]: Unknown game id: everybody-edits-v5

I dug into EEmulator's version of the v0.5.0.0 client, and the two differences that stick out to me are the altered game ID, and the altered bridge URL (leading to 1.swf included in EEmulator, which also seems altered from the original). Of those two, I assume the bridge would be of more importance because I still need to find where the client uses the endpoint. crossdomain.xml might be important but I still can't figure out where the client uses this data (if it does at all).

If you're curious, my code looks like this:

document.onload = PlayerIO.authenticate(
	'everybody-edits-v5', 'public', '', '',
	function(client) {
		console.log(client);
	},
	function(error) {
		console.error(error.toString());
	}
);

I've been stuck on this problem for hours, so help would be appreciated.

Offline

#2 2022-07-08 05:18:05, last edited by XxAtillaxX (2022-07-08 05:20:08)

XxAtillaxX
Member
Joined: 2015-11-28
Posts: 4,202

Re: Connecting to a Player.IO Development Server

You would need to override the API endpoint in the JavaScript Player.IO client to localhost (or where-ever it is) - '1.swf' also known as flash bridge, was altered to always connect to localhost.

The DevelopmentServer functionality would still ping official Player.IO API servers (api.playerio.com, api[1..99].playerio.com) so you will need to alter the JavaScript Player.IO client and change all references of api.playerio.com to localhost or wherever it is hosted.

N1KF wrote:

(The ActionScript counterpart used in EE, connect seems to be missing here for some reason, though I doubt this will make much of a difference until I can actually connect to the game.)

Player.IO deprecated the other login methods in favour of a more generic Authenticate function, presumably so that they wouldn't need to update each client library with for every new authentication provider.


signature.png
*u stinky*

Offline

Wooted by:
XxAtillaxX1657253885793247

Board footer

Powered by FluxBB

[ Started around 1660349580.4983 - Generated in 0.031 seconds, 12 queries executed - Memory usage: 1.38 MiB (Peak: 1.48 MiB) ]