#Multiplay + Matchmaking

1 messages · Page 1 of 1 (latest)

thin zenith
#

Hey all. I've been trying to use UGS Multiplay with UGS Matchmaking together with varying results.

The matchmaking service usually takes a little while for my two clients to match, but they match and each client recieves the correct IP and port to connect to via a ticket response from matchmaking.

Then each client tries to connect to the server with the given IP and port.

I can see that the Machine and Servers are active and using the correct build in my Multiplay Hosting UI. I can also see the server becoming allocated, but then most of the time the clients will never connect to the server successfully.

Occasionally they will connect to the server randomly. I'm not sure why they are able to occasionally connect sometimes and not others.

Any suggestions about how to proceed here? Thanks!

tender forum
#

You'll need to check the server logs to see what is happening there. Something might be timing out after the server starts

thin zenith
#

Follow up question: Is there any way to keep one server/machine up all the time to simulate some kind of server warm-start ? I've found that once my server is up, I get way fewer timeouts.

tender forum
thin zenith
#

Awesome, that makes sense. Thanks!

Another follow up question: i'm seeing behavior where my clients are disconnecting every once in a while... maybe once every 10 minutes. I have been trying to work around this by having code to react to when they reconnect, but any idea why this might be happening? Is there like an AFK auto disconnect built into multiplay or something? (I'm playing all the clients myself, so they afk for quite a bit).

#

Might even be less than 10 minutes, maybe 5 minutes

#

Actually, this might be the cause... but I have no idea why so much CPU is being used. This is a turn based card game. lol

"Allocated server had issues (CPU over limit. Combined core(s) usage 131.74% (65.87% of machine), only 50.00% allowed with 0 players), stopping server and deallocating"

tender forum
#

You'll need to cap frame rate on the server. But honestly for a card game you don't really need a dedicated server. You can use cloud code with cloud save to process turns and draw cards

thin zenith
#

Could I still use matchmaking with cloud code? I do want to an ELO and XP based match making system at some point.

#

And the other thing I wanted to make sure of is that the client doesn't have access to the face down card data

#

(In the mean time, how does one cap frame rate on the server, is that just in the multiplay dashboard or something I would do in my headless server build properties?)

tender forum
tender forum
thin zenith
#

Oooo that's pretty cool. This sounds like a full code refactor though. LOL

tender forum
#

or really even lower since its turnbased. set it to whatever your tick rate is

thin zenith
#

Sweet, thanks a bunch. I might look into how much work it will be to do the Cloud Save and Cloud Code stuff.

Right now my game is highly chopped up into server and client logic so it might be rough to refactor.

tender forum
#

The way I am working on the game state will be giant json of the both player decks, hands, and playfields. Every action will be a call into cloud code to modify and resave that state. The End Turn action would switch active players and then do all the upkeep.

thin zenith
#

Oooo very cool. I will think about that. I'm doing a small alpha with my friends this weekend, after that I will look into Cloud Save and Cloud Code.