x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

how to handle matchmaking in the dedicated server? (more match games at time)

Hi,

I'm creating a FPS game in my spare time, I chose to use the dedicated server and not Steam. At the moment I'm trying to figure out how I can best manage the games, that is, the matchmaking that search up to (for example) 6 players then he takes them all in a map to start the game.

I had read around that maybe I had to start multiple servers on different ports, but how do I manage matchmaking and have more games on the same map at the same time?

Thanks

Product Version: UE 4.17
Tags:
more ▼

asked Feb 08 '18 at 06:10 PM in Blueprint Scripting

avatar image

bombe93
6 2 1

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

Hello there :)

may have a look at my matchmaking system: https://www.unrealengine.com/marketplace/matchmaking-server-function

It should do exactly what you need :)

Best Regards

more ▼

answered Feb 11 '18 at 12:49 PM

avatar image

RobinZinser
1 1 2

avatar image bombe93 Feb 13 '18 at 02:00 PM

thanks for the answer, very interesting but I needed something basic that I can reproduce without being there a long time. it's for an open source project, if I take one for a fee I cann't then put it in the repository

avatar image RobinZinser Feb 22 '18 at 08:16 AM

okay then this is maybe not the best choice :) Hope you'll find some solution

(comments are locked)
10|2000 characters needed characters left

Starting multiple server instances on different ports is a viable approach, though unfortunately it does require dipping into C++ code (I don't know of a way to launch additional server instances directly from blueprints). Here is a resource that I found helpful for running the server executable (and keeping track of their process IDs to shut them down later). I passed the server executable path and arguments into my function as FString parameters, then converted them to TCHAR* so that I could use them with CreateProc.

The arguments parameter should be anything you'd put into the command line (or Windows shortcut) for launching the server. In this case, we'll need to include the port ("-port=7778"). You could also include the "-log" flag so that a console window appears for the server instance. This tends to be helpful during the early stages of development, but you might want to remove the tag later on.

Once you have a server instance running, you can tell clients to connect to it. To do that, just use the "OpenLevel" blueprint node, passing in your server's IP address and the port number separated by a colon (127.0.0.1:7778). After all of the players have connected, the server instance can run ServerTravel (using the name of the map you want to load) to start the game.

The last trick for you is going to be figuring out how to manage your actual matchmaking. You might need a persistent server that everyone connects to which redirects players into server instances appropriately. The persistent server should be able to keep track of all of the instance by port number (so that it can send players to the right "rooms"). As games finish up, you can reconnect players to the persistent server so that they can be reentered into matchmaking. And of course, you'll probably want to have each server instance keep track of how many players are still connected so that it can shut itself down when everyone leaves.

Hope that helps!

more ▼

answered Jan 08 '19 at 06:15 PM

avatar image

Bryant_PSC
6 2 7

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question