Coder Social home page Coder Social logo

flaxengine / onlineplatformsteam Goto Github PK

View Code? Open in Web Editor NEW
14.0 4.0 2.0 699 KB

Online platform implementation of Steam for games made with Flax Engine

License: MIT License

C++ 79.87% C# 0.47% Smalltalk 0.16% C 19.50%
flax flax-engine gamedev steam

onlineplatformsteam's Introduction

Steam for Flax Engine

This repository contains a plugin project for Flax Engine games with Steam 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\OnlinePlatformSteam

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

...
"References": [
    {
        "Name": "$(EnginePath)/Flax.flaxproj"
    },
    {
        "Name": "$(ProjectPath)/Plugins/OnlinePlatformSteam/OnlinePlatformSteam.flaxproj"
    }
]
  1. 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):
/// <inheritdoc />
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.

  1. Test it out!

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

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

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

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

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

  1. 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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.