Giter VIP home page Giter VIP logo

commononlinesessionsplugin's Introduction

Enhanced Online Sessions Plugin

An Unreal Engine Plugin used to manage an online subsystem
Developed in Unreal Engine 5.3. Works on any Unreal Engine 5 Version.

Tired of the Advanced Sessions Plugin?
This is the new one!
Much more modular and should work right out of the box.

EnhancedOnlineSessions Subsystem that helps communicating with the online service.
Supports STEAM, Epic Online Services (EOS) and EOS Plus.
Including platform specific settings which can be changed inside the Editor.

Well my goal was to make this plugin as modular as possible that it works with any other project.
The entire online service logic is stored into a custom UGameInstanceSubsystem.

💡 Suggestions or Feedback is much appreciated: My Discord Account. Feel free to DM me any time! 🙂

Download the latest preview here.

Documentation

  1. Setup
     1.1 Configure your Project using the Online Subsystem of your Choice
     1.2 Structure of the Enhanced Sessions
     1.3 Session Maps
  2. Sessions
    2.1 Host Online Sessions
         2.1.1 Host Session
         2.1.2 Host Peer 2 Peer Lobby
    2.2 Start Session
    2.3 Find Sessions
  3. Identity
     3.1 Login User
     3.2 Kick Player
     3.2 Ban Player
     3.2 Change Player Name
  4. Friends
     3.2 Coming Soon...

1.1 Configure your Project

In Project Settings > Plugins there is a section called Online Enhanced Subsystem.

image

Here you can select the Online Subsystem of your Choice and configure its parameters.
This will write the changes directly into the DefaultEngine.ini so you wont have to do that manually anymore :)

📝You will be prompted to restart the Editor after.

1.2 Structure of the Enhanced Sessions

💡The Enhanced Sessions Subsystem follows a consistent structure.
All the necessary functions are stored inside the EnhancedOnlineSubsystem

image

These function will always take in a request object, which defines the action that you want to perform.
Every request will have multiple callbacks, that you can bind functions to (Based on the request type).
However, every request will have an OnFailedDelegate which will be called if the request fails and the log why the request may have failed will be passed through.

1.3 Session Maps with the Asset manager

If you want to use a Level for an Online Session you would need to tell the Asset Manager about its existence.
To do that you would need to go inside your Project Settings -> Asset Manager

Screenshot 2024-05-10 022213

And then make sure to uncheck Is Editor Only and add the Directory where your Level is located.

Screenshot 2024-05-10 022219

2.1 Online Sessions

To Host an Online Session you need to call the HostOnlineSession function which you can find in the EnhancedOnlineSubsystem.

image

This takes in a HostSessionRequest.
There are two different types of sessions you can host:

2.1.1 Host Session

To host a Session you need to construct an OnlineHostSessionRequest.
Note that this will automatically travel to the map you selected in Map Id.

image

Parameter Description
Online Mode Defines the online mode of the session. You can choose from: Offline / Online / LAN. The Online Mode: "Online" adds ?listen to the travel url.
Max Player Count: The maximum number of players that can be in the Session.
Map Id: Primary Asset Structure of the map you want to travel to, when the Session gets created.
Travel URL Operators: Adds additional operators that will be apended to the Travel URL.
Friendly Name: The friendly name of the session that will be used to display the Session name in the UI.
Search Keyword: The searchkeyword can be used for different scenarios. If you use EOS you will notice that this is the official SEARCH_KEYWORD combined with the Session. However you can also use it with any other online subsystem to filter your Session Results, depending on what Sessions you want to find
Use Lobbies if Available: Sets if the session should use player hosted Lobbies.
Use Voice Chat if Available: Some online services provide Voice Chat. This Settings defines if we use the Voice Chat.
Game Mode Advertisement Name: The advertisement name of the game mode that your session currently has. Can be used to advertise your session like Team Deathmatch, etc.
Is Presence: Defines if the hosted session should use Presence (Account Services)
Allow Join in Progress: Sets if other players can join the session when the session already is in progress. This can be used to disable joining when your game has been started.

2.1.2 Host Peer 2 Peer Lobby

To host a Peer 2 Peer Lobby you need to construct an OnlineHostP2PLobbyRequest.
💡Note that this will NOT travel to a different map, as the P2P Lobby stays in the current level and you need to server travel manually.

image

Very similar to Host Online Session, this takes in a few parameters:

Parameter Description
Online Mode Defines the online mode of the session. You can choose from: Offline / Online / LAN.
Max Player Count: The maximum number of players that can be in the Session.
Friendly Name: The friendly name of the session that will be used to display the Session name in the UI.
Search Keyword: The searchkeyword can be used for different scenarios. If you use EOS you will notice that this is the official SEARCH_KEYWORD combined with the Session. However you can also use it with any other online subsystem to filter your Session Results, depending on what Sessions you want to find
Use Voice Chat if Available: Some online services provide Voice Chat. This Settings defines if we use the Voice Chat.
Game Mode Advertisement Name: The advertisement name of the game mode that your session currently has. Can be used to advertise your session like Team Deathmatch, etc.
Is Presence: Defines if the hosted session should use Presence (Account Services)
Allow Join in Progress: Sets if other players can join the session when the session already is in progress. This can be used to disable joining when your game has been started.
On Succeeded Delegate: This Delegate will be called whenever the lobby creation was a success.

Rest of the documenation is currently in progress...

commononlinesessionsplugin's People

Contributors

majortomaw avatar

Stargazers

Crash Angel Arts avatar WhiteFox Games avatar  avatar

Watchers

 avatar

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.