What multiplayer options are there?

Discussion and feedback on Construct 2

Post » Thu May 18, 2017 7:43 pm

Hey guys,

I'm wondering what Multiplayer options there are available? The built-in Multiplayer doesn't serve my needs as I need something that's always on, rather than the game stopping when the host leaves.

I have also been using Photon, but their price plans are a bit high for what you get.

Is there any other options available?

Thanks!
B
7
S
2
Posts: 41
Reputation: 613

Post » Thu May 18, 2017 7:45 pm

photon cloud, very easy to use and understand. you can have games running as long as there is players in the room. no host or peer.
Follow my progress on Twitter
or in this thread Archer Devlog
B
41
S
18
G
18
Posts: 1,025
Reputation: 13,347

Post » Thu May 18, 2017 8:20 pm

Yeah as I stated above I use Photon at present, but their plans are quite expensive for what you get. $95 for 100 concurrent users.

Whilst I don't expect that much, it's still expensive. :(
B
7
S
2
Posts: 41
Reputation: 613

Post » Thu May 18, 2017 8:52 pm

RetroSpock wrote:Yeah as I stated above I use Photon at present, but their plans are quite expensive for what you get. $95 for 100 concurrent users.

Whilst I don't expect that much, it's still expensive. :(


95 is not really a lot. If you have 100 players ccu you should be earning enough to cover that pretty quick?
Follow my progress on Twitter
or in this thread Archer Devlog
B
41
S
18
G
18
Posts: 1,025
Reputation: 13,347

Post » Thu May 18, 2017 9:01 pm

Aye that's true man. I'll probably stick with Photon then, thanks <3
B
7
S
2
Posts: 41
Reputation: 613

Post » Thu May 18, 2017 9:19 pm

RetroSpock wrote:...rather than the game stopping when the host leaves...


This does not need to be the case.
You can make it so that another player becomes host, and even preserve the state of the (previously) connected player(s) and game state.

Just make every peer aware of the game states and IDs, and if you keep track of your current PeerID, you can even reconnect to the new host, and Re-use your own player object after it updated the PeerID to the new ID. You just gotta send the current host your old Id and make the host check if that ID exists.

I have this working in various tinker projects already.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

Post » Fri May 19, 2017 8:02 am

lennaert wrote:
RetroSpock wrote:...rather than the game stopping when the host leaves...


This does not need to be the case.
You can make it so that another player becomes host, and even preserve the state of the (previously) connected player(s) and game state.

Just make every peer aware of the game states and IDs, and if you keep track of your current PeerID, you can even reconnect to the new host, and Re-use your own player object after it updated the PeerID to the new ID. You just gotta send the current host your old Id and make the host check if that ID exists.

I have this working in various tinker projects already.


What's the performance like? It sounds like a dirty hack that would ultimately lag out.
B
7
S
2
Posts: 41
Reputation: 613

Post » Fri May 19, 2017 8:40 am

... Just lost intrest helping you out ....
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

Post » Fri May 19, 2017 1:08 pm

How come?
B
7
S
2
Posts: 41
Reputation: 613

Post » Fri May 19, 2017 2:27 pm

Because of your last reply ...
I felt a bit shit on getting a suggestive statement about it possibly being a dirty hack :lol:

Apologies, anyway ...

The methods work and its all in the events, with standard plugins performance is not an issue par your own game mechanic.

Local storage to preserve the users ID in case of a disconnect or crash.
A var for HostID of the room.
Preferably an array to keep track of connected IDs during the game for every peer. (and perhaps other values such as health etc)

By default when the host leaves a room a peer is automatically picked from that room to become host.
So, with an event to detect if the player that left was the host, recheck if your host and set peer/host group accordingly.

With the array of peer IDs you can reset potentially still connected peers.
When the old host reconnects to the room, it should on join send the new host its old id from the local storage.

The new host receives this, and checks his array of peer IDs, if that old ID was in his array, if yes ... update the peer ID in the array.



Not really a dirt hack ... just smart application of the optional events :)
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

Next

Return to Construct 2 General

Who is online

Users browsing this forum: banquetburger and 8 guests