Multiplayer-Multiple hosts/shards

Get help using Construct 2

Post » Mon Jul 28, 2014 3:54 am

Game scenario:
8 players are roaming a game world.
1 of the players enters a dungeon.

Desired effect:
This dungeon should now have a separate server.

When players enter the dungeon they are placed on the new server.
When players leave the dungeon they are returned to the main server.

Reasoning:
This shard behavior. Reduces stress and latency across the main game world.
This allows more dynamic servers, and could allow for larger player interactions.
B
28
S
8
G
1
Posts: 226
Reputation: 2,865

Post » Mon Jul 28, 2014 9:24 pm

still interested of peoples thoughts on the subject.
B
28
S
8
G
1
Posts: 226
Reputation: 2,865

Post » Tue Jul 29, 2014 2:28 pm

Well, I can't say that I've tried this, but construct does support joining and leaving rooms (while still being connected to the signalling server) And also supports disconnecting and reconnecting to the signalling server. Perhaps you can play around with disconnecting from one room and connecting to a different room in the same game. However be aware that the Construct's multiplayer object automatically makes the first user in each room the "host", and if the host disconnects, all other players in the room are booted.

And if you play around with it, come back and tell me if it works, so I can know how to do it later. :)
B
11
S
3
G
1
Posts: 98
Reputation: 1,062

Post » Wed Jul 30, 2014 11:14 pm

Would I be needing multiple servers running? As in multiple browser tabs, or would it be possible to do this within a single server you think?

I'm just trying to think of ways that could make the game load in persistent chunks without needing the entire world going at once.
My theory being that having smaller Shards to deal with would have better performance. Why load an entire world, when players only play in a small "chunk" at a time.


I run into a wall though, because if a single machine ends up hosting multiple servers constantly. That would almost defeat the purpose of the shards, unless it could be dynamically done.
B
28
S
8
G
1
Posts: 226
Reputation: 2,865

Post » Thu Jul 31, 2014 2:44 pm

Well if you have instanced dungeons, you could probably write it so that you don't need a server for each of them, just make it so that if any player leaves (especially the host, or just only the host), then all players are booted (and returned to the main server). Alternatively it wouldn't be hard to make single-player instanced dungeons without a need for a server at all.

But as I said, unless you can find someone with more experience with the multiplayer plugin and/or instancing with it, the best way to learn these things is to try them out yourself. You can simulate multiple players by using different tabs, even while you debug. (you can also do it with different browsers)
B
11
S
3
G
1
Posts: 98
Reputation: 1,062


Return to How do I....?

Who is online

Users browsing this forum: Darth Crusher, zsoldiers and 5 guests

cron