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 get Create/Join Session IP

Hello,

I am currently trying to implement a simple test Multiplayer system with the new Create/Find/Join Session commands. I am able to Create/Find and Join sessions that I have created, but I have no idea how I can load a map from the Client who Created the Session and also be able to connect to it with the other Clients. I know that "open Testmap?listen" will create map for joining and also that the clients have to type "open ", but I am not able to get any IP address where I can join to. I can't understand that when you find a Session that you can't just get the IP from the Session via the struct like "Get ServerIP", and I have no idea how to get the IP otherwise or how to manage the Sessions in a matter where the one who Created the Session is able to execute a command where it automaticly loads the map for everyone, but trying to do stuff like "servertravel Testmap" doesn't work like that.

Is there a way to get the IP from a Session where you can connect to? Or do you have to do all that joining a map stuff different?

Product Version: Not Selected
Tags:
more ▼

asked Dec 14 '14 at 07:23 PM in Blueprint Scripting

avatar image

Nobody
121 7 15 25

avatar image Chadvvick Jun 05 '15 at 10:11 PM

For someone that knows little to nothing about C++ (or programming in general), is there a way to pass other information through the "JoinSession" functionality in blueprints? I know that you can get the server name and whether or not it's LAN, how many current players, and the maximum amount of players. I'm sure this is something that you can do when writing the game in C++, and I'm ok with doing that, but I wouldn't even know where to begin, how to implement that functionality, or how to combine that with what we already have set up in Blueprints (I know you can expose variables in C++ that can be edited via blueprints, but I don't know exactly how to do that either)

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

2 answers: sort voted first

The simplest solution I can think of is developing a resful web api in a language like node.js or even PHP. There are probably 1000's of tutorials on the subject. There are also a few plugins that expose some http blueprint nodes for posting and getting json right in the engine. When a user creates a new game the game posts up to the api and tells it things like what's the hosts name and what's the hosts IP address. Then the clients get a list of servers from the api which has the hosts name and the hosts IP. The next step is running the console command in blueprint to open 12.12.12.12 and let UE4 take over the rest. Host needs 7777 udp opened. To avoid that situation you're really going to be looking at something more custom with NAT punch-through.

more ▼

answered May 05 '15 at 04:51 AM

avatar image

TheFoyer
171 9 16 30

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

UE4 does not have internal solution for that (except LAN support) .... most games don't, they usually use external services to list servers (so called "master list") that send beacon calls (and i think UE4 actully has support for that) so then can be listed and downloaded list by user can be used to find specific server and thats just fro dedicated servers, it's even more complex for client-side made sessions (popularly called P2P but it's not always real P2P)

So you have 2 options use:

  1. Code your own solution, for example using HTTP, that lists sessions and then find them, this will require C++

  2. Use external online service, like SteamWorks, Google+ games, also on consoles PSN or Xbox Live they provide session listing features. UE4 got common interface to use them all called iOnlineSubsystem

https://docs.unrealengine.com/latest/INT/API/Runtime/OnlineSubsystem/IOnlineSubsystem/index.html

This will most likely require registration your application on service (if there no test mode), also don't know how much this is exposed to blueprint i know TappyChicken use Leadderboard and Achievements features (and note they all work the same few platfroms) of those services in blueprint so that might be good starting point

more ▼

answered Dec 14 '14 at 07:48 PM

avatar image

Shadowriver
34.6k 917 164 1095

avatar image Nobody Dec 14 '14 at 07:53 PM

Hmm interesting, thats for the information.

My Problem is that I am actually trying to implement the LAN connections for now, but I don't want to do it by simply entering 127.0.0.1, since I was trying to go for something where you can for instance join each others over lan with the help of Hamachi/Tunngle.

avatar image Shadowriver Dec 14 '14 at 08:08 PM

Looking on API refrence and engine source code you could use LAN search via OnlineSubsystemNull (OnlineSubsystem module that don't use any network service), so i guess good direction is to learn how to use OnlineSubsystems in first place. As you may notice they are devided in to modules for each gaming network service that UE4 supports to which oyu can communicate via common interface so you dont need to write support for each network service

TappyChicken is a only blueprint example that i know it's using IOnlineSubsystem

(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