Giter Site home page Giter Site logo

delta-proxima-team / ue-module-relatedworld Goto Github PK

View Code? Open in Web Editor NEW
53.0 10.0 7.0 206 KB

Module for support separated server maps with replication to the persistent client map

Home Page: https://discord.gg/hgpnzVBBDy

License: BSD 3-Clause "New" or "Revised" License

C++ 95.85% C# 0.92% C 3.23%
ue4 ue4-modules unreal-engine-4 unreal-engine-4-module unreal-engine-multiplayer ue5 unreal-engine-5 ue5-module unreal-engine-5-module

ue-module-relatedworld's Introduction

Unreal Engine 4 - Related World module

About

This module will allow you to load several maps on server side of you game and replicate its to a one persistent level on a client side, or use it as a offscreen worlds in a standalone game (you need spawn actor with scene capture component for get render from this world)

Installation

  • Clone latest sources into Source/RelatedWorld directory of you project
  • Edit {ProjectName}{TargetType}.Target.cs file in Source directory and add next code into {ProjectName}{TargetType}Target function
ExtraModuleNames.AddRange(new string[] { "RelatedWorld" });
  • Into {ProjectName}.uproject add next code into Modules section
{
  "Name": "RelatedWorld",
  "Type": "Runtime",
  "LoadingPhase": "Default"
}
  • Into Config/DefaultEngine.ini add next code into [/Script/Engine.Engine] section
!NetDriverDefinitions=
NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="/Script/RelatedWorld.RwIpNetDriver",DriverClassNameFallback="/Script/RelatedWorld.RwIpNetDriver")
+NetDriverDefinitions=(DefName="DemoNetDriver",DriverClassName="/Script/Engine.DemoNetDriver",DriverClassNameFallback="/Script/Engine.DemoNetDriver")

[/Script/RelatedWorld.RwIpNetDriver]
ReplicationDriverClassName="/Script/RelatedWorld.RwReplicationGraphBase"
  • Make sure plugin OnlineSubsystemUtils is on
  • Make sure plugin ReplicationGraph is on
  • Make sure option EnableMultiplayerWorldOriginRebasing is on
  • Recompile you project

Notes

  • I strongly not recommend use built in replication graph, due it was added only for experimental purpose.

Simple Usage

https://cdn.discordapp.com/attachments/644401603088089119/727580647643807855/2020-06-30_20-44-15.png

Demo Project

https://github.com/Delta-Proxima-Team/UE4-Sample-RelatedWorld

Demo Video

Youtube

ue-module-relatedworld's People

Contributors

tehnomag avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ue-module-relatedworld's Issues

WorldOrigin throw Network

For now, if RelatedWorld has origin shift, client received location as global coordinates without shifting. Need implement rebasing before replication to clients, or send origin as addition parameter and make rebase directly on a client side

RepGraph crash on client relogin

[2021.07.04-21.25.17:186][726]LogOutputDevice: Error: Ensure condition failed: IsActorValidForReplication(Actor) [File:W:\UnrealEngine4\Bin\UE_4.26\Engine\Plugins\Runtime\ReplicationGraph\Source\Public\ReplicationGraphTypes.h] [Line: 673]
This obj /Game/ColdFusion/Game.Game:PersistentLevel.ReplicationGraphDebugActor_0 is pending to kill, storing this data will generate stale data in the map.
[Inline Frame] UE4Editor-RelatedWorld.dll!FGlobalActorReplicationInfoMap::Get::__l2::<lambda_5f75b7d6f2636a965926b0ec22bd4d33>::operator()() Line 673	C++
 	UE4Editor-RelatedWorld.dll!FGlobalActorReplicationInfoMap::Get(AActor * const & Actor) Line 673	C++
>	UE4Editor-RelatedWorld.dll!UReplicationGraphNode_GlobalGridSpatialization2D::PrepareForReplication() Line 224	C++

Steps to reproduce:

  1. Start dedicated server
  2. Connect client
  3. Disconnect client
  4. Connect client

reproducibility: 100%
Affected versions: 4.26, 4.27

UE-4.26 support

Todo:
Review World Tick
Character Movements
View -> ViewArray

Character movement compability

For now characters movements not working properly in multiplayer if Character in a RelatedWord context with applied world translation.

GameplayStatics

GameplayStatics nodes such as GetPlayerPawn do not working while we are in RelatedWorld Context. So we need to implement some wrapper functions to proxing them into real one with right context object

Automatic loading and unloading

Add automatic loading and unloading of related worlds in case there are no players in the world and the world is not marked as permanent

RelatedWorld BeginPlay without GameMode

Actors registration not fully work without GameMode.
Potential future problem with the AI subsystem

Need to implement workaround or forcing to use GameMode from PersistentWorld with some modification (separate AGameModeBase class?)

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.