Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/flaxengine/onlineplatformsteam

Online platform implementation of Steam for games made with Flax Engine
https://github.com/flaxengine/onlineplatformsteam

flax flax-engine gamedev steam

Last synced: 3 months ago
JSON representation

Online platform implementation of Steam for games made with Flax Engine

Awesome Lists containing this project

README

        

# Steam for Flax Engine

This repository contains a plugin project for [Flax Engine](https://flaxengine.com/) games with [Steam](https://partner.steamgames.com/) 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\OnlinePlatformSteam`

2. Add reference to *OnlinePlatformSteam* project in your game by modyfying `.flaxproj` as follows:

```
...
"References": [
{
"Name": "$(EnginePath)/Flax.flaxproj"
},
{
"Name": "$(ProjectPath)/Plugins/OnlinePlatformSteam/OnlinePlatformSteam.flaxproj"
}
]
```

3. Add reference to Steam 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.Windows:
case TargetPlatform.Linux:
case TargetPlatform.Mac:
options.PublicDependencies.Add("OnlinePlatformSteam");
break;
}
}
```

This will add reference to `OnlinePlatformSteam` module on Windows/Linux/Mac platforms that are supported by Steam.

4. Test it out!

Finally you can use Steam as online platform in your game:

```cs
// C#
using FlaxEngine.Online;
using FlaxEngine.Online.Steam;

var platform = new OnlinePlatformSteam();
Online.Initialize(platform);
```

```cpp
// C++
#include "Engine/Online/Online.h"
#include "OnlinePlatformSteam/OnlinePlatformSteam.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

Steam plugin automatically creates `steam_appid.txt` file with Steam AppId (for both Editor and cooked Game). You can add own settings in *Content* window by using *right-click*, then **New -> Settings**, specify name, select **SteamSettings** type and confirm.

## License

This plugin ais released under **MIT License**.