[Plugin] Photon Cloud

Post your completed addons to share with the community

Post » Thu Aug 11, 2016 10:18 am

You may try to use disconnect -> connect sequence instead of leave until it's fixed.
B
7
S
2
Posts: 161
Reputation: 1,005

Post » Thu Aug 11, 2016 11:37 am

2dgamedev wrote:@ThePhotons

Im having an issue .. if I join a room , then toggle IsOpen or isVisible , then leave the room and try to create a new room... I get this error and the room creation fails. but if i dont touch IsOpen or isVisible , i can join and leave and create as many rooms as I want

Image

any ideas?

I managed to reproduce this with 2 clients. One of them updates property. Other leaves and fails to create room then. Please report detailed reproduction steps next time.
Workaround switching properties back and forth before room creation should work while the issue is being fixed.
B
7
S
2
Posts: 161
Reputation: 1,005

Post » Thu Aug 11, 2016 6:10 pm

ThePhotons wrote:
2dgamedev wrote:@ThePhotons

Im having an issue .. if I join a room , then toggle IsOpen or isVisible , then leave the room and try to create a new room... I get this error and the room creation fails. but if i dont touch IsOpen or isVisible , i can join and leave and create as many rooms as I want

Image

any ideas?

I managed to reproduce this with 2 clients. One of them updates property. Other leaves and fails to create room then. Please report detailed reproduction steps next time.
Workaround switching properties back and forth before room creation should work while the issue is being fixed.


Can you clarify this fix? Switching which properties back and forth?
B
65
S
36
G
19
Posts: 496
Reputation: 16,999

Post » Fri Aug 12, 2016 8:13 am

B
7
S
2
Posts: 161
Reputation: 1,005

Post » Fri Aug 12, 2016 3:55 pm

Photon Scirra SDK updated: https://www.photonengine.com/Download/P ... -0-0-5.zip

Please select region again in regions list or app will fail to connect to Photon server (regions codes are in lowercase since this update)

FIXED: client did not disconnect from game server after Leave operation (and was disconnected by server after 10 sec. if reconnected within this time)
FIXED: custom and well-known properties retrieval from properties update event (number instead of bool in IsOpen and IsVisible options issue)
FIXED: options objects literals keys replaced with strings to avoid replacement during export to HTML5 (e.g. join createIfNotExist option did not work in HTML5 export)
ADDED: 'MasterActorNr' expression
ADDED: usw, sa, cae regions to dropdown menu
CHANGED: (BREAKING) existing regions in dropdown menu lowercased (reset menu selection in ui after update)
B
7
S
2
Posts: 161
Reputation: 1,005

Post » Fri Aug 12, 2016 5:49 pm

What is the best way to do Turnbased game?
B
4
Posts: 1
Reputation: 204

Post » Sat Aug 13, 2016 2:38 am

@ThePhotons Woo ! thanks for the bugfixes ,

sorry about hte explaination being slightly confusing .. what i ment was if i join a room i didnt make , then host closes the room , then i leave and create my own room it would fail.. but I think you figured it out there so thanks for the extra effort!
B
11
S
2
Posts: 29
Reputation: 715

Post » Sat Aug 13, 2016 11:05 pm

Thanks for the updates latly, great stuff.

I got a couple questions:

What's up with this 500 Msg/s limit ?
According to the calculator on your website I can send 31 Msg/s for a 4 Player game before i hit this threshold. How can that be enough for a realtime game?
The fish example works because of the choosen input method, but what about games that are controlled with gamepad or WASD ?
This kind of games have a much less predictable movement and have to be updated frequently.
Construct 2 runs with 60 FPS, so if I update my 4 players position every other tick im already at the max Msg/s allowed.
I know i can update less per sec and interpolate between the received updates but you can only go so far with that before it get's wonky and thats only the 4 player possitions, what about bullets, enemys, level changes...

Why can we only send strings ?
Can we? Maybe I overlooked something?!?!
Else, is this a general limit of photon or is this specific to Construct 2 ?
I mutch rather would prefer to have it more like in the official C2 Multiplayer plugin.
Image

What i'm getting at is that with the focus on limiting the Msg/s i feel like i'm forced to send big clumps of data at once instead of trying to keep the bandwidth low and send small data more frequent and bigger data less frequent.
In my understanding the later method will result in more fluent gameplay and less stress on the server, no?
Or are the Msg/s more straining for a server then the bandwidth?

I made a messy test for an 8 direction movement that sends small data often and bigger data rarer.
test.capx
I send the user input in an small interger every 0.1 second
and correct the deviation with the bigger data (x,y coordinate) only every second.
B
68
S
28
G
7
Posts: 84
Reputation: 7,494

Post » Mon Aug 15, 2016 9:03 am

zizman wrote:What is the best way to do Turnbased game?

Please read Photon Turnbased documentation: http://doc.photonengine.com/en-US/realt ... -turnbased
We do not have Scirra plugin specific tutorials or samples for Turnbased but approach is the same for any Photon SDK.
B
7
S
2
Posts: 161
Reputation: 1,005

Post » Mon Aug 15, 2016 9:25 am

EpicPixel wrote:...
What's up with this 500 Msg/s limit ?
...

Sending 10 regular updates per player per seconds looks quite reasonable. You can send only changed parameters optimizing message size this way.
And you still have 20 message more which you can use for immediate updates on user input e.g.
Why can we only send strings ?
...

Photon can use arbitrary javascript object, array or basic type as event's payload. From the other hand, It's impossible (or at least I don't know how) to set javascript objects or array as Construct2 action parameter. String is chosen as most generic type available in C2. Using JSON, you can encode any js data as string.
B
7
S
2
Posts: 161
Reputation: 1,005

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: tatogame and 4 guests