UPDATE - before you read the rant…
In the First Person Shooter demo the menus don’t appear if you run it from the editor.
Turns out burried down in the C++ code is the menu code for a lot of this.
E.g. in C:\Users\MyName\Documents\Unreal Projects\ShooterGame\Source\ShooterGame\Private\UI\Menu
UPDATE 2 - Building the FirstPerson.exe does not work. Whne you run it you get a black screen.
UPDATE 3 - Ok, found the source for Unreal 4 Engine 4.7 on GitHub. For any serious development it is a fountain of sample code.
Calming down some now. lol
We are porting from Untiy to Unreal.
We need to do the followiung, just like every other game out there.
- Get in a main menu, go to multiplayer menu
- In multiplayer have a button to create a game.
- Create the game and register the session so others can find it.
- Get in the game and play
- Meanwhile other player run the game and click on a Join button, and get a list of games that are running and available.
- Click on the game and join the already running Coop game.
This is very straight forward and simple, and I see in C++ how to do it in the Unreal engine
with things like CreateSession with a FOnlineSessionInfo.
In blueprints there is a CreateSession in the online section, but it is useless because it can not take a FOnlineSessionInfo.
So I want to write my own class in C++ to make my own CreateSession blueprint function and related functions (list game, join game etc.)
==== This is where I hit a wall. ====
For any but the most trivial blueprint C++ examples there is nothing. The ShooterGame has none of it.
How does one make something like the existing Create Session bluperint function, with the Success and Failure outputs flow???
How does one make a function in a blueprint in C++ that calls some net function, and then gets a delegate callback
when done, and have the box in the blueprint wait internally for the callback top happen, then continue execution of the blueprint flow???
Is any of this documented in a fashion that is useful? Obviously there is the API docs but like every other engine out there they say NOTHING about how to use them.
There are trivial examples like this https://wiki.unrealengine.com/Blueprints,_Creating_C%2B%2B_Functions_as_new_Blueprint_Nodes that show
how to call a function. But is has to be static, single shot, immediate execution with an answer.
I used that to at least get the Steam Gamertag string to the blueprint.
I tried doing a while loop to wait for a static function to return true that the session create is done,
and Unreal complains is detected an infinite loop.
In C# in Unity this would use a Yield in the function to in effect mutlitask the wait and keep the game active.
I assume there are tags and metatags you put somewhere in the blueprint C++ code to indicate waiting and multiple output paths (maybe?).
I have watched the networking tutorials about network relevance and such over and over. They are very slick and informative about
concepts but in the end are absolutly usless for someone making an actual game to ship.
The ability of the editor to run multiple players in multiple windows is amazing and cool, and great for debugging,
but that tutorial leads to a dead end when you actually want to make a game where you need to have attributes on the session
My frustration level is very high (and project schedule will soon get behind)
Maybe there is someone I can hire or someone I can pay in consulting at Unreal to get fast answers???
Is the only way to do this is via. C++ and scrap blueprints for networking in a Unreal game???