How choose same player level for multiplayer ?

Get help using Construct 2

Post » Thu Apr 20, 2017 10:36 am

hi, i', trying for game like clash royal.
in clash royal with 2 player multiplayer realtime game, you fight with a player who the player has same level with you.
for example : you have 2043 xp , and another player has some xp between 2000 - 2060 .

so i can code php and mysql for server side , but i need some idea for connect 2 players .

any help please?

best regards ( sorry for English)
B
10
S
3
Posts: 180
Reputation: 1,212

Post » Thu Apr 20, 2017 10:45 am

maybe , i mean how connect 2 player manually ? (: but imaging 100 player send request for same time and i need connect them manually.
B
10
S
3
Posts: 180
Reputation: 1,212

Post » Thu Apr 20, 2017 4:04 pm

hi again, any help? why nobody help in multiplayer problem?! :(
B
10
S
3
Posts: 180
Reputation: 1,212

Post » Thu Apr 20, 2017 7:00 pm

up! i need answer, please.
B
10
S
3
Posts: 180
Reputation: 1,212

Post » Thu Apr 20, 2017 8:38 pm

@lennaert can you help ? best regards,
B
10
S
3
Posts: 180
Reputation: 1,212

Post » Thu Apr 20, 2017 10:42 pm

Disclaimer: I haven't tried this myself, so no guarantee it will work.

You need a matchmaking server. It will be a default lobby that everyone connects to. The peers will report their XP/rank, then the host, through logic that you set up, will assign the matched pair of players a unique room. Your players, once they have received their room ID, will disconnect from the lobby and then connect to the unique room that they both got assigned by the matchmaking host.
Mistakes were made.
B
49
S
24
G
107
Posts: 1,581
Reputation: 60,303

Post » Fri Apr 21, 2017 5:51 am

Suggestion:

Use xp ranges, like 0 to 1000 and 2000 to 3000 etc (or a range you like, and process this in your multilayer room name. I.e. range1k, range2k, range3k etc

Then, after connecting and searching for available rooms, show or join rooms which has your range in the room name.

Example:

Player is in the 2k range xp, upon start it sets the room name to range2k and auto joins it.

If this happens to all players who are in the 2k range, they will auto join the first available room which starts with range 2k.

Voila .. No extra server needed ;)

Ps if a player levels up after a played game simply update the room name to the new range.

I did a similair thing for countries based room selection where people wanted to join people from the same country. It works.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,562

Post » Fri Apr 21, 2017 4:34 pm

thank you . i try it.
B
10
S
3
Posts: 180
Reputation: 1,212


Return to How do I....?

Who is online

Users browsing this forum: David181, istero, webebiz and 1 guest