#multiplayer

1 messages · Page 53 of 1

gloomy tiger
#

(emphasis to "just" lmao)

winged crow
#

I tried destroying all my pawns before travelling because I read on a forum that somebody had the same issue and it went away after destroying any pawns with dynamic materials

#

Lol

#

yeah i'm a cowboy dev

gloomy tiger
#

anyways

#

you tried unlinking server travel?

winged crow
#

yeah standalone games don't even open

gloomy tiger
#

if you standalone with 1 instance only, does it work just fine?

winged crow
#

almost

#

but no

#

I saw the map for a moment

gloomy tiger
#

OK, that's a clue.

winged crow
#

then it crashed

gloomy tiger
#

The problem is not related to multiple clients, actually 🙂

winged crow
#

playing as client

gloomy tiger
#

Try to play as listen server, 1 instance only

#

(Standalone, never PIE)

winged crow
#

standalone standalone works

#

lol

#

trying listen server now

peak sentinel
winged crow
#

ok listen server crashes

gloomy tiger
#

🙂

#

Good!

#

Progress, lol.

winged crow
#

I use quite a lot

peak sentinel
#

no

winged crow
#

I don't know if this is at all relevant but my editor crashes when I close it as well

peak sentinel
#

child actor components are broken by nature

gloomy tiger
#

:/

winged crow
#

haha cool

#

glad to learn this now

#

they have been a bit weird

gloomy tiger
#

But don't panic yet, it might not be your culprit.

peak sentinel
#

at this point you'll wasting time

winged crow
#

what do you suggest I do?

gloomy tiger
#

This

peak sentinel
#
  • download debugging symbols
  • install VS
  • run with DebugGame Editor config
  • run debugger
#

then reproduce crash

gloomy tiger
#

Oh boy

peak sentinel
#

then post here where its crashing

#

or just download debugging symbols and post the same log again

#

but depending on the error you might need VS again

winged crow
#

This sounds hardcore

#

I should mention i'm hardly a programmer

#

I've got another idea I'm going to quickly try

gloomy tiger
#

I feel you

#

Been there before

peak sentinel
winged crow
#

haha

gloomy tiger
#

Well -

winged crow
#

#cowboydev'

gloomy tiger
#

Regardless of anything

#

Now you have an environment to at least reproduce what you got in your Steam version

peak sentinel
#

maybe you dont need VS

winged crow
#

ok

#

don't kill me

#

what are debugging symbols

peak sentinel
#

they are the information that required to display function names in here

winged crow
#

Ok where do I download them

peak sentinel
#

Epic games launcher -> Unreal Engine

winged crow
#

what as in the actual launcher?

#

in here somewhere?

peak sentinel
#

yeah you gotta click this

#

i guess it was "modify" or something - cant recall its name

winged crow
#

I see

peak sentinel
#

click to that and tick "debugging symbols"

winged crow
#

It's big

#

Lol

gloomy tiger
#

Yes

peak sentinel
#

yeah it contains debugging information for a few millions of lines of code 😄

winged crow
#

incredible

gloomy tiger
#

You know if those symbols damage the editor's startup time?

peak sentinel
#

probably they do

gloomy tiger
#

😢

#

Well I guess they're not enabled by default for a reason

peak sentinel
#

it might depend on the build config

#

or not

#

it'll load pdb files anyway

#

I'm so used to waiting for editor load that I dont even feel the time passing PepeHands

gloomy tiger
#

And I avoid debugging symbols as much as I can mostly because back in 4.17 I think, they screwed me up when it comes to some load time

#

So I'm a brute-force debugger

#

Unless as last resorts (which may be Jackson's situation)

peak sentinel
winged crow
#

Does this mean anything to anybody?

#

Assertion failed: ((UObject*)ContainerPtr)->IsValidLowLevel() [File:D:\Build++UE4\Sync\Engine\Source\Runtime\CoreUObject\Public\UObject/UnrealType.h] [Line: 386]

peak sentinel
#

yesn't

peak sentinel
# peak sentinel yesn't

probably a variable in BP causing error - thats what I can think other than 3 million different possibilities thingken

peak sentinel
#

since BP is 10x slower than some certain languages 😅

gloomy tiger
#

But I respect Blueprints. Lots can be achieved with it. And I guess that's what made Unreal Engine mainstream at its debut

#

I just started w UE b/c of it back in 2014

winged crow
#

They're a gift from god

peak sentinel
winged crow
#

Scripting gameplay visually with blueprints is something I am thankful for beyond belief

#

Makes it so easy for me to wrap my brain around

gloomy tiger
peak sentinel
#

yes

#

same VM

#

Running 150 nodes in tick (including expanded nodes and pure nodes etc) consume 1ms on PS4

#

150 is not enough to script anything PandaOhNo

#

the context of the nodes not even included to that overhead, its just calling empty nodes

gloomy tiger
winged crow
#

Yeah you're probably right

#

Probably just a psychological barrier

gloomy tiger
peak sentinel
#

Just empty tick node

#

What are lightweight nodes? Thonk

gloomy tiger
#

Holy sh*t

#

1ms 150 empty nodes

#

Cruel

peak sentinel
winged crow
#

You're not going to believe this

#

But the fatal error disappeared when I disabled seamless travel

#

Loooool

#

Just reuploaded to steam and tested on a second laptop

gloomy tiger
#

So you're the author of it lol i read it fully today

peak sentinel
#

lol

peak sentinel
gloomy tiger
#

You were Server Travel without level streaming? 🤔

#

I'm really confused now

#

I'm afraid Jackson was Server Travel with Seamless Travel to an outer level of the streaming tree

#

B/C Lobby -> Gameplay doesn't really sound something you'd want to persist state across (not sure about his use-case though)

#

Anyways @peak sentinel - thank you so much for that post!

#

Geez. So many myths I was exposed to all these years caught by you.

#

And I was casually speaking to the author of that post as if nothing happened lulz

winged crow
winged crow
gloomy tiger
winged crow
#

150% better in fact

peak sentinel
winged crow
gloomy tiger
#

I guess that's why you were getting fatal lol

winged crow
#

Why?

gloomy tiger
#

Seamless Travel is for level streaming

winged crow
#

I had a transition map setup in project settings

#

I thought it was supposed to use the transitiion map you set for it

gloomy tiger
#

Nothing related to your transition map

#

In fact, the black screen you saw in your client

#

Is because they got stuck in the transition map

#

Which had nothing

#

Level Streaming requires you to have a PersistentLevel

#

And your other levels nested in it

winged crow
#

I understand how level streaming works

gloomy tiger
#

Right - but that's my point

winged crow
#

But I thought that seamless travel was meant to move the game to a new persistent level using the transitiion level as an intermediate so clients don't disconnect

#

Maybe I'm completely wrong

#

Lol

#

I don't know

#

But it's working now so that's good

#

Thanks for your help

#

And Eren

gloomy tiger
# winged crow Maybe I'm completely wrong

No, you are not. I am. I got confused. Seamless Travel is for persistence, and has absolutely nothing related to Level Streaming. I don't know exactly from where I related level streaming to seamless travel (perhaps because the two share the level keyword).

winged crow
#

Haha that's all good

#

Anyway I'mma get back to dev

gloomy tiger
#

Kill it!

winged crow
#

Now this is solved I can finally get back to game design and fun stuff

#

😆

#

Go to bed!

gloomy tiger
#

I love that sensation haha

winged crow
#

😆

gloomy tiger
#

Enjoy!

midnight steeple
#

Any idea why my players play separately after a seamless travel?

gloomy tiger
#

Is this happening on Standalone Game?

midnight steeple
#

yes and with seamless travel 🥶

gloomy tiger
#

OK so just to break it down - you got them together in a map X, then you called ServerTravel and after that, they all went separate ways

#

Is that right?

midnight steeple
#

Exactly

gloomy tiger
#

Question - they got into the correct map, but in different realms, or they got back to the former map from where they originally travelled from?

midnight steeple
#

They are in the same correct map yes

#

but in different realms

gloomy tiger
#

I'd say check your project's log at Saved/Logs.

#

If the clients don't see each other in the destination map, it's very likely they got disconnected from the server and the reason might be described in your log file.

midnight steeple
#

Ok

#

I just saw that I'm not on the right map

hushed rain
#

I'm struggling removing a client's HUD widget on Event PointDamage. Since it runs on the server, how would I remove only the actor-owning client's HUD from a server event when other people could be using their own version of the actor at the same time?

gloomy tiger
hushed rain
#

So when i did a multicast it removed it from all clients

gloomy tiger
#

In your multicast event, you gotta filter it.

hushed rain
#

thats what i tried to do but wasnt sure which node was good for it

gloomy tiger
#

You using BP or C++?

hushed rain
#

bp

#

i wasnt sure what to check against

#

tried controller + controller of actor bool

gloomy tiger
#

Ok, this has multiple takes. May I see your multicast function?

hushed rain
#

would something like this work maybe?

#

nope still removes it from all clients

#

and the host too

gloomy tiger
#

Yep, you got no filters. From whom you want to RemoveHUD from?

hushed rain
#

the owning player of the actor

#

so i assume it sends the message to all and tries to filter by owner of the dying actor

gloomy tiger
#

Try this

hushed rain
#

looks like that worked

#

yep, thank you 🙂

gloomy tiger
#

You got it!

arctic minnow
#

I have a problem where when I use a big map my play montage dosent work replicated could the problem be style scape?

verbal tendon
# gloomy tiger

I have run this on my implanted neurochip, and it returned false. Halp?!?

woven basin
verbal tendon
hybrid crown
#

Hey @whole grove back in the time, you advised me too look into a tech for assuring client getting data from a SQL (webservice or something like that) for a game.
(the idea is to gather data like player level, data... do some interaction with SQL...)

#

I don't remember the name of the tech

#

and can't found back this message, do you have it in memory ?

#

Yeah, i understand that part.

But you suggested something it was maybe not a tech, but a way to do it, and it has a name. And unfortunaly i can't found it back.
To be more precise, i'm looking mostly for the way to achieve it, and read about it.

woven basin
#

RESTful API maybe?

hybrid crown
#

Yeah, that was that, perfect !

#

Thanks a lot

twin juniper
#

Hey, i need some help with pawn rotation replication. I have no idea where to begin or how to structure it. No luck trying to find any sources either, I'd appreciate it a lot if someone could point me in the right direction with a basic overview :-).

high ibex
#

hi, i have created a variable in game mode for timer .. after a specific task is done, i want to change timer value to x amount of seconds.. How can i do this from character or controller ? from casting or any other ways in c++ ? thanks for answers

gloomy tiger
agile loom
rotund cosmos
#

hi, if I use seamless travel, and I want a loading screen to be displayed during the travel (level load), do I just use the transition map's level bp to create the widget for all players in that level, or should I create and add the widget on the src map, and remove it once the travel finished?

thick vector
#

Can not travel to accepted Steam session with this error : Initial Connect Diagnostics: Sent '10' packets in last '10.016082' seconds, no packets received yet. where should I check?

chrome bay
#

Interesting network bug of the day:

Network system cannot distinguish between a TWeakObjectPtr that is "Stale" vs one set to "Nullptr". When it is compared, it will incorrectly think a "Stale" pointer has been explicitly changed and send out a network update to all clients.

What's mad about this is that anything that causes the property to be compared at anytime can cause the replication update to be sent, even an unrelated player walking into relevancy range. What fun!

silent valley
#

So we're actually better off using UPROP raw pointers? 🙂

#

oh, scratch that, that will keep it alive

chrome bay
#

Not necessarily. If you mark the object as garbage it'll still be destroyed even with a UPROP raw pointer

#

the UPROP pointer will be nulled by the system

#

(which would also give you a property update, but at least at an expected time - not randomly)

agile loom
verbal tendon
#

And yes ...that is madness

chrome bay
#

The thing containing the ref doesn't "own" it, so it's expected to die at anytime

#

Could use UPROP - though IIRC that would be incompatible with the new GC mode in UE5 and beyond

noble sentinel
#

Why client havent the texture of actor? What should I do to fix it?

blazing spruce
#

Hey, can anyone tell me what im doing wrong here? Ive only just started using C++ again so its prolly just me being dumb

#

Im pretty much copying it word for word from a video but works for him, not for me 😅

verbal tendon
#

Looks like you're missing the include for that class or the class is generally not defined

blazing spruce
#

-.-

blazing spruce
verbal tendon
#

Also if you're using SpawnActor<T> you don't need to feed it the static class again

#

The function signature is SpawnActor<T>( SpawnParams )

#

SpawnParams being of type FActorSpawnParameters

robust oriole
#

my brain is currently breaking.... my client connects to the game, possesses the default pawn, both client and server know that thats the controlled pawn. The pawn receives client side input but doesnt move. it just floats in the air too... does anyone know what could cause that? It used to work fine but suddenly stopped working :c

verbal tendon
#

There is sometimes a need if you're handling polymorphism which is not the case here

noble sentinel
#

looks like nothing give any error

verbal tendon
#

Not completely accurate

#

Otherwise SpawnActor<T>( SpawnParams ) would have no way of knowing what type it should spawn

#

For that particular function signature the template argument is the spawn type

#

If I saw someone trying to open a coconut with a screwdriver, I wouldn't comment on how to best angle the screwdriver. I'd direct them to the better approach

#

So, yes

#

I don't feel like arguing semantics. Simplicity is good. So simplifying is good

#

🤷‍♂️

#

And yet they can be, different approaches

twilit radish
#

@limber gyroHey, maybe a little late but I did some research and figured you would perhaps still like to know. AGameModeBase::Login gets called in the same function (and synchronously before) as AGameModeBase::PostLogin so you can safely use the user ID / URL options. Do however know that the playercontroller it self indeed isn't entirely properly setup yet at Login. If you have engine access see: https://github.com/EpicGames/UnrealEngine/blob/cdaec5b33ea5d332e51eee4e4866495c90442122/Engine/Source/Runtime/Engine/Private/LevelActor.cpp#L1033-L1051

limber gyro
twilit radish
#

The fun part is that they construct the URL inside the same function, so it's indeed weird they don't just also pass it on.. But whatever I guess lol.

twilit radish
#

@fathom aspen ^ if you ever update your compendium with the suggestion I made perhaps you would like to know too 🙂

fathom aspen
twilit radish
#

I know, but the example I found it in used NULL. So I replaced it with nullptr but with NULL there just to be sure lol.

#

Probably works just fine with nullptr xD

robust oriole
#

Where's the best point to spawn an actor that replicates to all clients?

pallid mesa
#

depends™️

#

whats this Actor

#

does it really need to spawn in runtime?

robust oriole
#

ermmm it is a AInfo actor that holds (and manages) the players "save game" data. The way im trying to do it is that im loading the save game slot data, passing it to the server, the server then has to make that save game data accessible to every client in the session.

robust oriole
twilit radish
#

I wouldn't say it's "wrong", you could also use Game State to be that actor I suppose. In terms of performance or whatever it really won't matter to have one actor less or more. As an alternative to overriding IsNetRelevantFor you can just simply mark the actor as "always relevant" too. Is a bit simpler than overriding things IMO, but isn't wrong or anything 😛

quasi tide
#

My first approach would be the following:

  1. Create a savegame gameinstance subsystem - this will handle all saving/loading
  2. On client login, load this object and then pass it to the server
  3. Server then takes this, stores it, and then replicates it to all clients, probably using the gamestate as a way to do so.

This would be my prototype implementation. Of course it is quite ripe for cheating, lol.

robust oriole
#

so probably never AAAAAAAAAAA

twilit radish
#

🥲

pallid mesa
#

Neat

quasi tide
#

Hmm - I wonder if we'll be able to arbitrarily RPC directly to a specific client with Iris 🤔

twilit radish
#

I like.

#

Even more interesting..

#

NetObjectPrioritizers are responsible for determining how important it is to replicate an object. Priorities should be at least 0.0f,

  • meaning no need to replicate. At 1.0f objects are being considered for replication. Priorities are acumulated per object and connection
  • until it's replicated, at which point the priority is reset to zero. Bandwidth constraints and other factors may cause a highly prioritized
  • object to still not be replicated to a particular connection a certain frame. There is no mechanism to force an object to be replicated a
  • certain frame, but the priority is a major factor in the decision.
#

**Priorities are acumulated per object and connection **

quasi tide
#

That sounds like how the current system does it though

chrome bay
#

Same as how it works currently really

twilit radish
#

Does it do it per connection?

chrome bay
#

yeah

twilit radish
#

Ah nevermind then lol.

#

I thought priority was per object :(

chrome bay
#

Oh it is

#

But again that's same as current system

#

Be interesting to see how it pans out. Seems to require a lot more actual code to get things done

twilit radish
#

That’s what my concern was too, there also seems to be some kind of “filter” system for relevancy per actor per connection now.

#

Instead of “IsNetRelevantFor” I suppose(?)

quasi tide
#

Wonder when they plan on even actually talking about Iris and the purpose behind it.

chrome bay
#

because fortnite

#

fin.

quasi tide
#

All we have is that it is meant to be able to handle more actors

chrome bay
#

Epic, probably

pallid mesa
#

I personally feel that this will help reducing the CPU footprint per UE server instance

#

therefore reducing costs

#

which can translate onto... higher scalability I guess.

quasi tide
pallid mesa
#

Also, Mass will implement networking with it at a low level layer

quasi tide
#

I love the "removing antipatterns that constrain it"....which antipatterns? 😅

#

That reads, to me, like when a game does an update with the comment, "Fixed some bugs"

rose egret
#

imagine such a shit would it be, normal repl, replication graph, and iris, they have to remove all old codes instead of keeping backward compatibility for some BP projects

graceful flame
#

Hopefully Iris simplifies multiplayer down into a single checkbox sort of like Replicates then you just code your game as if it’s single player and everything just works.

hushed rain
#

That would be crazy lol

twilit radish
#

That's never going to happen with the way multiplayer works. They can't possibly cover all scenarios that people make these days. They could totally simplify stuff, but it will never be "just press a button"

graceful flame
#

But I doubt it will be that simple lol

rose egret
#

one weird thing, im using WorldPartiton, when a cell is unloaded in client it unloads even those statically placed actors with bNetLoadOnClient=false
in other words I have some horses in the map, charcter posses and ride them then when the cell is unloaded my horse is destroyed as well

#

it shouldn't be like that

#

🤔

pallid mesa
#

Mark your horses as not spatially loaded

rose egret
#

@pallid mesa yea I exactly unchecked that finally, but I think when NetLoadOnClient is false it should mean not spatialy loaded as well

pallid mesa
#

why

#

In my opinion I think that these two things are different things

rose egret
#

AFAIK NetLoadOnClient false should treat the actor like dynamillay spawned actor. in other word client should not load it

#

if they did not load it why they are destroying it

#

so they loaded it

#

WP loaded it

#

🤔

twin juniper
pallid mesa
#

however not bNetStartup false Actors are

rose egret
#

@twin juniper there is actor rotation, and some bool property like bUseControllerRotation and also CMC MoveTowardvelocity and ...

late marlin
#

hey how can i open a next level in blueprint as a listen server?

pallid mesa
late marlin
pallid mesa
#

most likely OpenLevel

late marlin
rancid osprey
#

hey all - is anyone using the oculus subsystem, unreal 5.1.0 and networking/multiplayer... we see that Oculus is stating to use Photon as your matchmaking/multiplayer layer because Oculus Matchmaking is depreciated at the end of the this month. We are developing specifically for the Meta Quest 2. Curious on anyone's takes on Proton vs Playfab etc

rose egret
#

is there any easy way to switch to spectator mode in non PIE ? just like F8 in ed

fathom aspen
#

EnableCheats and then ToggleDebugCamera in console comand

peak sentinel
clear island
#

when an actor is outside the range of Net Cull Distance, will it it stop receiving all RPCS? or just multicasts?

peak sentinel
#

afaik it will get destroyed and recreated

clear island
#

so it gets recreated when he gets back into range

#

but RepNotifies wont be called right?

green fjord
#

hey im currently using online subsystem for multiplayer.
how to create session that can only join by code (like Among Us)?
here is my code to create a session with parameter code that will generated random from blueprint

sinful tree
peak sentinel
#

only iris appears

#

other than some esoteric C-looking libs

nova wasp
#

nothing robin related in Iris itself

peak sentinel
#

no way my memory playing games again

nova wasp
#

I will check the other kinds too

#

it could be my rider bungling it for all I know

#

I do have WITH_IRIS I think?

peak sentinel
#

I remember ReplicationGraph.cpp too but there was also an Iris module that updates some sort of objects

#

iirc

#

booting rider lets see if I was misremembering

nova wasp
#

ooh I found it

#

my stupid ass was in the dummy module thing

twin juniper
#

On game start, every controller announces that it is possessing a corresponding player. When the server player activates change arrow color, it replicates to the two clients, and all 3 players see that the arrow has changed.

When a CLIENT activates change arrow color, I get an error that "possessed character" is none.

How can I set up player controllers on the clients to know what they're possessing?

plucky prawn
twin juniper
#

I've got "get player character" which requires an index. I'll have the game assign player controllers their index then plug that in and see if that fixes it, thanks

plucky prawn
#

Your on possessed even gets the pawn that they player controller is now possessing

#

Not sure if it's called on clients though

twin juniper
# plucky prawn Don't do that

I don't think I understand fully

When my player controllers possess a pawn they immediately set it as their PossessedCharacter value

it seems like this is not happening on the client

But in the print string I announce when a possession happens, and it's happening to all the relevant actors/ controllers

Clients see this, does that mean that the player controllers all exist on the server, and that the clients are using some sort of proxy?

plucky prawn
twin juniper
#

That got rid of the error, thanks @plucky prawn !

I've got the event working from server to clients and clients to server now

elder sable
#

Hi ! What would you use to pass an actor class from a client to the server ?

#

Mhh i thought it wasn't working, will try again ty !

#

Will check thank you !

clear island
#

actor goes outside the Net Cull Distance

#

then, comes back to inside the range of Net Cull Distance

#

no rep_notifies are called

torpid girder
#

hello, i've created a weapon, set some properties and then equipped it, however the OnRep function shows RightHandWeapon to be null

    UPROPERTY(Transient, ReplicatedUsing = OnRep_RightHandWeapon)
    AAvalonWeaponBase* RightHandWeapon;
#

i am simply setting RightHandWeapon = NewWeapon;

#

oh!

#

bReplicates = true;

#

let me check the blueprint

#

pretty sure i did

#

DOREPLIFETIME_CONDITION_NOTIFY(AAvalonCharacterHero, RightHandWeapon, COND_None, REPNOTIFY_Always);

#
    UFUNCTION(Server, Reliable, Category = "Avalon|Character")
    void DrawSword_Server();
#

so the client on MMB calls

#

that is perfect

clear island
#

my use case is as follows:
I have Client A and Client B
1 - Client A enters car (Possesses the car and attaches to its driver socket)
2 - drives very far away until he's outside the net cull distance
3 - exits the car while being out of range of net cull distance (at this point usually a multicast is sent that unattaches the player from the vehicle socket, this also sets a variable to null that is replicated and has repNotify)
4 - In client B's game, he does not receive the multicast nor the repNotify because he's outside of net cull distance range
5 - So in client B's game, client A is still attached to the vehicle socket, while on the server and on client A's screen he's normally walking around outside the car
6 - When Client A comes back into net cull distance of Client B, no rep_notifies are called

#

how do I solve/debug this issue?

torpid girder
#

no errors in the logs

#

got it!

#

UE_LOG(LogTemp, Warning, TEXT("has auth %s"), (HasAuthority() ? TEXT("true") : TEXT("false")));

#

i could be missing something

#

but i don't know what

#

i've set the bReplicates = true;

#

maybe the problem is else where

bReplicates = true;
    bNetUseOwnerRelevancy = true;
    NetUpdateFrequency = 100.0f;    // Set this to a value that's appropriate for your game
    bSpawnWithCollision = true;
#

ok done

#

oh i think i see where the problem might be

torpid girder
#

still null, but the logs looks correct

#
LogTemp: Warning: DrawSword has authority false
LogTemp: Warning: DrawSword_Server has authority true
LogTemp: Warning: Euphronios has drawn their sword
LogTemp: Warning: Equip has authority true
LogTemp: Warning: OnRep_RightHandWeapon has authority false
#

it only null in OnRep_RightHandWeapon

#

i've even managed to call equip successfully on the server

#

the server has all the blueprint mesh references

#

maybe i don't understand why logging the name is significant

#

i have a break point

#

yes

#

yeah its is darn weird

#

i agree with you

#

i can now see in the logs that this is the client (for sure) i can see its also null

#

also null

#

i put that in to make sure

#

what do you mean?

#

you mean am i calling onrep ?

#

noooo

#

i do have other components replicating

#

yes the hair is pushing through the helm :p

#

but the server is assigning the armour

#

its then replicated down to the client

#

so i changed the code slighting and no replication is happening now

#

i wondered if it should be

UPROPERTY(Transient, ReplicatedUsing = OnRep_RightHandWeapon)
    class AAvalonWeaponBase* RightHandWeapon;
#

didn't think so

#

ah i have an idea

#

ok that broke the replication totally

#

hmm

#

is the Name always unique?

#

so i can spawn many of them, but its not the assignment to the character isn't replicating

#

those would be

#

i am trying to find out if the weapon actor has replicated to the client

#

lets see if i can see a begin play

#

no the client never had a beginplay

#

ah i know what i've done 🙂 doh

#

however, that doesn't 100% why i can't see the character replicate

plush wave
#

Is there a UMacro setting for not spawning actors on certain net modes?

grand hatch
#

im trying to make a multiplayer game and i have searched around a bit but i have no idea where to start, anyone know some good starting points?

marble gazelle
grand hatch
marble gazelle
#

well, then like you start with any other game, start a prototype for your concepts and while implementing that, get used to the unreal network API, there are some useful links pinned in this channel.

grand hatch
frigid niche
#

Say I'm making a multiplayer rpg with a bunch of inventories and items, where people log on and off. I was wondering if it's normal to store the item / inventory data somewhere besides on the characters or other actors.

Currently I'm making a database in the game instance, where when requested will make a call to look up or create a reference in the game instance database.

dark edge
#

You'll want a savegame somewhere unless you do something else with a persistent database or whatever

torpid girder
#

thanks for your help! we have a sword!

frigid niche
#

Ok. Thx @dark edge

rose egret
#

when we send HTTP request by HTTP module the response callback is called on game thread yes ?

prisma snow
zealous wind
#

Got an odd one today. Wonder if anyone might be able to shed some light.

I have a UObject that is created as a default subobject within an ActorComponent in it's constructor.
The UObject in question is added to replication via 'AddReplicatedSubobject'
The UObject contains a float value that is replicated.

The bug, is that when the value is replicated, it replicates across all instances, much like a static variable. So, two different instances of the ActorComponent, will share the same value, when they should instead be seperate.

Does anyone have any idea what might cause this? Is this expected behavior? (seems unlikely)

twilit radish
twilit radish
zealous wind
#

@twilit radish Completely understandable. Apologies, can't share code here as it's work related. Glad though that it's not something obvious that's standing out!

torpid girder
#

hello, i might be doing something really stupid here,

    UPROPERTY(Transient, ReplicatedUsing = OnRep_RightHandWeapon)
    class AAvalonWeaponBase* RightHandWeapon;

    // assigned the pointer when equipped
    UPROPERTY(Transient, ReplicatedUsing = OnRep_RightHandWeapon)
    class AAvalonWeaponBase* CurrentRightHandWeapon;

when the player equips a weapon, i will simply CurrentRightHandWeapon = RightHandWeapon; and call the equip method, when equipping, I would Current.. = NULL and when that replicated call RightHand->unequip()

#

i think i was being stupid spawning a weapon actor when equipping

noble sentinel
#

Im using this when somebody host a server, but when level change happens clients are disconnected, what should I do?

#

should I add this for every level?

#

Normally when somebody host server its open a loading level, these happens and level 1 opened

solar stirrup
#

Do default subobject replicated properties get replicated on initial bunch if they haven't been changed?

#

Or does the engine assume they're not dirty if they're defaults

#

And if so, does that apply to stably named objects in general?

rose egret
#

I have a Replicated NetStartup and NetLoadOnClient actor, and when I come to its Net relevancy its invisible for nearly 2 seconds but collision is there then it becomes visible

#

🤔

#

is it normal ?

real ridge
#

It is good to use HUD class for all widgets of player in multiplayer game? also for replicated ones?

solar stirrup
#

but you have to enable ^ this

clear island
#

how do I handle an actor that is getting back into net cull distance? I was expecting RepNotifies to be called when he comes back into range but that is not happening, even tho the variable changed value

rose egret
#

if it differs with default value OnRep_ should be called

clear island
#

yea exactly, but its not

#

the value differs, its changed on the server

#

and the OnRep_ is called for players within the net cull distance, but for players who are not within that distance, when they come back, it still wont call onrep for them

prisma snow
real ridge
#

or game over widget should be replicated for all whats then?

clear island
#

just replicate the values you want to set on those widgets

#

and not the widgets themselves

real ridge
#

and how handle game over widget? when i will win as team i will check on event tick if game is ended and then will initialize game over widget?

#

or how

clear island
#

same thing, just replicate something that indicates that the game is over, and when clients get that information you create the widgets you need

real ridge
#

because it can change anytime

#

isnt using event tick bad? for cpu usage?

clear island
#

they will automatically get called on clients when the value changes on the server

real ridge
#

okay Lets say I have big plane its AI i will kill it it will set repnotify boolean to true / as dead/ but I need check this value on my player character so i need cast there and check it every second

#

anyways

clear island
#

if, for whatever reason you already doing checks on tick on the server, then when you change the values of your replicated variables, the clients will get those new values automatically with RepNotifies

real ridge
#

i get you question is if I have 2 different blueprints one is enemy AI one is my player and AI has repnotify ?dead how to check that repnotify dead in my player

#

to make game over widget

#

anyways I wanted make this widget in class HUD,....

prisma snow
prisma snow
quasi tide
#

When your AI dies, do an event dispatcher call. Have the GameState listen for that (or a subsystem). Then once X is dead, do a multicast to end the game.

real ridge
real ridge
quasi tide
#

Personally, I use a world subsystem to be a generic enemy event manager. That Subsystem has access to the game state and talks to it as needed. AI only talk to the Subsystem.

#

So any global tracker or notification for enemies goes into that Subsystem.

real ridge
#

maybe this is good solution? I used it in HUD

rose egret
#

has anyone worked with WorldPartion ? its so weird because one of my actor is loaded/unloaded with cell the other one its always there, same actor just duplicated, and they are next to eachother

deep shore
#

Is there a console command in UE4 to get detailed information about reliable events? How many are running at a given time, how close the buffer is to being full, and so on? I don’t see anything about it in Stat Net

real ridge
#

Guys I am setting this dead variable when AI enemy died its repnotify then inside I am calling custom event to my player where I am creating game over widget but I am just getting server log that base was destroyed and not game over widget why? how to fix it? also getting this error after

cloud stirrup
#

So a quick one. Let’s say I built a game with a dedi server. Then made another game with a dedi server of its own. Is there a way to have a client be able to go between these servers? As in the client may be a build of either game, but they can click connect and join the other game some how. Maybe they have to download the content folder off the server first??

rocky stag
#

How can i know player has sight to other player ?

prisma snow
rocky stag
prisma snow
rocky stag
#

😆

rocky stag
valid bough
#

Can someone please tell me why my UI isnt updating the player thats hit by a projectile but its updating the Owners? ```float AFPSCharacter::TakeDamage(float DamageTaken, struct FDamageEvent const& DamageEvent, AController* EventInstigator, AActor* DamageCauser)
{
if (GetShield() >= 0) {
float damageApplied = GetShield() - DamageTaken;
SetShield(damageApplied);
OnRep_Shield();
return damageApplied;
}
else
{
float damageApplied = GetHealth() - DamageTaken;
SetHealth(damageApplied);
OnRep_Health();
return damageApplied;
}
}

void AFPSCharacter::UpdateShield()
{

    if (FPSPC)
    {
        if (IsLocallyControlled())
        FPSPC->UpdateShield(GetShield());
    }

}
void AFPSPlayerController::UpdateShield(float Shield)
{

if (HUDWidget) {

        HUDWidget->UpdateShield(Shield);
}

}

#

This is giving my head a swirl

#

its also not consistently updating the shield , its updating only at 0. I have the shield binded in editor

young spoke
#

in RTS with many units, would you OnRep an attribute changing frequently likeCurrentHealth or use rpcs? does it matter which you choose?

fossil spoke
young spoke
#

Replicate vs. control through RPCs

fossil spoke
#

Anything that is Stateful should generally always be a Replicated property.

#

RPCs are just fire and forget events

#

The results of an RPC will not be reflected on a new Client coming into the Server after they were sent.

#

Therefore, CurrentHealth is a stateful property, as its describing what the current state of health something has.

#

Using RPCs to update it would mean that new incoming Clients would not know what the actual real value is.

young spoke
fossil spoke
#

@young spoke Why do you want to use an RPC over Replication is the question you should ask yourself?

young spoke
#

does it make sense to spam this across all clients on each change or batch the updates in rpcs

fossil spoke
#

Blueprint or C++?

young spoke
fossil spoke
#

Right, well you have access to PushModel Replication, which gives you direct control over when a Replicated variable will actually Replicate.

#

So you could in theory setup a mechanism that tells a Unit its regenerating health and can therefore simulate that on the Client.

#

Instead of always replicating the change every frame.

young spoke
#

yeah... already feel like rpc would be better then

#

for slightly more control

fossil spoke
#

The easy way isnt always the best way.

young spoke
#

originally was wondering why CMC doesn't Replicate it's MovementMode which got me thinking about this

fossil spoke
#

You will find that you will need to do somewhat elaborate optimizations in the future to save on performance.

#

Get comfortable with coming up with novel ways of achieving this.

#

CMC does rep the movement mode.

#

Its just not done via the variable itself.

young spoke
#

thats my point

#

instead of just replicating via DOREP facility, it's passed through RPCs and handled more manually

fossil spoke
#

The CMC is extremely complicated, seeing something done there, does not necessarily mean you should follow that approach without understanding why they did it and why it may or may not apply to what you are trying to do.

deep coral
#

when a client joins a map, what variables of an Actor BP get loaded onto the client? Do all variables get loaded, or only replicated variables?

fossil spoke
deep coral
#

Like if I have a Actor with an Int variable, it is set to 5 on the server, does it get loaded to the client?

#

what is CDO?

fossil spoke
#

Otherwise it will be loaded from the Class Default Object default value.

deep coral
#

Thanks!

young spoke
graceful flame
#

When would it make sense to use Switch Has Authority on a level placed actor? (not player controlled). Because in the case of setting a replicated variable does it make sense to skip for remote?

I've been using Is Dedicated Server to lessen the work the server has to do when dealing with sounds and particles or minor visual changes, but is there ever a scenario when you'd want to use Authority only on some custom event that a level placed actor has?

valid bough
#

So no one can help :/

fathom aspen
graceful flame
#

Yea I understand what SwitchHasAuthority does for a level placed actor, but I still can't think of a good reason when it would ever be useful. I guess its kind of the same as IsDedicatedServer but would be different if the host was a listen server.

woeful ferry
#

Like lets say the inventory size

#

If you set that up on both client/server it’ll not replicate as you’d expect.

prisma shadow
#

How can I display ping like this in my game?

rose egret
#

how to truly know an actor became net relevant in client ?

#

@prisma shadow its just UI ping is in PlayerState u can read it

prisma shadow
#

I found ping in player state but I have no idea how to use it so that it will be displayed in game

#

@bitter oriole @rose egret

rose egret
#

UMG

prisma shadow
#

So basically I have to create UI for ping, after that how can I connect the UI to player state - ping

prisma shadow
#

I added these in my player state

#

And this in UMG

#

But the values are not changing and it is displaying like this

#

I think the way I used ping in player state is not right. How can I properly use ping in player state? @bitter oriole @rose egret

prisma shadow
# prisma shadow

I fixed the value to single to triple digit but ping still remains constant as "0". It is not changing

elder sable
#

Hi, how would you handle the case having pawns being controlled by an AI, but a specific player is controlling those AI, what would you use as the owner, the PC or a custom AI controller storing the PC, or something else ?

jolly delta
#

Heya, anyone that can tell me the right behviour to spawn ai actor ? i have an issue that the mouv to update is laggy on clients and even if i do not replicate them it work on the clients after spawning. So i am i bit lost and i think that i did a mistake

real ridge
#

guys I dont know where to find help and people from #ue5-general sent me here I am getting this error

 [2023.01.18-10.54.49:714][  0]LogRHI: Display: Opened pipeline cache after state change and enqueued 0 of 0 tasks for precompile.
[2023.01.18-10.54.49:714][  0]LogRHI: Base name for record PSOs is ../../../DFC/Saved/CollectedPSOs/++UE5+Release-5.0-CL-0-DFC_PCD3D_SM5_79023B0B40C8A84A90FDF3A3965E2C40.rec.upipelinecache
[2023.01.18-10.54.49:715][  0]LogRHI: Could not open FPipelineCacheFile: ../../../DFC/Content/PipelineCaches/Windows/DFC_PCD3D_SM5.upipelinecache
[2023.01.18-10.54.49:715][  0]LogRHI: Display: Failed to open default shader pipeline cache for DFC using shader platform 0.
[2023.01.18-10.54.49:715][  0]LogRHI: Base name for record PSOs is ../../../DFC/Saved/CollectedPSOs/++UE5+Release-5.0-CL-0-DFC_PCD3D_SM5_0CC64E1C46447DB404577DB0A555D5DB.rec.upipelinecache
[2023.01.18-10.54.49:715][  0]LogRHI: Could not open FPipelineCacheFile: ../../../DFC/Content/PipelineCaches/Windows/DFC_PCD3D_SM5.upipelinecache
[2023.01.18-10.54.49:716][  0]LogRHI: Display: Failed to open default shader pipeline cache for DFC using shader platform 0.

Now its causing by my HUD class I created new HUD class and changed it in my game mode added there my player hud etc and packaged game when I run client it has blackscreen and those pipeline errors, when I use default HUD by UE its working BUT when I use again my new HUD and disconnect ALL of events its again not working...confusing, I got this problem sometimes also before when I had my HUD for player in player pawn, please any ideas or solutions? I am really lost...

high prawn
#

Hey guys, I have an error when trying to run my dedicated server on UE5.1

UE_LOG(LogStreaming, Fatal, TEXT("%s"), *FString::Printf(TEXT("%s: Serial size mismatch: Got %d, Expected %d"), *Object->GetFullName(), (int32)(AsyncLoader->Tell() - Export.SerialOffset), Export.SerialSize));

Something related to audio.
On client build everything is okay and on UE5.0 dedicated server also run properly.
What can it be?

pallid mesa
#

Hey, trying to shortcut here a bit... I'm planning to have different playerstates for AI and Characters, any gotcha/caveat any of you can think of by doing that?

woven basin
gloomy tiger
#

Hey there!

When a client joins a server, before they receive a controller, are they supposed to see anything in-game? 🤔 I mean, do they have a camera or something?

jolly delta
#

anyone that are use to spawn ai on server ?

gloomy tiger
#

You are spawning an AI Pawn/Character and then tell them to move to somewhere

#

You said you see laggy movement

#

But I still couldn't decode what's exactly going on, but:

  • AI Pawns/Character must be spawned via server.
  • In order for these pawns/characters to move, they have to replicate

I don't understand what you meant by "even if i do not replicate them it work on the clients after spawning"

jolly delta
#
  • AI Pawns/Character must be spawned via server.
    is it
    In order for these pawns/characters to move, they have to replicate
    so is it supposed to do not spawn if they are not replicated right ?
gloomy tiger
#

Right. If you don't mark them to replicate, they won't show up for clients given they were spawned via server

jolly delta
gloomy tiger
#

No, they won't spawn on clients if replicate is false.

jolly delta
#

hmmm because even with debug log that are rightfully printed on the server only just before spawning, my actor appear on clients lol

#

this is my spawn debug part on the game mode

#

this is the settings for that pawn

#

and this is the controller

high prawn
gloomy tiger
#

I never used this node myself so I don't know the differences to SpawnActor

#

Although I think its just a wrapper

#

This has to be on too

#

Is your AI a Pawn or a Character?

jolly delta
# gloomy tiger this has to be on

but i want to test without spawn, is the code that i have right now is supposed to spwn the MonsterBis only on server and so not on clients >?

jolly delta
gloomy tiger
#

Yep just a wrapper

#

It starts the behavior tree

#

Anyways

gloomy tiger
#

is the code that i have right now is supposed to spwn the MonsterBis only on server and so not on clients >?

Yes.

jolly delta
gloomy tiger
#

Baby steps.

elder sable
gloomy tiger
#

Where are you calling this Spawn function? GameMode? Level Blueprint?

gloomy tiger
gloomy tiger
#

OK

#

Where are you calling AIMoveTo?

#

I mean, where you're giving the command for the AI to move? Inside the AI itself?

jolly delta
#

on controller, but it should not change anything regarding spawn no ?

gloomy tiger
#

🤔 so you have two problems

#
  1. Spawning inconsistency
  2. Laggy movement
gloomy tiger
#

Anyways - what exactly you want to achieve in first place?

#

You want to spawn so all clients can see the AI?

#

You playing with this option checked?

jolly delta
#

the main goal with fix the laggy behaviour of ai

but right now i want to know why the ai is replicated without anything that i know.

The code is from someone else of my team so...but...

jolly delta
elder sable
#

You want to spawn something server side only ? With a dedicated server ?

elder sable
#

You spawn an actor from your game mode, which is not (your actor) replicated ?

jolly delta
#

yes as i showed in my screens

gloomy tiger
#

So you have a dedicated server and are connecting to it manually via standalone?

jolly delta
#

yes

elder sable
#

And if you remove the owner is the spawn params ?

jolly delta
#

right now i use that but it look similar, is it spawned on clients...

elder sable
#

Monster Bis is not replicated ?

jolly delta
gloomy tiger
#

This doesn't make sense.

jolly delta
#

yes...

gloomy tiger
#

Are you recompiling your dedicated server every time you change something?

jolly delta
#

i do use the one provided by the editor

gloomy tiger
#

And connecting your client to an up-to-date dedicated server?

#

Lets make a simple test first

#

Come here

#

Put 2 here

#

Click here

#

And see what happens w your spawning AI

jolly delta
#

yep

#

wait missread

#

yeah same behaviour lol

gloomy tiger
#

Same behavior as in... all clients are seeing the AI being spawned, right?

#

is this checked?

jolly delta
#

yes

#

even by changing the parent class meh

grim goblet
#

Hi guys! I'm building a Metaverse platform using Unreal Engine and pixel streaming. I'm running the Pixel Streaming application along with the Matchmaking server but the stream stays the same on all the devices connected to the server.
It would be great if someone could let me know what mistake I'm doing?

gloomy tiger
# jolly delta even by changing the parent class meh

At this point, I don't know what else could it be. But if I were you, I'd create another raw actor and try to spawn it on the server w the same configs you have in your AI and make sure the other clients can see it.

#

In other words - create a new actor inheriting from Actor, add a Sphere component so you can see it in runtime and mark it replicates, then try to spawn this new actor and see if your other clients can see it as well

grim goblet
#

How do I scale it?

#

Like when I have 1000s of users?

#

Or 100s?

jolly delta
thin stratus
#

I'm also relatively sure that PixelStreaming requires one Server/Host per unique "experience".

#

So you will have to host the Game for every single player. 1000 Players = 1000 Running Games.

#

Would be weird if Pixel Streaming magically managed to emulate 1000+ players with one server :D

#

UE's network system is probably also not the thing i would use for "metaverse"

#

Wasn't the idea of a Metaverse to be ONE thing, decentralized ?

#

What's the idea with everyone making their own now

#

Fair

#

The internet is my metaverse

#

And I will die on that hill

gloomy tiger
#

every time i read metaverse my stomach go wild

thin stratus
#

I actually managed to not read about it much the past months until just about now

#

Yeah sure

#

But not if there are 10 of them

#

It also itches me the wrong way that posts about the Metaverse on Blog pages are always written like whatever this adds is gonna happen and is gonna be good.

elder sable
#

Question :
Server side : On a pawn, i spawn an AI controller, i set the PC as owner
Client side in PC : I call a RPC on this pawn, the PC on the client is the same as the GetOwner() on the pawn
The RPC is not called, no drop error in the logs
If i remove the AI controller spawn, the RPC is called
Is that the expected behavior ? Didn't find anything talking about exceptions with ownership

thin stratus
#

I only ever saw posts like these if the actual thing is a scam and the person writing that is profiting from it .D

gloomy tiger
#

metaverse is the new Build My Own WoW-like MMO(tm)

thin stratus
elder sable
#

I changed the owner to the PC after spawning the AI server side

thin stratus
#

But, wait, confusing

#

You have a Pawn, an AI Controller and a PlayerController

elder sable
#

Yep

thin stratus
#

You spawn an AIController inside the Pawn

elder sable
#

Yep

thin stratus
#

You set the Owner of the AIController to be the PlayerController

elder sable
#

The owner of the pawn

thin stratus
#

I think Ownership of Pawns is handled by Possession

#

is the AIController possessing the Pawn?

elder sable
#

Yep, the owner is the AI controller then i change it, just after (SetOwner(PC))

graceful flame
thin stratus
#

No idea, tbh

#

I think all of that is not needed

elder sable
#

I used a workaround but i found this behavior weird

thin stratus
#

Because all of them want to do it their way and all of them want to make it theirs and all of that goes against what they are promising

thin stratus
elder sable
#

Yep

thin stratus
#

I might honestly think that this won't work

#

The Controller that possesses the Pawn should also be the Owner

elder sable
#

The owner can't change when an AI possess it ?

#

Ok

#

No warning anywhere i was surprised :p

thin stratus
#

I mean

#

I understand your idea

#

But it might just be some safety thing somewhere that stops this

#
void APawn::PossessedBy(AController* NewController)
{
    SetOwner(NewController);
#

This is the default behavior of pawns and possession

elder sable
#

Yep, i use another actor to pass orders to AI, a bit more annoying but it works :p

graceful flame
#

I’m thinking if there ever is a Metaverse it would be something like a massive video game with procedural content made by simply speaking out loud to describe things and AI under the hood making it all work seamlessly.

thin stratus
#
class UPlayer* APawn::GetNetOwningPlayer()
{
    if (GetLocalRole() == ROLE_Authority)
    {
        if (Controller)
        {
            APlayerController* PC = Cast<APlayerController>(Controller);
            return PC ? PC->Player : nullptr;
        }
    }

    return Super::GetNetOwningPlayer();
}
#

Which seems to suggest that it's looking at the Controller and not the Owner

#

Which might explain why your SetOwner has no effect on the RPC

#

But I'm not sure if RPCs use GetNetOwningPlayer

#

have never looked into it that much

thin stratus
elder sable
#

Mhh will check later maybe, thanks ! :p

thin stratus
#

To allow easier content creation

#

I think the Metaverse is redundant

#

Same as Crypto and NFT

#

The Internet is just fine without all of those things

elder sable
#

Future is meta-metaverse

gloomy tiger
#

Question - when does the server grants a client their playercontroller?

thin stratus
gloomy tiger
#

Hm

graceful flame
#

It’s already becoming fragmented which goes against the whole idea in the first place. 🙃

thin stratus
#

But iirc the Client has a fake PlayerController until the actual one replicates

#

Because otherwise it would be problematic

gloomy tiger
#

And do you know if this fake PC is the one set by my gamemode?

thin stratus
#

I would need to look it up again

gloomy tiger
#

You meant PreLogin?

#

Nah, I see it wtf.

twilit radish
#

There's PreLogin, Login and PostLogin.

gloomy tiger
#

Yep, my bad

thin stratus
#

The fake PlayerController thing is something I Only vaguely remember

gloomy tiger
#

Just confirmed here

#
    /** The class of PlayerController to spawn for players logging in. */
    UPROPERTY(EditAnywhere, NoClear, BlueprintReadOnly, Category=Classes)
    TSubclassOf<APlayerController> PlayerControllerClass;
#

It uses that one 👆

thin stratus
#

Yeah I mean the normal PlayerController uses that one for sure

gloomy tiger
#
        // Give the GameMode a chance to accept the login
        APlayerController* const NewPlayerController = GameMode->Login(NewPlayer, RemoteRole, *InURL.Portal, Options, UniqueId, Error);
#

🤔

#

I mean, Is there really a fake one?

#

B/C it only tries to login when this condition is met:

if (Connection->PlayerController == NULL)
#

With no else condition

#

What I wonder though is - what is the player supposed to see when they have no player controller

#

Thus they don't have a pawn/character, meaning no camera

#

(I mean, not that a camera is bond to a pawn/character, but...)

gloomy tiger
#

OK, I'm quite lost here.

When a client connects to a server, there's a screen "blink" from when the server accepted the client until the client possess the pawn and I really have no idea how I can manipulate that screen blink.

This can be quite easily reproducible by just:

  • Set your Net Mode to Play as Client
  • Set the number of players to 1
  • Play

(It's easier to notice if you emulate your network to like, 500 ping)

#

(And am not sure "screen blink" is the appropriate term; that's just to give you the overall idea)

#

Two questions:

Why this happens?
How can I manipulate it?

#

(In really shallow terms, after a client handshakes with a server, this client sees a sneak peak of the level before it gets to the right position, with their pawn possessed. I'm trying to fix this - I don't want my clients to see any sneak peak of the level before they assumed control of their pawn.)

#

The sequence I'm seeing is this:

#
  1. This is what the client sees as soon as I play from editor (PIE)
#
  1. Then the player gets spawned somewhere (I bet it's 0, 0, 0)
#
  1. And finally they get their pawn and their camera is shifted to the character's one
gloomy tiger
gloomy tiger
sonic python
#

Helloo

#

Is Anyone Up?

dark edge
#

no we're all sleeping

gloomy tiger
#

ULocalPlayer

#
ULocalPlayer::ULocalPlayer(const FObjectInitializer& ObjectInitializer)
    : Super(ObjectInitializer)
    , SlateOperations( FReply::Unhandled() )
{
    PendingLevelPlayerControllerClass = APlayerController::StaticClass();
}
#

It's a APlayerController 😢

#

It seems it keeps that class until GameMode::Login

graceful flame
gloomy tiger
#
  1. Yes this is 0,0,0 with X forward and happens because there isn't even a player camera to use yet because it hasn't loaded in yet.
#

That's the thing

#

I want to intercept that

#

I don't want the player to see the world while they're still handshaking

gloomy tiger
#

Need to come up with something

graceful flame
#

I think the way to get around it is to cover the screen with UMG

gloomy tiger
#

But... when?

graceful flame
#

or place a "loading" cube at 0,0,0

gloomy tiger
graceful flame
#

and then find a clever way to hide it inside of a normal looking level mesh like a rock or something lul

gloomy tiger
#

bring a genius to this nobel

copper skiff
gloomy tiger
#

Is there any event such as like

#

OnBeforeTravel or something? 🤔

#

Built-in one I mean

thin stratus
gloomy tiger
#

I mean ofc if it was built from source

gloomy tiger
graceful flame
#

Damn I tried adding a full screen loading widget directly off the Event BeginPlay of the level blueprint and that didn't work either, still a flicker at 0,0,0

graceful flame
#

I'm just going to use the 0,0,0 loading cube mesh method for now then

#

Design around it and move on to other issues

gloomy tiger
#

FWorldDelegates have something

#

Dont know how they work yet but hey

gloomy tiger
graceful flame
#

But its like if the level is loading before the player controller then how is a widget ever going to be shown on the screen first?

gloomy tiger
#

The second day I'm spending on this sh-t

gloomy tiger
#

I wonder the reason why Epic doesn't allow us to manipulate the PlayerController ULocalPlayer uses 🤔

#

(I imagine the scope would be really limited?)

#

Anyways - alright - you came from the skies with a blaster solution. Will stick to that for now to get things moving. Thank you lawlster!

golden condor
#

Hello ! I'm trying to replicate my character rotation but everytime i change it to server the player isnt even rotating, it's working in Solo and a bit laggy with Multicast, i've been trying for 1 hour 😦

woven basin
gloomy tiger
#

I mean, how can we trigger something before load level?

#

I MADE IT BOYZZZZ

#

No workaround sh-t

#
class API UCustomLocalPlayerSubsystem : public ULocalPlayerSubsystem
{
    GENERATED_BODY()

    virtual void Initialize(FSubsystemCollectionBase& Collection) override;
};
void UCustomLocalPlayerSubsystem::Initialize(FSubsystemCollectionBase& Collection)
{
    Super::Initialize(Collection);

    this->GetLocalPlayer()->PendingLevelPlayerControllerClass = ACustomPlayerController::StaticClass();
}
#

🌠

#

cc @graceful flame

woven basin
#

And by doing it in the Game Instance, it persists across levels.

golden condor
gloomy tiger
#

I'm not sure, but that has caveats

#

For example - if I join a friend of mine through Steam Overlay

#

Then I haven't interacted with my UI to have a chance to display a black UMG or something

#

I remember in our last released game we literally ignored this 0,0,0 flicker because we were going crazy not being able to properly address it

woven basin
#

Game Instance boots before begin play on a level though. Just load it there?

gloomy tiger
#

Game Instance only boots once

woven basin
#

Yes

#

If you do it via steam you said?

gloomy tiger
#

If I join you through Steam

woven basin
#

It’s still a travel event you can grab and action on GI

gloomy tiger
#

Can I?

#

How?

woven basin
#

Something is making you travel maps

#

Steam API call - it has to

gloomy tiger
#

Yes

woven basin
#

Just gotta find the right hook

gloomy tiger
#

Sure

#

That's one way

gloomy tiger
#

It doesn't matter how you join a server, it'll work

#

Ofc haven't played w it enough to spot side effects, but so far so good

#

(What I discovered so far is that that PC does not exist in UWorld so you cannot do anything world-related; however I think I can spin a widget through there)

gloomy tiger
#

Although you instigated my curiosity. GI has OnNotifyPreClientTravel

hollow bridge
#

Can anyone explain to me NetLoadOnClient? For example in a late joining game what will happened if a player will join after one of the NetLoadOnClinet objects already destroyed

deep coral
#

when a client joins a map, for an actor that the client does not own (ie, a door for example), does the begin play and construction event get called on the client?

#

for the BP door for example

woven basin
fossil spoke
deep coral
#

Like if I have a begin play on a door that inits some vars, will it also init the vars on the client side?

fossil spoke
#

The Constructor and BeginPlay are called for all Actors also regardless of Network context.

#

They are ALWAYS called.

#

Its in the name BeginPlay

#

Beginning of Play for a newly connecting Client is the moment they finish loading the level.

deep coral
#

I see now, thx, i thought it was beginplay for server or game server

fossil spoke
#

In UE5 I believe it was changed to be when the GameState has been replicated.

#

But the point is, regardless of context, BeginPlay is always called.

gloomy tiger
drifting heath
#

What would be best practice for network efficiency dealing with an inventory type system? The current two ideas I have is the first being a simple "retain everything in memory as an object", and the second is "retain the row ID for the item and only retain the stuff that changes, perform data table lookup anytime default info is needed".

#

The 2nd one seems best for memory management, but slower. The game I'm making is multiplayer focused, so it would be running on servers that probably can handle the memory usage.

woven basin
#

You would generally treat items in storage as UObjects.

Then just replicate any changes as needed.

Unless you are moving a gzillion items, the few changes would be lightweight when updates are needed.

drifting heath
#

So call it once from the data table and then retain it in memory?

#

i.e. "m_inventorySlots[n].itemData = FStItemData();"

woven basin
#

dont optimise early - thats the simpliest way.

If profiling shows it to be a problem, you can try for tweaks. But I doubt that would be the issue...

drifting heath
#

Fair.. Just get it to work 😆

#

I guess if I got the system working I can just test it myself and see the stats on it.

fossil spoke
#

Prove you can do the system first, then optimize.

#

You may get insight into how to better optimize something after you have already built it in some way.

#

You will likely feel the need to rewrite the system entirely, probably more than once. In order to achieve better results.

quasi tide
#

Prototype code is production code 😈

fossil spoke
shell chasm
#

can anyone tag me with the most optimal way to spawn items for players? i.e a hospital will have more medical supplies vs a house bathroom

twin juniper
#

So in order to set up dedicated servers, do I need to use a different engine source? The docs are a little confusing to me

#

"You must be using a source build of Unreal Engine, which you can download from the Epic Games Github.

If your project is using a binary build from the Epic Games Launcher, you will need to migrate it to a Github source build."

#

but then underneath that section, when it references setting up a new built target, it says "If you do not have a C++ solution, you can right-click your .uproject file and click Generate Visual Studio Project Files to create one."

hollow eagle
#

The process of working with an unreal project doesn't change whether you're using a source build or a launcher build.

#

But a launcher build will not build a number of additional configurations (including server configs). Only source builds allow the full set of configs.

twin juniper
#

Okay the question I'm asking is whether I need to start a new project with the source code, or if I can replace the launcher build with the source code in my existing project

hollow eagle
#

You do not need to start over.

twin juniper
#

Is there documentation on adding the source code to an existing project then?

hollow eagle
#

simply place your game directory under where you downloaded the engine source to and regenerate project files.
Your game folder should be alongside Setup.bat and GeneratedProjectFiles.bat.
Or modify the uproject to set EngineAssociation to a path to the engine. Or register the build in the registry and modify EngineAssociation to point at it (there's a tool that does this for you but I don't remember the path) https://docs.unrealengine.com/4.26/en-US/ProductionPipelines/DeployingTheEngine/UsinganInstalledBuild/#registeringaninstalledbuild

twin juniper
#

Hello, I have a question about actor replication. So in short: I hold information about items in a data table which holds a soft reference to a static mesh. I access the data table row after spawning the item (on server) and then I have a static mesh variable (Set w/ Notify) to set the static mesh component to the set mesh.
The problem is while it works perfectly well on the server, I can't seem to get it to work on the client. The actor gets replicated but the variable has no value and on_rep function doesn't get called. Maybe it's a problem with my understanding but what could be causing the issue here? https://blueprintue.com/blueprint/3uxi-f9o/
I have the actor set to Replicates and Net Load on Client, although I've also tried setting it to Always Relevant and it didn't seem to help.

fiery wadi
#

As someone who is messing about with Multiplayer can someone tell me why this isnt replicated to the server or client ? (Now i know someone will chime in using Tick is bad for updates etc its all just me messing about and learning atm not optimising) 🙂

#

The health bar does not update when i use the custom event UpdateHP if i plug it directly into the Event Tick and then try to update during the game it shows on the Client but not the Server (Which is why i thought Execute on Server would fix)

upbeat basin
#

Maybe you can convert your replicated variable to soft static mesh and load the actual mesh on notify so you can assure each device have the valid mesh after server decides which one to use

upbeat basin
fiery wadi
#

Yep i use Listen Server.

#

If I change from Execute on Server to Multicast it updates on the Client Screen but not the server Screen

#

not sure how i would check that if something exists on server

#

I put a print string on the failed cast pin

#

and see if server fails the cast.

#

Nope server doesnt report a failed cast.

upbeat basin
#

Wait I'm not sure if I get it correctly, is the widget entirely missing on the server or is it just not being updated?

fiery wadi
#

As you can see the server screen does not update it.

#

Multicast - Only Client updates, Execute on Server - Neither update.

twin juniper
upbeat basin
# fiery wadi

Hmm okay you shouldn't need to use an RPC for this then, if the health is replicated both server and client will have the health value. Both server and client also have the widget. So you should just be able to set your health to your widget's progress bar's percent

#

Where do you set or update your health?

fiery wadi
#

In the Dummy BP

upbeat basin
upbeat basin
# fiery wadi In the Dummy BP

Can you try doing SetPercent directly in Tick, without any other RPC/event and set your widget variable to not replicated and try like that?

fiery wadi
#

so like this ?

near granite
#

level sequencer support multiplayer?

#

I want to access to server in level sequencer

fiery wadi
#

@upbeat basin Works on Client Screen but not in server.

upbeat basin
#

Oh you should keep health as replicated

upbeat basin
fiery wadi
#

during runtime

#

Ok with health replicated it still updates Client and not Server.

upbeat basin
#

Are you sure you're setting it on the server?

fiery wadi
#

Tbh im not sure how you can tell what the server value is.

#

I thought Execute on Server would set the value on the server.

upbeat basin
#

You can just use print in tick to display the health value on server and client

#

Can you show how/where do you set the health?

fiery wadi
#

this is where i set the value during runtime

upbeat basin
#

Oh

#

That's I'm not sure if a good practice to change things from

#

The world outliner shouldn't be showing you all the actors, so it should either showing you the server or the client

#

If it's client and you change from inspector, then only client's health will be changed

#

Can you open the blueprint, set the health from there and try?

#

Then they should both show the same value

fiery wadi
#

this is what it looks like during runtime.

#

I have 2 windows open running the "game" and then the editor on a second screen where i change the health value.

upbeat basin
#

Well yeah, I guess the default value of your health variable is 0, you change it from the instance on the world, which happens to be the client instance, so only client can see the health being changed

fiery wadi
#

But i can see the health value printed by server is 0.0 but client is 0.25 so how do i tell the server to update the health value.

upbeat basin
#

Well you need to do your setup

#

BeginPlay is a good place for this

fiery wadi
#

Ah so do i need 2 functions UpdateServer and UpdateClient

upbeat basin
#

Set your maximum health in the BeginPlay

#

But only in server

#

Since it's a replicated variable it'll be updated in the client as well, so you don't need to use RPC to set it on client as well

upbeat basin
fiery wadi
#

Ok so like this ? should reflect in client and server?

upbeat basin
#

No, we're mixing terms here

#

I meant the float variable by Health

#

You need to set it's value in begin play

fiery wadi
#

I set its Default Value to 0.33

upbeat basin
#

SetPercent can still stay in Tick so it can update

fiery wadi
#

Ok step 1 accomplioshed xD

#

Server and Client see 0.33 as default valye for the Health Bar.

#

hang on a minute i think a penny might have dropped...

#

nope xD

#

Didnt work either I thought Replicated would automatically update the value within the server , Maybe this is a case of RepNotify so when the value of Health is changed it automatically transmits a new value from the server to the clients ?

limber cloak
#

I have a question, how do you have 1 server run multiple scenes/levels? something like albion online, they have multiple maps?

#

how comes ?

#

How do you make it like albion online?

#

with the maps

#

it loads a private island for someone, and unloads it

#

or a guild island

#

but there are guild islands

#

a player creates a guild island, where others can join and its increasing each time, you cant just start a server for each island

#

how?

#

but can 1 server handle all those maps?

#

like a new additive level

#

but they say Unreal Engine can make mmorpg

upbeat basin
#

Is this a rough estimation of how many connections can a server can handle or just a random number?

limber cloak
#

fortnite has 100+ players and its unreal engine

#

why do you lie about it

#

tons of other mmorpg games

#

they handle 100 players

upbeat basin
#

I see, thanks for the information

limber cloak
#

not 20 not 15 not 10 but 100

#

and there are lots of others mmorpg games

upbeat basin
#

On the above picture it looks like both server and client can show the health when it's set on both of them right?

fiery wadi
#

Yes but the second I try to update it from the editor window it updates the Client Bar but the Server does not receive the new value from within the Editor so Client will print 0.75 (New value) meanwhile Server Window will print 0.33 (Old Value)

#

It feels like the Server Values cannot be updated from within the Editor during runtime.

limber cloak
#

mortal online is made by unreal engine it says on google

#

and it has over 1000 players

#

active players

fiery wadi
#

I have a text render object which shows a random text to both players at the same time which is working.

#

which works.

limber cloak
fiery wadi
#

As you can see both players see the exact same numbers

#

but this is happening at a predetermined rate not just "Oh i,ll change this value when i feel like it"

lament garnet
limber cloak
#

it can handle a lot

lament garnet
#

🤷‍♂️

upbeat basin
lament garnet
#

i dont see how any engine handle 1000 players

limber cloak
#

unity game engine handles thousands in 1 server

#

like albion online

#

ive seen 1k+ in a map

#

and there are multiple maps

#

but idk if 1 map 1 server or 1 server all maps

near granite
#

After opening the new level, "Is locally controlled" function not working

near granite
#

I found same problem with me but this is about C++, how can i apply to blueprints?