Updated Source Code Download Ready on Drop Box!
With Complete Source Code Replacement to match ShooterGame code much better (CTRL + F1 to run the HostGame code from shootergame) !
Dear Friends at Epic,
After having successfully played Shootergame as true multiplayer game with Alexander, and now also Adric, using open IP
I adjusted a lot of my internal code to match the Shootergame code better
Now I have a new updated download available!
Nathan_Lyer\VictoryGameMultiplayerTest\VictoryGameTestFullyUpdated.rar
I also fixed my config files to match Shootergame more closely.
My prior mistake:
I was not calling the shooter game online code for HostMatch at all before, I was just using “open ?listen” to start an online game.
I also modified the gameinfo PreLogin rules to always pass back a empty string error message to ensure other player gets accepted
Now I am calling the shootergame HostGame code as closely as I can, minus the actual GameType string value.
Alexander, or any one else who wants to try this:
When you get the chance,
Please download my complete game .rar and see if you can get an open IP game going with anyone else
You can msg me here or pm me if you want to meet up at some specific time, and I will re-post my IP
To be the Host
After you start game, press CTRL + F1 to become a listen host and run the Shootergame HostGame code
If it doesnt work I am really not sure what else to do code-wise, because I’m carefully copied over all the shootergame code and and this time I’m actually running it
When you press CTRL + F1 this code runs:
AVictoryGameGameInfo* VictoryGameInfo = Cast(GetWorld()->GetGameInfo());
if (!VictoryGameInfo) return;
FString TheGameType = "Fun";
FString HappyURL = "/Game/Maps/Victory?listen";
//Host
VictoryGameInfo->HostGame(
this,
TheGameType,
HappyURL
);
copied from shooter game along with all the other code related to this:
/** Starts the game */
bool AVictoryGameGameInfo::HostGame(APlayerController * PCOwner, const FString & GameType, const FString & InTravelURL)
{
bool bResult = false;
check(PCOwner != NULL);
if (PCOwner)
{
AVictoryGameSession* Session = Cast(GameSession);
if (Session)
{
ULocalPlayer * LP = Cast(PCOwner->Player);
if (LP != NULL)
{
TravelURL = InTravelURL;
Session->OnCreatePresenceSessionComplete().AddUObject(this, &AVictoryGameGameInfo::OnCreatePresenceSessionComplete);
if (Session->HostSession(LP->ControllerId, GameSessionName, GameType, false, true, 4))
{
// @todo Show loading movie
bResult = true;
}
}
}
}
return bResult;
}