Announcement

Collapse
No announcement yet.

Unreal Engine 4 is available for Win10 UWP app dev now

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Originally posted by jsyarrow View Post
    I've looked into this a little and I think the answer is that, as I suspected, some of these code paths need to be altered to account for the Creators Program. The current approach to writing statistics and reading leaderboards isn't really supported for Creators Program titles. Instead we should be using the newer stats_manager API, for both read and write. Right now I think the best approach would be to go back to the original plan of implementing FOnlineLeaderboardsLive:::WriteLeaderboards. Do that in terms of the state_manager, and then modify ReadLeaderboards (and variants) to also use stats_manager. With any luck that's enough of a clue to get you unblocked.

    Thank you for the clarification and the link. I may not be able to look at this until the 06.(26 or 27).17. I'll take a stab at it then.

    Thanks again.

    Leave a comment:


  • replied
    I've looked into this a little and I think the answer is that, as I suspected, some of these code paths need to be altered to account for the Creators Program. The current approach to writing statistics and reading leaderboards isn't really supported for Creators Program titles. Instead we should be using the newer stats_manager API, for both read and write. Right now I think the best approach would be to go back to the original plan of implementing FOnlineLeaderboardsLive:::WriteLeaderboards. Do that in terms of the state_manager, and then modify ReadLeaderboards (and variants) to also use stats_manager. With any luck that's enough of a clue to get you unblocked.

    Leave a comment:


  • replied
    For the record, I've posted my request for help at two additional locations:

    https://github.com/Microsoft/xbox-live-api/issues/203

    https://social.msdn.microsoft.com/Fo...um=xboxlivedev

    Sadly no response yet.

    Leave a comment:


  • replied
    How do I write the Featured Stats / Leaderboards then:

    Click image for larger version

Name:	FeaturedStats.jpg
Views:	1
Size:	47.6 KB
ID:	1129989


    I've tried writing them with events too:

    Code:
    IOnlineEvents* ioe = ios->GetEventsInterface().Get();
    if (ioe != nullptr)
    {
        FOnlineEventParms Parms;
        Parms.Add(TEXT("GameplayModeId"), FVariantData((int32)1));
        Parms.Add(TEXT("DifficultyLevelId"), FVariantData((int32)1));
        Parms.Add(TEXT("HighScore"), FVariantData((int32)levelScore->GetTotalScore()));
    
        bool isOk = ioe->TriggerEvent(*playerId, TEXT("OceanWave"), Parms);
        isOk = ioe->TriggerEvent(*playerId, TEXT("HighScore"), Parms);
    }

    Above, I used two calls with different event names hoping that one of them will match my Xbox Live Configuration.
    Last edited by Jerry.Richards; 06-20-2017, 01:36 PM.

    Leave a comment:


  • replied
    [MENTION=5350]Jerry.Richards[/MENTION] - this again is the plugin revealing its origins as a component of UE for Xbox One XDK games. The ability to write Achievements is not part of the Xbox Live Creators Program.
    [MENTION=680838]User-645081948[/MENTION] - do you have the Windows 10 SDK installed (preferably either 14393, or if you're using VS2017, 15063)?
    [MENTION=595928]xxValiumxx[/MENTION] - a couple of ideas: be aware of the performance envelope for UWP on Xbox One. In particular, make sure you're not exceeding the memory limit, and that you're using the D3D11 RHI. Also, try running the Windows App Certification Kit (WACK) against your appx package; often that will highlight problems that can go unnoticed on Windows desktop, but that will limit your game's ability to run on other UWP devices. Note that it's expected that configurations other than Shipping use some unsupported APIs, so you may need to use a Shipping build to run on Xbox.

    Leave a comment:


  • replied
    [MENTION=494622]jsyarrow[/MENTION] - I'm trying to write achievements following the code in OnlineAchievementsInterfaceLive.cpp:

    Code:
    for ( FStatPropertyArray::TConstIterator It( WriteObject->Properties ); It; ++It )
    {
    	float Percent = 0.0f;
    	It.Value().GetValue( Percent );
    
    	if ( Percent < 100.0f )
    	{
    		continue;
    	}
    	:
    	:
    	FName Name = It.Key();
    	int32* Index = AchievementsConfig.AchievementMap.Find( Name.ToString() );
    
    	FOnlineEventParms Parms;
    	Parms.Add( TEXT( "AchievementIndex" ), FVariantData( (int32)*Index ) );
    
    	if ( !EventInterface->TriggerEvent( PlayerId, *AchievementsConfig.AchievementEventName, Parms ) )
    	{
    	}
    }
    Why is the value in Properties 100.0f?

    Where is the AchievementsConfig and AchivementMap kept? It appears that Google Play Plugin has such a map: https://docs.unrealengine.com/latest...nts/index.html

    The Live plugin doesn't have a similar map. Is it supposed to be in an INI file?

    Also, the above code does not appear to write my key-value pair:

    Code:
    writeObject->SetIntStat(FName("HighScore"), totalScore);
    :
    ioa->WriteAchievements(*playerId, writeObjectRef, callback);

    The OnlineAchievementsInterfaceLive code above appears to write the event name, "AchievementIndex", and the index value for the achievement:

    Code:
    FOnlineEventParms Parms;
    Parms.Add( TEXT( "AchievementIndex" ), FVariantData( (int32)*Index ) );
    
    if ( !EventInterface->TriggerEvent( PlayerId, *AchievementsConfig.AchievementEventName, Parms ) )

    Maybe there is some subtlety in the code that I missed, but test cases in the same file present a different view:

    Code:
    	FOnlineEventsLive * EventInterface = (FOnlineEventsLive*)LiveSubsystem->GetEventsInterface().Get();
    
    	FOnlineEventParms Parms;
    	Parms.Add( TEXT( "GameplayModeId" ), FVariantData( (int32)1 ) );
    	Parms.Add( TEXT( "DifficultyLevelId" ), FVariantData( (int32)1 ) );
    	Parms.Add( TEXT( "ExitStatusId" ), FVariantData( (int32)0 ) );
    	Parms.Add( TEXT( "MapName" ), FVariantData( FString("Highrise") ) );
    	Parms.Add( TEXT( "PlayerScore" ), FVariantData( (int32)0 ) );
    	Parms.Add( TEXT( "PlayerWon" ), FVariantData( (bool)false ) );
    
    	EventInterface->TriggerEvent( PlayerId, TEXT( "PlayerSessionEnd" ), Parms );

    Are you able to provide some insight on this?

    Leave a comment:


  • replied
    I'm having difficulty in getting a 3D project to run on the Xbox One, it just crashes shortly after the splash screen. There isn't anything in the scene apart from the preexisting bit of geometry.
    Building the Paper2D project as UWP and deploying that does seem to work, however.

    Is mine an isolated issue?

    ***Fixed***
    Last edited by xxValiumxx; 06-27-2017, 02:05 AM. Reason: I missed a setting. oops.

    Leave a comment:


  • replied
    Hi All,
    I was wondering if you could help, trying to setup the Holo lens to work with UE4.
    So I have downloaded the MS_UWP_Fork, run the setup and generate the project file.
    In Visual Studio I set the solution etc and select build and run the debugger.

    No errors are reported but when I startup a UE4 project from visual studio the UWP tab does not appear in the project settings - platform tab??

    Leave a comment:


  • replied
    Nothing appears on GameHub. Since I'm not certain of the syntax for the events, I've posted an issue on the Xbox Live SDK GitHub, and have the same question on the MSDN forums. Hopefully, someone will be able to help.

    Leave a comment:


  • replied
    What are the event names?

    Code:
    /// The name of the event, and the names of the event fields (both dimensions and measurements), must match
    /// the names declared in the title's service configuration. The names are case insensitive.

    If I understand the comment correctly, event name is actually something I set in the Dev Center configuration portal. I'm giving it a try. . .
    Last edited by Jerry.Richards; 06-16-2017, 04:24 PM.

    Leave a comment:


  • replied
    Originally posted by jsyarrow View Post
    On the whole I'd recommend stashing the net id that comes in as a callback parameter to sign in, and then (when possible) using the overloads of online methods that take in a net id.
    Yes, that is what I ended up doing.

    Originally posted by jsyarrow View Post
    The current approach to updating leaderboards is to submit events through the IOnlineEvents interface. The implementation is based on the technology described as 'Data Platform 2013' in the Xbox Live Docs. It may well need to be updated for Creators Program - I'm not aware of anyone doing that yet.

    And here I was digging into both codebases (Epic, and MS). Are you able to refer me to any examples for IOnlineEvents? I'm searching now. . .

    Leave a comment:


  • replied
    For GetUniquePlayerId, do you have a game controller attached? The parameter name 'controller index' is literal in this case - comes from the code's original home on Xbox. On the whole I'd recommend stashing the net id that comes in as a callback parameter to sign in, and then (when possible) using the overloads of online methods that take in a net id.

    The current approach to updating leaderboards is to submit events through the IOnlineEvents interface. The implementation is based on the technology described as 'Data Platform 2013' in the Xbox Live Docs. It may well need to be updated for Creators Program - I'm not aware of anyone doing that yet.

    Leave a comment:


  • replied
    Okay, I see the issue with WriteLeaderboards, it isn't ready yet:

    Code:
    bool FOnlineLeaderboardsLive::WriteLeaderboards(const FName& SessionName, const FUniqueNetId& Player, FOnlineLeaderboardWrite& WriteObject)
    {
    	UNREFERENCED_PARAMETER(SessionName);
    	UNREFERENCED_PARAMETER(Player);
    	UNREFERENCED_PARAMETER(WriteObject);
    	return false;
    }

    ReadLeaderboards is done but I don't know if that works or not. I'm going to look at sample code online and see if I can implement it quickly or not, meaning before anyone else does, unless it is being done by someone else.

    Leave a comment:


  • replied
    [MENTION=494622]jsyarrow[/MENTION] - I am able to successfully logon, get the AppId, and get the gamertag. Unfortunately, I encountered a problem while trying to update leaderboard information. After gameplay, I try to get the FUniqueNetId from the IOnlineIdentity interface but it returns null:

    Code:
    bool UWPScores::WriteLeaderboard(. . .)
    {
        IOnlineSubsystem* oss = IOnlineSubsystem::Get();
    
        if (oss != nullptr)
        {
            IOnlineIdentity* iss = oss->GetIdentityInterface().Get();
            if (iss != nullptr)
            {
                TSharedPtr<const FUniqueNetId> playerId = iss->GetUniquePlayerId(0);
                if (!playerId.IsValid())
                    return false;
                :
            }
            :
        }

    In the above code PlayerId is always null. Possibly I made a mistake, others appear to use the same approach, I tried getting the PlayerId during the callback function when logging in:

    Code:
    void UMainMenuScreenWidget::LoginPlayerCallback(TSharedPtr<const FUniqueNetId> PlayerId, const int ControllerIndex)
    {
        if (PlayerId.IsValid())
        {
            IOnlineSubsystem* oss = IOnlineSubsystem::Get();
            if (oss != nullptr)
            {
                IOnlineIdentity* iss = oss->GetIdentityInterface().Get();
                if (iss != nullptr)
                {
                    TSharedPtr<const FUniqueNetId> tmpPlayerId = iss->GetUniquePlayerId(0);
                    if (!tmpPlayerId.IsValid())
                        GEngine->AddOnScreenDebugMessage(-1, 10.0f, FColor::Yellow, FString(TEXT("GetUniquePlayerId() failed ")));
                }
            }
        }
    }

    In the login callback function, GetUniquePlayerId fails, tmpPlayerId is always null. Should this work? Should I be able to get the FUniqueNetId in both cases (during callback, and within my other function)?
    Last edited by Jerry.Richards; 06-16-2017, 12:48 PM.

    Leave a comment:


  • replied
    Getting the gamertag (IOnlineIdentity::GetPlayerNickname) was easy enough. Now I want to get the player's avatar.

    Leave a comment:

Working...
X