https://github.com/flaxengine/onlineplatformxboxlive
Online platform implementation of Xbox Live for games made with Flax Engine
https://github.com/flaxengine/onlineplatformxboxlive
flax flax-engine gamedev xbox xbox-live
Last synced: 6 months ago
JSON representation
Online platform implementation of Xbox Live for games made with Flax Engine
- Host: GitHub
- URL: https://github.com/flaxengine/onlineplatformxboxlive
- Owner: FlaxEngine
- License: mit
- Created: 2022-01-29T17:23:39.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-10-17T17:30:12.000Z (over 1 year ago)
- Last Synced: 2024-11-15T00:37:54.520Z (over 1 year ago)
- Topics: flax, flax-engine, gamedev, xbox, xbox-live
- Language: C++
- Homepage:
- Size: 11.7 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Xbox Live for Flax Engine
This repository contains a plugin project for [Flax Engine](https://flaxengine.com/) games with [Xbox Live](https://docs.microsoft.com/en-us/gaming/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 `\Plugins\OnlinePlatformXboxLive`
2. Add reference to *OnlinePlatformXboxLive* project in your game by modyfying `.flaxproj` as follows:
```
...
"References": [
{
"Name": "$(EnginePath)/Flax.flaxproj"
},
{
"Name": "$(ProjectPath)/Plugins/OnlinePlatformXboxLive/OnlinePlatformXboxLive.flaxproj"
}
]
```
3. 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):
```cs
///
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.
4. Test it out!
Finally you can use Xbox Live as online platform in your game:
```cs
// C#
using FlaxEngine.Online;
using FlaxEngine.Online.XboxLive;
var platform = new OnlinePlatformXboxLive();
Online.Initialize(platform);
```
```cpp
// C++
#include "Engine/Online/Online.h"
#include "OnlinePlatformXboxLive/OnlinePlatformXboxLive.h"
auto platform = New();
Online::Initialize(platform);
```
Then use [Online](https://docs.flaxengine.com/manual/networking/online/index.html) system to access online platform (user profile, friends, achievements, cloud saves, etc.).
5. 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**.