multiplay-examples icon indicating copy to clipboard operation
multiplay-examples copied to clipboard

feat: Sample matchmaker and gameclient

Open lwaddicor opened this issue 3 years ago • 1 comments

This adds a simple matchmaker and a simple game client example. It is designed to get a simple end to end running and not as an example of a production matchmaker. For this the unity matchmaker is recommended

lwaddicor avatar Jan 17 '22 09:01 lwaddicor

Test evidence

This may need a few more cycles to really nail down. Just a sample of the matchmaker and client running against the linux dev fleet which appears to be running a http server.

Game Client 1:

Starting to find a match
Asking matchmaker about match for us (playerid: c9a6b8ff-5665-403c-9382-ba6ddf273165)
Matchmaker did not have a match ready
Asking matchmaker about match for us (playerid: c9a6b8ff-5665-403c-9382-ba6ddf273165)
Matchmaker did not have a match ready
Asking matchmaker about match for us (playerid: c9a6b8ff-5665-403c-9382-ba6ddf273165)
Matchmaker did not have a match ready
Asking matchmaker about match for us (playerid: c9a6b8ff-5665-403c-9382-ba6ddf273165)
Matchmaker found us a match
Connecting to match:
 - Allocation UUID: 03bc0ac3-0a46-4cf0-803e-2d89a3dce4f9:37315
 - Address: 109.169.15.15:37315
 - Other players:
 - - 4554326e-ca56-4f7c-9088-6cfecd96ede4 - 127.0.0.1:50998
 - - c9a6b8ff-5665-403c-9382-ba6ddf273165 - 127.0.0.1:51008
HTTP/1.1 400 Bad Request
Content-Type: text/plain; charset=utf-8
Connection: close

400 Bad Request
Starting to find a match
Asking matchmaker about match for us (playerid: 4554326e-ca56-4f7c-9088-6cfecd96ede4)
Matchmaker did not have a match ready
Asking matchmaker about match for us (playerid: 4554326e-ca56-4f7c-9088-6cfecd96ede4)
Matchmaker did not have a match ready
Asking matchmaker about match for us (playerid: 4554326e-ca56-4f7c-9088-6cfecd96ede4)
Matchmaker did not have a match ready
Asking matchmaker about match for us (playerid: 4554326e-ca56-4f7c-9088-6cfecd96ede4)
Matchmaker did not have a match ready
Asking matchmaker about match for us (playerid: 4554326e-ca56-4f7c-9088-6cfecd96ede4)
Matchmaker did not have a match ready
Asking matchmaker about match for us (playerid: 4554326e-ca56-4f7c-9088-6cfecd96ede4)
Matchmaker found us a match
Connecting to match:
 - Allocation UUID: 03bc0ac3-0a46-4cf0-803e-2d89a3dce4f9:37315
 - Address: 109.169.15.15:37315
 - Other players:
 - - 4554326e-ca56-4f7c-9088-6cfecd96ede4 - 127.0.0.1:50998
 - - c9a6b8ff-5665-403c-9382-ba6ddf273165 - 127.0.0.1:51008
HTTP/1.1 400 Bad Request
Content-Type: text/plain; charset=utf-8
Connection: close

400 Bad Request

The current output from the matchmaker, which

Players waiting: 0, Match size needed: 2
Players waiting: 0, Match size needed: 2
Players waiting: 0, Match size needed: 2
Players waiting: 0, Match size needed: 2
Players waiting: 0, Match size needed: 2
Handle player
Adding new unmatched player
Players waiting: 1, Match size needed: 2
Handle player
Player 4554326e-ca56-4f7c-9088-6cfecd96ede4 asked about match status, but it was not ready.
Player searching: 4554326e-ca56-4f7c-9088-6cfecd96ede4
Players waiting: 1, Match size needed: 2
Handle player
Player 4554326e-ca56-4f7c-9088-6cfecd96ede4 asked about match status, but it was not ready.
Player searching: 4554326e-ca56-4f7c-9088-6cfecd96ede4
Players waiting: 1, Match size needed: 2
Handle player
Adding new unmatched player
Handle player
Player 4554326e-ca56-4f7c-9088-6cfecd96ede4 asked about match status, but it was not ready.
Player searching: 4554326e-ca56-4f7c-9088-6cfecd96ede4
Players waiting: 2, Match size needed: 2
About to allocate for match
Handle player
Adding new unmatched player
Adding new unmatched player
Players waiting: 0, Match size needed: 2
Handle player
Adding new unmatched player
Got allocation: 109.169.15.15:37315

lwaddicor avatar Jan 17 '22 16:01 lwaddicor