Skip to content

Online platform implementation of Xbox Live for games made with Flax Engine

License

Notifications You must be signed in to change notification settings

FlaxEngine/OnlinePlatformXboxLive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Xbox Live for Flax Engine

This repository contains a plugin project for Flax Engine games with Xbox Live online platform implementation that covers: user profile, friends list, online presence, achevements, cloud savegames and more.

Minimum supported Flax version: 1.3.

Installation

  1. Clone repo into <game-project>\Plugins\OnlinePlatformXboxLive

  2. Add reference to OnlinePlatformXboxLive project in your game by modyfying <game-project>.flaxproj as follows:

...
"References": [
    {
        "Name": "$(EnginePath)/Flax.flaxproj"
    },
    {
        "Name": "$(ProjectPath)/Plugins/OnlinePlatformXboxLive/OnlinePlatformXboxLive.flaxproj"
    }
]
  1. Add reference to Xbox Live plugin module in you game code module by modyfying Source/Game/Game.Build.cs as follows (or any other game modules using Online):
/// <inheritdoc />
public override void Setup(BuildOptions options)
{
    base.Setup(options);

    ...

    switch (options.Platform.Target)
    {
    case TargetPlatform.XboxOne:
    case TargetPlatform.XboxScarlett:
        options.PublicDependencies.Add("OnlinePlatformXboxLive");
        break;
    }
}

This will add reference to OnlinePlatformXboxLive module on Xbox platforms that are supported by GDK.

  1. Test it out!

Finally you can use Xbox Live as online platform in your game:

// C#
using FlaxEngine.Online;
using FlaxEngine.Online.XboxLive;

var platform = new OnlinePlatformXboxLive();
Online.Initialize(platform);
// C++
#include "Engine/Online/Online.h"
#include "OnlinePlatformXboxLive/OnlinePlatformXboxLive.h"

auto platform = New<OnlinePlatformXboxLive>();
Online::Initialize(platform);

Then use Online system to access online platform (user profile, friends, achievements, cloud saves, etc.).

  1. Setup settings

Xbox Live plugin automatically uses Xbox One or Xbox Scarlett platform settings (GDKPlatformSettings) so ensure to setup TitleId, StoreId and other properties used by Xbox Live.

License

This plugin ais released under MIT License.

About

Online platform implementation of Xbox Live for games made with Flax Engine

Topics

Resources

License

Stars

Watchers

Forks