Photon with Cocos Creator

Photon with Cocos Creator
0

#1

Doest anyone has any idea on how to use Photon Javascript version in a project on Cocos Creator? I cant find any useful resources on this and it seems to lack a Photon API documentation to see how can the functions can be called…


#2

I have integrated Photon JS successfully for testing. Then I gave up, because it’s API docs is not full enough. If you want you can convert the demo from HTML5 to Cocos Creator, most of the code will be the same.


#3

Where can I find the html5 demo? If you could send me your implementation on cocos creator it would help me a lot, thank you


#4

When you download Photon Javascript SDK, there are some demo projects in src folder. In my case, I have cloned demo-pairs-mc example. The code was messy to me, and there some events/listeners not well documented so I don’t know why and when they are triggered :slight_smile: I don’t have my Cocos Creator version any more, but I’m ready to answer any question related to initial work with Photon (joinRoom, createActor, etc…)


#5

I see, so I cloned the LoadBalancing demo, I found it to be the simplest of them all, so when trying to connect I get errors like “Error in connection establishment: net::ERR_CONNECTION_REFUSED” and " Error: 1001 Master peer error", do you have any idea of what that is? I’m using WS connection protocol and localhost:9090 as my master server


#6

Have you run html version successfully? Or the first time you can disable the line "MasterServer: “localhost:9090"” in cloud-app-info


#7

yes on html version it was cool, now im connecting directly to a region instead of using localhost and everything is working


#8

Is it working on Cocos?