No announcement yet.

Setting up listen-server matchmaking?

  • Filter
  • Time
  • Show
Clear All
new posts

    Setting up listen-server matchmaking?

    Hi! I have been trying to dive into networking (right now using blueprints as I have yet to find ANY info on doing it in C++), but would like to know one thing: how should I go about making/joining servers? The playercount is not expected to be massive, so there should be no need for a dedicated server. How should I then make as easy as possible "Host server button"; that would let users host their servers preferably without having to mess with port forwarding. And if that is not possible, well, at least I would like to know how to make the client connect to a particular server, and how to host it.

    You can host and join games with a console command.

    "open YOURLEVELNAME?listen" will host a listen-server
    "open IPADDRESS" will join the ip address.

    Ports always need to be open. That's something clientside and
    not Engine Related.

    You can make Buttons with the UMG Editor. Bind a function to the HOST
    Button and let this function call the console command.
    For different Maps you can take a TextArray that contains your map names
    and append this to the command.

    For joining i would use a Editable Textbox and a second button.
    The Textbox can be used as variable. The user types in the IPAddress
    and presses the button. The Function bound to the button will
    call the second console command where you also need to append
    the variable to.

    Look up the Tutorials of UMG (either Twitch presentation or google),
    to get started with UMG.
    Open for contracted work | C++/BP (incl. Multiplayer) | Tutoring | VR

    My UE4 Blog/Page with Tutorials and more: Hit me for ALL the things!
    (Including 100+ Pages Multiplayer Network Compendium to get you started.)