[Plugin] Photon Cloud

Post your completed addons to share with the community

Post » Mon Mar 09, 2015 9:33 am

@ThePhotons

I am trying to figure out how to set max player in the room. There are expressions like "RoomMaxPlayers" or "RoomIsOpen", but I can't find the actions to set max players or close the room. Also expression "RoomPlayerCount" throws undefined error all the time. Seems like this functionality is not implemented completely.

Is there any hope, that this plugin will be finished? So far I really like it and it works on all devices.
B
44
S
11
G
4
Posts: 507
Reputation: 7,341

Post » Mon Mar 09, 2015 2:43 pm

The good thing, is that it is easily possible to call photon JS-API methods from C2 js-sdk. Just added "setMaxPlayers" to the plugin.
B
44
S
11
G
4
Posts: 507
Reputation: 7,341

Post » Mon Mar 16, 2015 11:39 am

Sorry for our silence - we've been busy and get back to the questions asked this week.
B
5
S
2
Posts: 128
Reputation: 889

Post » Tue Mar 17, 2015 11:28 am

Great news!
B
44
S
11
G
4
Posts: 507
Reputation: 7,341

Post » Tue Mar 17, 2015 8:53 pm

@ThePhotons

thumbs up!
B
26
S
11
G
2
Posts: 669
Reputation: 5,038

Post » Wed Mar 18, 2015 10:04 am

Rory wrote:Could this possibly support SceneObjects which is in the PhotonCloud API?

Not sure what you mean. Photon Cloud has no concept of scene or object. Maybe it's PUN terms related to Unity. Photon plugin has nothing to do with PUN or Unity.
B
5
S
2
Posts: 128
Reputation: 889

Post » Wed Mar 18, 2015 10:28 am

xoros wrote:There's a parameter "Receivers" in the Raise Event method, where it's possible to address a Master Client. How do I set a Master Client? Is it the first player who joins the room? I also didn't find any expressions, where I can check if player a Master or Non-Master client.

The Master client is the one who is in the room the longest time. It has lowest actorNr in room. Currently you have to iterate all actors and find lowest actorNr to check if player is master. We will add convinient propery later.
B
5
S
2
Posts: 128
Reputation: 889

Post » Wed Mar 18, 2015 10:45 am

paala wrote:This works for native android/iOS apps or just html5?
Why only photon cloud? Photon server doesn't work?


This is construct 2 plugin. It should works for whatever you export construct 2 app.
Photon is available for wide range different platforms including native: https://www.exitgames.com/en/Realtime/Download

To make plugin work with Photon server we need to let user specify server other than default. I hope we'll do it in next updates.
B
5
S
2
Posts: 128
Reputation: 889

Post » Wed Mar 18, 2015 11:01 am

xoros wrote:@ThePhotons

Is there any hope, that this plugin will be finished? So far I really like it and it works on all devices.

We will be exposing more and more js sdk functionality in the plugin. Let us know what you need first.
Sometimes it's not that simple to express some advanced sdk feature in visual editor. And some of them probably will never be implemented.
It's good to hear that you found the way to use sdk directly. I think this is the only reasonable way to use full-fledged Photon js api.
B
5
S
2
Posts: 128
Reputation: 889

Post » Wed Mar 18, 2015 1:55 pm

1) There's a bug, which throws "undefined property" error, when you call expressions "RoomMaxPlayers", "RoomPlayerCount", "RoomIsOpen". I think it refers to something [availableRoomsDict] which is missing in Photon-Javascript_SDK.min.js

2) SetMaxPlayers and SetRoomClosed/Opened actions
3) Kick user action
B
44
S
11
G
4
Posts: 507
Reputation: 7,341

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 2 guests