There seems to be a (sub)forum/topic for each client other than the js/html5 one. Where's the official place to post questions about that client?
↧
No Javascript/Html5 forum?
↧
select the Application name upon connection
By coincidence I do have a JS api question and this forum was just created today.
I am not using the Lite application, and cannot find anywhere in the JS api to select the Application name upon connection.
I can of course use the WebSocketListener.OverrideApplication in the server config. But would prefer flexibility of not using a hardcoded override in the server config.
How to select the application from JS api?
I am not using the Lite application, and cannot find anywhere in the JS api to select the Application name upon connection.
I can of course use the WebSocketListener.OverrideApplication in the server config. But would prefer flexibility of not using a hardcoded override in the server config.
How to select the application from JS api?
↧
↧
Multiple Peer Clients
Hi,
it seems that you cannot (or better should not) create multiple peer clients. According to the implementation the peer client stores certain properties in the its prototype (refer to lines 1551ff in PhotonPeer.Lite.debug.js).
To give you a working example please have a look at the following code snippet:
Is this intended to work that way ?
Best,
benny!
it seems that you cannot (or better should not) create multiple peer clients. According to the implementation the peer client stores certain properties in the its prototype (refer to lines 1551ff in PhotonPeer.Lite.debug.js).
To give you a working example please have a look at the following code snippet:
var peer1 = new PhotonPeer.Lite(); var peer2 = new PhotonPeer.Lite(); peer1.addEventListener( 'connect', function() { console.log( "Peer1 connected." ); }); peer2.addEventListener( 'connect', function() { console.log( "Peer2 connected." ); }); peer1.connect( 'localhost', { port: 9090, isDebugging: true } ); // peer2 does not call the connect
Is this intended to work that way ?
Best,
benny!
↧
Secure websockets
Hi
I'm trying to get Photon setup to receive web socket connections that are secured using our SSL certificate.
Running certmgr.msc i have imported the certificate with the friendly name "GenericSoccoramaCert" also the certification path is reported OK from "GenericSoccoramaCert" -> "AlphaSSL CA - G2" -> "GlobalSign"
The certificate is in the personal certificates section.
I've setup the WebSocketListeners like this in the PhotonServer.config:
I've created a dns entry localhost.soccorama.com that resolves to 127.0.0.1 this works when running the website locally with ssl on.
I've inserted console.log into the prepareUrl() function to see what url the web socket is opened on.
localhost.soccorama.com is covered by our ssl certificate and it works with the site running locally from apache on my machine.
Then after a couple of seconds i get:
So it seems to me it's trying to connect as it should but there seems to be no answer.
I've mailed back and forth with Stefan and finally he suggested taking it on the forums so everyone could benefit.
Any ideas?
Hans-Henrik Jensen - Soccorama.com
I'm trying to get Photon setup to receive web socket connections that are secured using our SSL certificate.
Running certmgr.msc i have imported the certificate with the friendly name "GenericSoccoramaCert" also the certification path is reported OK from "GenericSoccoramaCert" -> "AlphaSSL CA - G2" -> "GlobalSign"
The certificate is in the personal certificates section.
I've setup the WebSocketListeners like this in the PhotonServer.config:
<WebSocketListeners> <WebSocketListener IPAddress="0.0.0.0" Port="5055" DisableNagle="true" InactivityTimeout="60000" OverrideApplication="WOFMasterServer" secure="true" storename="My" certificatename="GenericSoccoramaCert" usemachinestore="false"> </WebSocketListener> <WebSocketListener IPAddress="0.0.0.0" Port="5056" DisableNagle="true" InactivityTimeout="60000" OverrideApplication="WOFLobbyServer" secure="true" storename="My" certificatename="GenericSoccoramaCert" usemachinestore="false"> </WebSocketListener> <WebSocketListener IPAddress="0.0.0.0" Port="9090" DisableNagle="true" InactivityTimeout="60000" OverrideApplication="WOFOnlineActivityServer" secure="true" storename="My" certificatename="GenericSoccoramaCert" usemachinestore="false"> </WebSocketListener> </WebSocketListeners>
I've created a dns entry localhost.soccorama.com that resolves to 127.0.0.1 this works when running the website locally with ssl on.
I've inserted console.log into the prepareUrl() function to see what url the web socket is opened on.
WS prepareUrl: wss://localhost.soccorama.com:9090/
localhost.soccorama.com is covered by our ssl certificate and it works with the site running locally from apache on my machine.
Then after a couple of seconds i get:
WebSocket is closed before the connection is established. localhost.soccorama.com
So it seems to me it's trying to connect as it should but there seems to be no answer.
I've mailed back and forth with Stefan and finally he suggested taking it on the forums so everyone could benefit.
Any ideas?
Hans-Henrik Jensen - Soccorama.com
↧
Javascript API and the blank server tutorial ?
It is normal that the javascript api when started twice (the chat demo) the two instances can't communicat with each other based on the server made form the tutorial (blank application demo) ?
↧
↧
Javascript
Good afternoon,
I have a few questions as i am new to this site. I am in th process of building a game and obviously want this to b a multiplayer game. I hav noticed in the tutorials the code is in C#, i need to know the following:
- Is there a tutorial similar for Javascript or can implement this code in my game where most of the scripting is Javascript based and if so could you direct me to a link.
- once this code is implemented judging by the tutorials, i take it once i have put this on my web site they can login and just join a room as such.
I hope my information was clear as i am just trying to get my head around all of this.
Kind regards
David
I have a few questions as i am new to this site. I am in th process of building a game and obviously want this to b a multiplayer game. I hav noticed in the tutorials the code is in C#, i need to know the following:
- Is there a tutorial similar for Javascript or can implement this code in my game where most of the scripting is Javascript based and if so could you direct me to a link.
- once this code is implemented judging by the tutorials, i take it once i have put this on my web site they can login and just join a room as such.
I hope my information was clear as i am just trying to get my head around all of this.
Kind regards
David

↧
Wish for some documentation for javascript api
Like the topic say i wish for some documentation for the javascript API and the server v3 cause im getting a hard time to understand how this server work... because of that i may go look elsewhere. Don't want to complain since it seem really a nice server but i think its far from easy to understand the whole mechanic of it. I am the only one thinking that way ? It seem easy through if your using C# as the client...
↧
how to receive custom events?
In the C# client, I just implement IPhotonPeerListener.OnEvent( EventData eventData ) and my custom events work fine. Not the case in the JS api...
Looking at the JS API docs, all the methods for adding event handlers take a string "name" as the 1st parameter. What if it's a custom event code (byte) ?
Not using Lite, by the way.
Looking at the JS API docs, all the methods for adding event handlers take a string "name" as the 1st parameter. What if it's a custom event code (byte) ?
Not using Lite, by the way.
↧
photonpeer untied from lite
I have had an JS app which was not sharing similar operations with Lite app of photon and I was going to use PhotonPeer() , not the Lite() extension.
But as many others here I ran into problem that both of them are tied to each other, so I took a look into sources and fixed that one.
So, while PhotonPeer api is still in beta 3.0.0.3 you can use my fixed version. Also you are welcome to add your own fixes.
https://bitbucket.org/narushevich/photonpeer
But as many others here I ran into problem that both of them are tied to each other, so I took a look into sources and fixed that one.
So, while PhotonPeer api is still in beta 3.0.0.3 you can use my fixed version. Also you are welcome to add your own fixes.
https://bitbucket.org/narushevich/photonpeer
↧
↧
JavaScript Demo on Photon Cloud doesn't work
I've tried the JavaScript SDK demo (loadbalancing & particle), but it doesn't work. The HTTP request and response header to the cloud server are:
CONNECT app-asia.exitgamescloud.com:4530 HTTP/1.0
User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0; Touch)
Host: app-asia.exitgamescloud.com:4530
Content-Length: 0
DNT: 1
Connection: Keep-Alive
Pragma: no-cache
HTTP/1.0 200 Connection Established
StartTime: 18:01:02.175
Connection: close
GET http://app-asia.exitgamescloud.com:4530/ HTTP/1.1
Origin: XXXXXXXXXX
Sec-WebSocket-Key: vyRGUxkvLJmDen8mWCV2SQ==
Connection: Upgrade
Upgrade: Websocket
Sec-WebSocket-Version: 13
User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0; Touch)
Host: app-asia.exitgamescloud.com:4530
DNT: 1
Cache-Control: no-cache
And there's no response for the 2nd request. I tried on both local computer and remote web host.
The demo gave me "Error 1001 Master peer error" and "Error 1004 Master peer error timeout"
However, it works fine with my self-hosted Photon server, and demos of other SDKs like Silverlight works fine as well.
What's wrong? Thanks.
CONNECT app-asia.exitgamescloud.com:4530 HTTP/1.0
User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0; Touch)
Host: app-asia.exitgamescloud.com:4530
Content-Length: 0
DNT: 1
Connection: Keep-Alive
Pragma: no-cache
HTTP/1.0 200 Connection Established
StartTime: 18:01:02.175
Connection: close
GET http://app-asia.exitgamescloud.com:4530/ HTTP/1.1
Origin: XXXXXXXXXX
Sec-WebSocket-Key: vyRGUxkvLJmDen8mWCV2SQ==
Connection: Upgrade
Upgrade: Websocket
Sec-WebSocket-Version: 13
User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0; Touch)
Host: app-asia.exitgamescloud.com:4530
DNT: 1
Cache-Control: no-cache
And there's no response for the 2nd request. I tried on both local computer and remote web host.
The demo gave me "Error 1001 Master peer error" and "Error 1004 Master peer error timeout"
However, it works fine with my self-hosted Photon server, and demos of other SDKs like Silverlight works fine as well.
What's wrong? Thanks.
↧
JavaScript/HTML5 SDK for Photon Cloud?
Great news about Photon Cloud becoming Forever Free!
Any chance of also getting a JavaScript/HTML5 SDK for the Photon Cloud?
Any chance of also getting a JavaScript/HTML5 SDK for the Photon Cloud?
↧
delete WebSocketMain.swf file, SDK can work it?
If you delete WebSocketMain.swf file, SDK can work it?
iphone does not support flash, only with pure html5
iphone does not support flash, only with pure html5
↧
External Authentication Question
I've had success deploying and "authenticating"against the MVC app on github, but now I'm developing an api to connect with a user database hosted on parse.com (using Cloud Code with node.js/express.js).
Its difficult to debug the provider when I don't know the structure of the request Photon Cloud is producing.
Does it go by the default route with /jsmith/foo, or does it explicitly use a querystring like ?userName=jsmith&token=foo ?
Its difficult to debug the provider when I don't know the structure of the request Photon Cloud is producing.
Does it go by the default route with /jsmith/foo, or does it explicitly use a querystring like ?userName=jsmith&token=foo ?
↧
↧
Port other than 9090
Hi,
I cannot connect my Javascript client to photon server on a port other than 9090. Isn't it possible to use different port?
Thanks
I cannot connect my Javascript client to photon server on a port other than 9090. Isn't it possible to use different port?
Thanks
↧
Javascript and PUN
Is it possible to view the same rooms from javascript client as a pun client? I've set the appId and gameVersion the same in the unity client as well as the javascript client and cannot see games creates from either side.
↧
Basic Startup Tips for n00bs
Hi All,
I'm really excited to see Photon Cloud and Javascript/HTML5. Super exciting stuff! Unfortunately, I'm not as strong with HTML5/JS as I am with Unity/C#.
I'd like to create, at first, just a simple multiplayer chat, but I can't seem to find the right place to start. Seeing as there's no documentation as yet for that, I was wondering if you could help me with the following:
1) What scripts do I definitely need to include in the index.html page? photon.js or photon-javascript_SDK.js? Are those the same thing?
2) once that's set up, how do I create a new Photon Peer instance in my JS script? I tried "var pp = new Photon.PhotonPeer("...url here as a string", "app id as a string", "1.0") but still undefined so I'm guessing that's wrong.
3) How do I then handle "players"? Do I hold them in an array of Photon.players[] or something?
4) How is information broadcast to all the players? Which function handles that? In Unity, there were different data types that you could send, but I'm guessing with Photon.js it's all more ambiguous or string-like?
Any pointers would be greatly appreciated! Thanks so much!
Best,
- Eric
I'm really excited to see Photon Cloud and Javascript/HTML5. Super exciting stuff! Unfortunately, I'm not as strong with HTML5/JS as I am with Unity/C#.
I'd like to create, at first, just a simple multiplayer chat, but I can't seem to find the right place to start. Seeing as there's no documentation as yet for that, I was wondering if you could help me with the following:
1) What scripts do I definitely need to include in the index.html page? photon.js or photon-javascript_SDK.js? Are those the same thing?
2) once that's set up, how do I create a new Photon Peer instance in my JS script? I tried "var pp = new Photon.PhotonPeer("...url here as a string", "app id as a string", "1.0") but still undefined so I'm guessing that's wrong.
3) How do I then handle "players"? Do I hold them in an array of Photon.players[] or something?
4) How is information broadcast to all the players? Which function handles that? In Unity, there were different data types that you could send, but I'm guessing with Photon.js it's all more ambiguous or string-like?
Any pointers would be greatly appreciated! Thanks so much!
Best,
- Eric
↧
Connection to custom server application
Hi.
How can I connect to my custom server application throw JavaScript (HTML5) SDK? I cannot find information in documentation or client SDK.
this.peer = new Photon.PhotonPeer("ws://192.168.85.217:9090", '');
For example in .NET:
// connect
client.connected = false;
peer.Connect("192.168.85.217:4530", "MyCustomServerApplication");
Best regards.
How can I connect to my custom server application throw JavaScript (HTML5) SDK? I cannot find information in documentation or client SDK.
this.peer = new Photon.PhotonPeer("ws://192.168.85.217:9090", '');
For example in .NET:
// connect
client.connected = false;
peer.Connect("192.168.85.217:4530", "MyCustomServerApplication");
Best regards.
↧
↧
How to pass callback to custom event listener?
Thanks for opening this forum!
The JavaScript SDK documentation gives 'callback' as the second param of addCustomEventListener(). But how do I pass it a callback? raiseEvent() sends a JSON object, not a function (and that's what happens in the chat and realtime demo apps). Or can I use the JSON object to pass the callback (I'm not too familiar with JSON) (yet!).
The JavaScript SDK documentation gives 'callback' as the second param of addCustomEventListener(). But how do I pass it a callback? raiseEvent() sends a JSON object, not a function (and that's what happens in the chat and realtime demo apps). Or can I use the JSON object to pass the callback (I'm not too familiar with JSON) (yet!).
↧
custom room properties and hashtable
I want to use custom room properties in my project using UnityScript. I can't seem to get anything to work. Even with:
import ExitGames.Client.Photon;
in my script, the simple declaration:
private var roomProps = new Hashtable();
fails with the message:
BCE0023: No appropriate version of 'ExitGames.Client.Photon.Hashtable' for the argument list '()' was found.
I read in another post that I may need an older version without Windows 8 support (I use Win7) but where do I get it?
Can I get a even a trivial example of setting and retrieving custom room properties in UnityScript?
thanks,
Don
import ExitGames.Client.Photon;
in my script, the simple declaration:
private var roomProps = new Hashtable();
fails with the message:
BCE0023: No appropriate version of 'ExitGames.Client.Photon.Hashtable' for the argument list '()' was found.
I read in another post that I may need an older version without Windows 8 support (I use Win7) but where do I get it?
Can I get a even a trivial example of setting and retrieving custom room properties in UnityScript?
thanks,
Don
↧
JavaScript Demo on Photon Cloud ERROR 2004
Hi guys ...
capture and link
http://forotripman.esy.es/test/photon/src/demo-particle/default.htm
I need help, i fail to solve the problem ...
thnxs
capture and link
http://forotripman.esy.es/test/photon/src/demo-particle/default.htm
I need help, i fail to solve the problem ...
thnxs
↧