#multiplayer

1 messages Β· Page 32 of 1

devout dagger
#

the bool don't replicate right

short arrow
#

@fathom aspen I can't wait to ask you lots of questions about iris

fathom aspen
#

I can't wait to get 5.1 installed too

twilit radish
#

Does 5.1 have Iris?

dark edge
twin juniper
#

yeah

fathom aspen
twilit radish
#

Iris achieves replication performance improvements over the current replication system by:

Unlocking scalability by removing antipatterns that constrain it

Enabling concurrency through separation of replication and game thread data

Improving efficiency by sharing as much work as possible for multiple objects and connections
πŸ€”

worn wagon
fathom aspen
#

Iris is the metaverse now

twilit radish
#

TL;DR Epic unmessing up their own code.

#

πŸ˜‚

fathom aspen
twilit radish
#

All I care about with this update is Nanite / Lumen for VR honestly x)

fathom aspen
#

But I don't blame them, they at least got us Iris.

#

I can keep crying in fixing their own docs

devout dagger
#

I've just changed it so it doesn't have a flip flop.
when I print the variable in ON_REP , it only prints to a client and server, it does not print to my own client.

quasi tide
fathom aspen
twilit radish
#

😦

fathom aspen
#

Experimental intensifies

twilit radish
fathom aspen
#

I do, but I mind not learning the tech.

twilit radish
#

Lol fair enough.

#

That's why I'm stealing Epic's sample projects and will VR-ify it 🀣

fathom aspen
#

VR Sample option PR?

twilit radish
#

If only, they don't really care about VR for the most part πŸ˜”

#

We don't even have a multiplayer compatible VR sample project. Let alone Nanite / Lumen.

fathom aspen
devout dagger
fathom aspen
#

I don't think you need to have one, but for more info check pinned messages in #online-subsystems

worn wagon
#

@fathom aspen Stop using all of epic's bandwidth πŸ˜’

#

I was getting 7mbs earlier

twilit radish
#

πŸ˜›

worn wagon
#

IT'S GOING DOWN

fathom aspen
#

You will prolly end up having one replicated instance on client and another dummy one you created yourself. For them to link-up you don't have to replicate anything, all you need to do is spawn the actor on both sides, and name it the same, and override IsFullNameStableForNetworking to return true

twilit radish
#

In before "Introducing the priority download pass, now for only $5.99" πŸ˜„

fathom aspen
chrome bay
#

You need Twitter Blue for full DL speed

twilit radish
#

I only need to download something along the lines of another 70GB, so just grab some coffee and then you can get your connection back.

fathom aspen
fathom aspen
worn wagon
#

Why did epic have to release 5.1 and a new fortnite update on the same day

fathom aspen
#

That is a good question

twilit radish
#

I want to laugh, but I know Epic will screw me over and throttle my download speed if I do πŸ˜‚

worn wagon
devout dagger
quasi tide
#

Oh snap - so we can have replication groups now? Hot diggity dog.

fathom aspen
fathom aspen
#

I thought it was SkipOwner

twin juniper
worn wagon
# prisma snow what is it?

A way of streamlining bindings. Before you either bind a value that is constantly updated (not good performance) or use an event driven approach to only update ui info when needed (lots of boilerplate code) this is the "best of both worlds", less work and good performance.

twilit radish
#

Reject UI, embrace unplayable games with no UI πŸ˜›

devout dagger
worn wagon
#

This is pretty dope too (sorry for non-multiplayer stuff)

prisma snow
fathom aspen
twin juniper
kindred widget
#

I can't tell if I like that or not. Would need to try it out.

#

I dunno. Maybe when it's more finished. Or maybe if your were making Fortnite2 and needed that stupid level of organization. Personally the abstractness that Lyra presents with tagged widgets and GAS component is enough abstraction and boilerplate right now.

fathom aspen
#

I'm really overwhelmed by the tools I have to study rn cry_thumbsup

twilit radish
#

Study Iris πŸ˜›

kindred widget
#

I just spent last weekend kinda pulling apart Lyra. Do love their UI extension implementation, but I took the liberty of simplifying it for a single game instead of needing Fortnight's Games within games that have games who play games.

dry pebble
#

+1 to this! πŸ˜„ -eagerly awaiting iris blog post-

quasi tide
#

@fathom aspen In regards to the blog post, if it isn't a 40 minute read, I'll doubt that it is actually you who wrote it.

fathom aspen
#

I'm dead.

twilit radish
#

Hi dead, I'm Thom.

#

πŸ˜›

fathom aspen
#

I raised the bar for myself by myself πŸ˜”

worn wagon
twilit radish
#

Rip. I've downloaded the "Valley of the ancient" sample mean while πŸ˜…

fathom aspen
#

Get blocked for teasing my potato internet

fathom aspen
twilit radish
#

No. For being my VR testing playground πŸ˜‚

#

Although it's already broken for someone in #virtual-reality .. So I don't have many expectations if I'm honest.

dark edge
#

How in-depth does this get?

#

do you have agent simulation when unloaded anyway?

#

Is this for agents or just for traffic lights to look right?

#

Then build the traffic light state into your simulation

#

the ACTOR just displays that state (This intersection is red in this direction and green in this direction)

#

The actual simulation is global, just the display of it is local around the player.

dark edge
#

Do you already have virtual agents that get represented by actors when near?

#

If I was making a simulation game I'd start with the simulation. Is this a city builder?

#

That's probably no way to work. You probably want the simulation to exist independent of the actors. Depends on if you need an actual simulation or just for it to look like one

#

Up to you. I like running a simulation in a subsystem but I haven't done much with smoothly attaching and destroying actors to represent that simulation

#

I am working on something somewhat in the vein of a traffic simulation, it's more for hydraulics and power but it's still graph networks and flow.

young kestrel
#

Sad moment.
Not only a cliffhanger in Chainsaw Man, now I'll still need to struggle with that... Or just put the project on ice, I guess.

Maybe in a year or two someone will a working example project, that actually uses the stuff there, because the old smooth character Network plug-in is kinda useless when looking at the code.

glad jasper
#

how do i get a reference to the simulated proxy when the server spawns a replicated actor? like if i want to check if he's on my team or not

fathom aspen
#

Team is just a replicated property inside PlayerState.
Inside OnRep_Team you would check if GetLocalController->GetPlayerState.Team == GetPlayerState.Team

quasi tide
#

Wonder if the new OnlineServices is supposed to replace OnlineSubsystems? πŸ€”

#

They both just seem to be solving the same problem space.

#

Because this part in the docs certainly leads one to believe that they're beginning the depreciation of the online subsystem stuff.

fathom aspen
#

I see, so basically Online Subsystem terminology is now of the past, and is replaced with Online Service

timid moss
#

Does anyone know how to implement a NetSeriallize that serializes a UObject pointer?

#

Is it just Ar << MyUObjectPointer;?

fathom aspen
timid moss
#

no. but im looking at it rn

fathom aspen
#

Good, might give you some pointers

fathom aspen
#

Basically it was the answer, but they were too happy to reply that it worked for them πŸ˜”

#

Now that I'm looking at serialization code I'm trying to understand what happens if you replicate an already linked actor for some arbitrary connection

#

Does it get duplicated on client, or does it get replaced with the already linked one, or does it not get created at all and the instance on client becomes somehow the replicated version?
Someone on here asked about that earlier today and that opened a research door for me πŸ€“

dark edge
#

Subsystem with a manager for replication is what a lot of people do

sweet ore
#

i have a question. game state stores variables like name - health. if i had a database for these variables is it still necessary to do any calculations in the game state or is it ok to do it in the character bp ?

sweet ore
latent heart
#

db access is going to add latency / slow down to your system.

#

Better to get a local copy and work with that.

#

Also allows a sort of "transaction" system - i.e. you don't update things in the db constantly, but you can update them all when you leave the game or whatever.

#

Or just not update them at all.

sweet ore
#

even for mmo? get copy for work fast

fathom aspen
#

These sound as perfect examples to reside in PlayerState

sweet ore
#

you are right sorry

#

i mean the playerstate

latent heart
#

Especially for an mmo. You want to minimise network traffic!

#

Only update when you need to.

fathom aspen
#

An MMO adds a ton of network traffic that you want to minimize as Daekesh said

sweet ore
#

thank you so much guys i'll keep it in mind and study more

worn wagon
#

Do you guys know of any common reasons a client RPC could be being fired twice? There is only one call to the RPC anywhere in my code, I have breakpointed it and it triggers the first one as intended, but then the rpc is called again from somewhere else. I'm debugging rn so i'll figure it out eventually, but just wondered if this happens commonly for any particular reason.

latent heart
#

An mmo is about the most stressful and hard thing to do, both for you as a programmer and for the machine that runs it.

#

Optimise everything.

fathom aspen
worn wagon
#

I'm not sure what code to even show you

fathom aspen
#

We can start with the function that calls that client RPC

latent heart
#

Are you running multiple clients under a single process or somtehing?

fathom aspen
worn wagon
#

I'll have to get back to you guys later, I appreciate the interest though

fathom aspen
#

But I did aPES_Sob

#

Say you deterministically name an actor for a connection on both server and client and make sure it was linked correctly doing some engine hackery. What would happen if you replicate that actor at runtime?

#

I mentioned 3 cases/circumstances, you can bet on one, while I die finding out the answer PES_Old

latent heart
#

"Already linked" ?

#

You mean one that's net addressable?

fathom aspen
#

Right

latent heart
#

Is that what it does or what you think it should/would do?

fathom aspen
#

And would a replicated version still gets created on client?

latent heart
#

If it's net addressable, it shouldn't get recreated on the client, because it'll look for the local version and be like "Hey, use this"

#

I mean, that's what it should do..

#

Ah yes.

#

Static actors aren't replicated, they just exist for the client from map load.

#

I assume you mena static = ones in the level.

fathom aspen
#

Unless I'm looking at the wrong place

latent heart
#

I wouldn't expect it to create actors it's trying to net address to the client. It should be a specific net create command for that. Or weird stuff could happen.

fathom aspen
#

I will make sure to report my findings once they stack up

#

Oh yeah, it is, it is πŸ˜„

latent heart
#

Damn. So if you send a random netguid, it will just assume it was meant to exist and create it from nothing?

#

Ah. That sounds reasonable.

#

Unless you've already ack'd it, deleted it and then the server messages you about it again.

#

Then the srever would skip the "here's the data" part?

fathom aspen
#

I think so, because it can't find an actor channel for it

#

Pretty much like non-relevant actor for a client

#

Gets deleted

latent heart
#

I think this is all firmly left in the "just let epic handle it" pile.

#

Hehe. Hate it indeed.

fathom aspen
latent heart
#

There are many days I'm glad I don't work on a game, let alone a mp then.

#

Then there are days when I have to integrate things into sequencer and I want to stab Epic with a rusty fork.

fathom aspen
#

Daekesh works on 3rd party plugins, confirmed!

quasi tide
#

Was this a node pre-5.1? πŸ€”

fathom aspen
#

And pulls apart #slate in his free time

fathom aspen
#

It is why you basically can use PushModel BP only

quasi tide
#

MMO BP here I come

latent heart
#

Virtual production/broadcast stuff.

#

The stuff I'm on isn't even targeted for release for several versions πŸ˜›

#

Not sure. Not sure it'll even be publicly available. It was in the unrealfest thing, but I can't really say much about it, I don't think.

quasi tide
#

I say just tell us and then ask for forgiveness later 😈

latent heart
#

Hehe. There's not much to tell. πŸ™‚

fathom aspen
#

Wait so Daekesh works at Epic, or works for a company that is contracted for Epic?

latent heart
#

The latter.

fathom aspen
#

Hmmm πŸ•΅πŸ»

quasi tide
#

I'm curious how people even find jobs with virtual production and well...non-games with UE πŸ˜…

fathom aspen
#

I had to ask, considering I shit on them sometimes

latent heart
#

I got recruited because of a project on github I started in ue 4.0

#

It was a super fun "not slate, but slate" ui implementation based on HUD and its associated stuff.

fathom aspen
#

Virtual production enthusiasts writing notes meanwhile

latent heart
#

Heh

#

The stuff I've been working on for the past couple of months wasn't even in the video. 😦

#

Who knows, man, you'd have to ask Andy.

rocky kestrel
#

Player controller thing happens after Begin Play. Is this right way to do this? Account ID is set in main menu and this happens in playable level after joining dedicated server.

#

is there execution order problem?

sinful tree
rocky kestrel
#

Okay thanks! What could be good way to fix that? Add delay to postlogin?

sinful tree
#

When you're setting the variable on the playerstate you can continue with your logic that you need.

#

Keep in mind, that even the playerstate takes a moment to replicate to the player, and if you're running an RPC from the player controller, you shouldn't need to tell the server which playerstate as the server can get a reference to the correct playerstate by just doing "Get Player State" in the controller.

rocky kestrel
#

Okay thank you!

sinful tree
#

You might also want to use a Do Once on that RPC Event so it can only be called once (per player controller) so that someone malicious doesn't keep calling it πŸ˜›

rocky kestrel
#

haha okay thanks!

#

Second question. Is this good way to save players in SERVER? Beginplay starts timer saving players function. And other pictures from that function. "PlayerControllers" are current controllers online on server. "PlayersDB" is structure array that contains all players that have connected to server lifetime.

#

later I would implement some other way to make backup to real database or something. For example once in hour.

#

(In player actor beginplay: calls Gamemode and PlayersDB to get variables like "health" to player character. Atm this works but have tested with 2 players on server. But goal is to have 50 players same time playing. Would this saving be too hard for server?

sinful tree
rocky kestrel
#

is that faster? I will try that!

sinful tree
#

It's easier. You'll only be working with the player IDs that are on the server.

#

Someone joins? Use the "find" of their ID on the map and it returns their data.

#

Saving? Just "Add" the ID & their data to the map again.

rocky kestrel
#

Okay thanks!

sinful tree
#

If your intending for each server to house their own data, you may even consider using a save game object for each player so the server doesn't have to constantly have everyone's data in memory.

twin juniper
#

I was wondering, what is the way to build a production level dedicated server game with blueprints only nowadays?
I remember couple a years ago to reach production level i had to use some external plugin (uworks) and steam.

#

What i mean by production level is that the dedicated servers are visible to clients out of the box, and they don’t need to do some port forwarding manually or similar.

#

To elaborate more, i remember that when i didn’t use uworks/steam i ran into a couple of issues which were solved by the plugin:

server list wasn’t available to clients(had to enter server ip manually)
you had to do something with port 7777

sinful tree
#

You use an Online Subsystem, like Steam's or Epic Online Services. Your servers would essentially create sessions that players can join. The clients would poll the online subsystems for available sessions and join them, no port-forwarding required. #online-subsystems for more info on that.

twin juniper
#

but is the functionality available via blueprints?

#

ah there is a whole channel about oss

#

maybe i should ask there

twin juniper
#

If I create a project with Binary build, can I transfer it to a Source build hassle-free later?

kindred widget
twin juniper
#

Thanks

thin stratus
#

Just the other way round could be an issue if your source build has changes. But that's more or less obvious I guess

twin juniper
thin stratus
#

Yeah

rocky night
#

Better here then, (eXi) here i use this with Multicast.. because the Client needs to tell the box that he is interacting, right? sorry for the mess ( Edit) So the client needs to tell the Server that he is holding the Lootkey which would be on server only..... but the server needs to tel the client what he "looted" so this replication should do it?

eternal roost
#

Hello there, do anyone know if there's a way, when a player press a button, to call a network event on Level Blueprint to play a level Sequence synced for all players?

lunar dirge
#

can someone recommend a tutorial for a dedicated server that will work with UE5 please.

lunar dirge
chrome bay
woeful ferry
#

Hmm, I've set some actors to replicates, but bNetLoadOnClient to false, but they still spawn on the client?

chrome bay
#

bNetLoadOnClient means "don't load as part of the map" - and network system will treat it like a spawned actor

#

Clients will still create it, it'll just be a dynamic network object instead

woeful ferry
#

I need to spawn the actor on server/client because it's a procedural generation game, and I just wanna replicate the seed and let the client also do generation. Then just link the actors up with the names.

#

The actors in this case are points of interests

#

The name part is done, but the client gets duplicated actors

chrome bay
#

Check bNetLoadOnClient then

#

bNetLoadOnClient = false basically tells the server to send a spawn packet for it to the client

woeful ferry
#

It's set to false πŸ˜›

#

That's why I'm confused

chrome bay
#

It should be true

woeful ferry
#

ohh

chrome bay
#

But you also need to fool the engine into thinking it's a network startup actor (i.e, it's stably named)

timid moat
#

Hi!

#

In a multiplayer game, if I want to change a text on a blueprint widget, do I need to changed on the server to let all the players see the change?

#

Thanks!

knotty yacht
#

Anyone with any experience with beacons able to help?
I have two PC's who communicate via beacons to get number of players in a server before joining said listen server, but the connection always fails when connecting the second time.

  • PC -1 "pings" PC-2, ping passes and PC-1 successfully joins PC-2
  • PC-1 disconnects with (execute console command "disconnect")
  • PC -2 "pings" PC-1, ping passes and PC-2 successfully joins PC-1
  • PC-2 disconnects with (execute console command "disconnect")

then

  • PC -1 "pings" PC-2, ping fails and every consecutive ping fails until I shut down the project and start again.

Since OnlineBeacons documentation is...lacking to say the least, I thought someone who already worked with them could maybe help.

plucky prawn
chrome bay
#

E.G, actor components that are part of the CDO can be reached by name, therefore you don't need to create/ack a dynamic GUID for it

#

E.g "this packet is for SomeActorGUID::MeshComponent"

#

Objects placed in the level are stably named for example

#

So each one doesn't have to be individually replicated by spawning a new object, passing the class etc.

#

Any object that the server + client spawn independently outside the networking system, but wants to be referenced on network, must be stably named essentially

kindred widget
#

Also. Hey Jambax. Do you know anything about the weird thing where sometimes if you replicate only one property in an actor component, it won't replicate?

chrome bay
#

hmm no don't think so

woeful ferry
chrome bay
#

It's because it's not stably named - the server thinks it's a dynamic actor

kindred widget
#

Blah. Still curious what caused that. 😦 I had a component I was networking. Had a single replicated TArray. Wasn't working, checked everything. Out of curiosity, added a second replicated uint8, suddenly the array starts replicating fine.

chrome bay
#

Like I said you have to fool the engine into thinking that actor was created as part of the level load

#

And for it to magically "link up" with the client-spawned actor, you also need to guarantee the object names are identical

#

virtual bool IsNameStableForNetworking() const; <- this needs to evaluate to true to stop the server telling the client to spawn a new one

woeful ferry
#

yup, that one is true

#

I spawn the actors on server/client with the same naming rules too

#
                                    SpawnParams.NameMode = FActorSpawnParameters::ESpawnActorNameMode::Required_Fatal;
                                    SpawnParams.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AlwaysSpawn;```
chrome bay
#
{
    return IsNetStartupActor() || HasAnyFlags( RF_ClassDefaultObject | RF_ArchetypeObject ) || bForceNetAddressable != 0;
}```
#

This also needs to be done at a very particular time

#
{
    // Check bNetStartup and also check if this is a Net Startup Actor that has not been initialized and has not had a chance to flag bNetStartup yet
    return bNetStartup || (!bActorInitialized && !bActorSeamlessTraveled && bNetLoadOnClient && GetLevel() && !GetLevel()->bAlreadyInitializedNetworkActors);
}```
woeful ferry
#

I might have found the issue,

#

Gonna check

#

Okay, now I don't get a duplicate and I can interact with it from client to server, but RPCs and variables don't get replicated

#

Atleast some progress

thin stratus
#

Networking and Multiplayer
Iris (Experimental)
Iris is an experimental implementation of a new replication system for Unreal Engine. The goal of Iris is to enable richer multiplayer experiences with larger, more interactive worlds, higher player counts, and reduced server costs. Iris achieves replication performance improvements over the current replication system by:

Unlocking scalability by removing antipatterns that constrain it

Enabling concurrency through separation of replication and game thread data

Improving efficiency by sharing as much work as possible for multiple objects and connections

Iris is an opt-in system and will exist alongside the current replication system for the foreseeable future. Existing game code will continue to work as before. Opting into Iris requires game code to use new engine APIs, however, existing replicated properties and Remote Procedure Call (RPC) definitions in C++ and Blueprints remain compatible.

#

So I assume it will eventually replace the current system

#

@meager spade There is also a new way to repicated subobjects in 5.1. Maybe that can resolve the ASC/AttributeSet issue from runtime spawned/lazy loaded ASCs

chrome bay
#

It doesn't look much different tbh, they're just keeping a list on the actor/component instead of having to subclass and override ReplicateSubObjects

#

Although, you can selectively replicate them now to different connections which is nice

naive dagger
#

hello everyone,
is replicating projectile movement a bad idea ? I did some testing where I tried firing a high fire rate projectile weapon and the bandwidth cost is insane (15 -20 kb/s per player compared to 5 – 6 kb/s for a hit scan weapon with the same fire rate).
I even reduced their lifetimes to 0.2 – 0.8 s and their net update frequency to 30.
Is this to be expected or am I doing something wrong?
thanks

chrome bay
#

Sounds about right tbh. It's not a "bad" idea but every actor has a lot of overhead, takes a lot of effort to squeeze it down.

dark edge
chrome bay
#

A high-rof weapon using actor projectiles is indeed a non-scaling approach though, for sure

dark edge
#

But the minimum amount of data needed to sync will depend on your project and how deterministic your projectiles are

#

If your projectiles don't home or bounce or do anything weird, just syncing the initial conditions can be enough (initial location and velocity)

naive dagger
#

thank you both for responding !

naive dagger
dark edge
#

in that case you're into the Favor the Shooter territory. If you have clientside prediction of movement, you implicitly have a mismatch between what a client sees and what the server sees at any given time

#

There also could be some deviations because of the movement math and different timesteps. Should be small but can grow to be large. You'd want to use analytical math for movement and not Euler

#

Stock projectile uses numeric integration which is great for cool stuff like drag and homing but impossible to make match up exactly without fixed timestep.

#

Depends on what you need really

naive dagger
#

math … very spooky.
I guess Il try to avoid projectiles in high fire rate weapons.

dark edge
#

You can have projectiles

#

Just need to do them differently

#

I have a projectile system that does a line trace per frame based on velocity. It basically "becomes" a line trace weapon if the velocity is set high enough

#

Super simple.

Tick -> Calculate new position -> Trace from OldPosition to NewPosition -> Do Stuff if hit

#

The faster the projectile, the further the new position is from old position. A 100m/s projectile (paintball) would trace 1.5m every frame. A 1200m/s projectile (.50 BMG) would trace 20m per frame

#

so if you're shooting a 50 bmg at a target 10m away, it hits instantly

#

if they're 1km away, it takes 50 frames to get there

#

That's sort of how the projectile movement component works, only it does a movement sweep instead of a line trace

naive dagger
#

also, what bandwidth is considered high for a modern game?

dark edge
naive dagger
fathom aspen
#

Static doesn't mean non-moving in this context πŸ˜„

#

Static means actors that are assigned static net guids

#

For example those that are loaded from package (preplaced actors)

#

Correct, which you want to avoid.

#

The how involves tricking the engine into thinking that actor was loaded from package

#

Basically overriding IsFullNameStableForNetworking to return true and making sure bNetLoadOnClient=true and bNetStartupActor=true

fathom aspen
#

Trademark

dark edge
#

I've been trying to do these jokes for ages but haven't got it to work

fathom aspen
#

Right. While it sounds not that maintainable approach, it will end up saving you a lot of precious server cycles

naive dagger
fathom aspen
dark edge
#

β„’

#

i did it

#

I tried copying the unicode before and that didnt work

#

:r:

#

:R:

#

hmm

fathom aspen
#

It doesn't work for anything not a tm

naive dagger
#

So to elaborate more on my question. What bandwidth is considered bad for a 40 player battle royal game

dark edge
#

so anything within a 10x either way of that

naive dagger
dark edge
#

Starbase uses near that. Well it did when ppl played it.

#

it all depends on the game

#

thats like asking if 10k polys is a good amount for a character. Well, are you making Mario or The Last of Us?

#

Lower is usually better but there's a minimum lower bound depending on what your game is actually doing

naive dagger
dark edge
#

Client data rate

#

so multiply by client count for the servers situation

naive dagger
dark edge
#

Total bandwidth will be something like Clients^SomePower x BaseRate

#

since the more clients, the more stuff going on, making the rate per client higher

#

But if you don't alreay have a working game don't worry about it. You're a long ways off from worrying about bandwidth

#

40 players doesn't have double the bandwidth of 20, it has more than that. It'll depend on if they're all in the same place and relevency etc

thin stratus
#

And how much your game actually replicates

naive dagger
dark edge
#

My tax bill when I'm a billionaire is scaring me too. That'll suck when it happens.

#

lol

#

It's one of them good problems

naive dagger
#

i was testing all of it while enabling network emulation and trying high latency, i just wanted to start optimizing bandwidth use early on rather than late.

naive dagger
thin stratus
naive dagger
glass vector
#

Does onrep notify get called on the server as well? I'm getting conflicting answers on google search

sinful tree
#

In blueprints yes.

#

C++ no, you have to manually call it if you want it to do it.

thin stratus
#

In C++ it's an actual OnRep. It should NOT call on the Server, and local client changes are, I think, also not triggering it.
In BPs, it's a "Property Change" Event. It will call on everyone.

dapper obsidian
#

[UE 5.0.3, Oculus Quest 2] On a dedicated server, should I make the hand spawning happen on the server? Wondering whether to make this RunOnServer+Reliable. I'm trying to adapt Collab Viewer for dedicated server use but whenever I arrive on the server itself, although the head moves, the hands don't and stay stuck at their spawn point.

#

(Pic is slightly outdated, I've given up on trying to make the Controllers themselves replicated.)

thin stratus
#

Pretty sure you always want to spawn the Hands on the Server and make sure they are replicated.

dapper obsidian
#

Thanks, I'll try that then.

#

If it works I'll owe you one.

#

(Well, another one, the first is for the Compendium.)

thin stratus
#

Wouldn't be too sure. I have barely any info on your project :P

#

But the general idea is to spawn the hands on the server

dapper obsidian
#

It's an Unreal ArchViz template that was made for LAN use, but I'm trying to make it work as a dedicated server. Just not sure what to change.

#

So should I make the hands replicated after all?

#

I've read conflicting information about that.

#

Their transforms are already replicated, FWIW.

thin stratus
#

I'm not sure why it would be any different for DediServers

#

Also I don't know the setup, again. I, personally, would handle the the Controller/Hands in their own BP, that is replicated and handles location replication in there.

#

If the template just updates the actors location with some transform in the character, then you might not need to spawn them replicated

#

But ListenServer vs DediServer shouldn't matter here

#

If Clients worked before, then they should still work

dapper obsidian
quasi tide
thin stratus
#

Basically yes

quasi tide
#

Guess I just don't know what limitations the standard ustruct had in comparison

chrome bay
#

None - but try to make a UFUNCTION that takes two different ustruct types. Uh-oh

fathom aspen
#

So it's basically a UHT limitation

quasi tide
#

What? How would that be problematic? That's so strange.

chrome bay
#

As in

virtual void DoSomething(FData& OutData)```
You can't override that in a child class, or a blueprint, to output some other data
#

(that's what my example shows anyway)

#

annewheyyy polymorphism gud basically

quasi tide
#

Hmmm - I'm not following. I wouldn't expect to be able to override that and instead of FData&, it'd be like FNotData&. Unless you're talkin' specifically about inheritance/polymorphism....and you are πŸ˜…

chrome bay
#

Exactly - but then how do you create a something that interfaces with various classes of that object that might want/need different data

quasi tide
#

Okay. So base ustruct polymorphism sucks. instanced struct polymorphism good.

chrome bay
#

base ustruct polymorphism = non existant

quasi tide
#

Which sucks πŸ˜›

#

Okay, I'm trackin' now. A way to have lightweight data containers that support polymorphism now.

chrome bay
#

It just means you can use the same core implementations for different data, without having to f-about with UObjects as the alternative

quasi tide
#

I guess Jambax has found his coroutine πŸ˜…

#

I swear you show the same level of enthusiasm as Laura does for 🎡

#

Found James in the wild

fathom aspen
#

Good catch lol

chrome bay
#

dis me

dark edge
#

what is it

quasi tide
#

Struct that can support polymorphism in UE's reflection system

dark edge
#

ah so I'd probably use it for my vehicle part data

#

instead of
NamesArray, FloatsArray, IntsArray etc

#

when an engine might have torque, rpm limit, etc, while a transmission might have number of gears, gear ratios, etc

quasi tide
#

Yeah.

chrome bay
#

Thanks for coming to my TED talk

pallid mesa
#

Does the "Break Instanced Struct" exist in 5.1?

#

All I saw was this one

#

Kinda equivalent @chrome bay

simple crow
#

if I have an actor component that im running a Multicast Event on, but I want to do a slightly different thing depending on if it's locally controlled or not? (The player's weapon vs someone else looking at that same weapon in third person). I know i can like walk up the chain to find if its a player controller and if its locally controlled, but wondered if i had any easier way to figure it out.. I still get tripped up by Role and RemoteRole 😦

twilit radish
#

I'm still not big brain enough to see the purpose. Cries.

twilit radish
# simple crow if I have an actor component that im running a Multicast Event on, but I want to...

Role and RemoteRole aren't that difficult conceptually. I would highly recommend figuring out how it works so that it makes sense to your self as it's pretty much used for everything in one way or another. What is the part that confuses you?

Also your weapon is likely attached to a pawn I assume? Find a reference to that pawn and simply use IsLocallyControlled on it, you don't need to grab a reference to the player controller for that πŸ™‚

fathom aspen
simple crow
#

if im in an actor component, the first Owner would be the weapon actor woudlnt it?

#

right now its PC>Pawn>Weapon>WeaponComponent

fathom aspen
#

Correct, but why you have that Weapon Component

#

Weapon Actor should be a component

#

Not a CAC god forbid

simple crow
#

no not a child actor. πŸ™‚ Im just trying to be a bit more modular. So my weapon logic is split into components

#

should have described better... PC>Pawn>WeaponActor>WeaponFXHandlerComponent

fathom aspen
#

Then you want to GetOwner twice

simple crow
#

yea, makes sense, just wondered if there was another way. In the future if I have even deeper actor ownership chains, im worried im going to lose track of how many times i need to GetOwner or something.. Maybe a function that keeps calling GetOwner() until the owner is a PC or there is no owner? πŸ™‚

#

(or a pawn)

fathom aspen
#

GetTypedOwner?

simple crow
#

i dont seem to see that, I see GetTypedOuter?

#

or are you suggesting to make one similar to that but for ownership

fathom aspen
#

I'm not sure if Outer is set properly for Actor when attached to other actors/components

#

For comps it works great

simple crow
#

where would i actually assign net ownership, i think this is the first case ive tried to call some multicast events on things that arent directly part of my Character class.

#

I spawn the weapon actor on the server, and "attach" it to my character which im guessing has nothing to do with ownership in this context.

fathom aspen
#

Correct.

#

There is FSpawnActorParams.Owner

#

You need to assign it to your character

simple crow
#

ohh nice! And that grants me the permission to request server events be called on it.

fathom aspen
#

Correct

simple crow
#

Is it viable to call a SetOwner function somewhere else because I actually dont initially spawn the weapon directly to the character. He needs to pick it up first, which is where i want him to become the owner

fathom aspen
#

Of course

#

As long as that's done on the server you're good to go

simple crow
#

ok sweet, thanks so much for answering my questions, its starting to make more and more sense πŸ™‚

twilit radish
#

That will then be 5000 dollars for these 10 minutes. You can pay either with PayPal or Mastercard

#

πŸ˜›

simple crow
#

put it on my tab πŸ˜›

fathom aspen
#

Thanks Thom for reminding me, I keep forgetting to get paid these days

simple crow
#

look for my next AAA title in 2030

twilit radish
#

x)

low charm
#

i'm trying to learn how to make a Multiplayer game for me and my friend and i don't know where to begin can i get some help?

twilit radish
#

I would recommend looking at some of the Unreal docs and pinned messages in this channel to get started, for example:
https://www.youtube.com/watch?v=JOJP0CvpB8w
https://docs.unrealengine.com/5.0/en-US/networking-and-multiplayer-in-unreal-engine/

Also Cedric made an amazing compendium describing a lot of what things are, highly recommended:
https://cedric-neukirchen.net/

An overview of the essential concepts for writing multiplayer game code in Unreal, in under 25
minutes or your money back.

Sample project: https://github.com/awforsythe/Repsi/
Patreon: https://patreon.com/alexforsythe
Twitter: https://twitter.com/alexforsythe

00:00 - Introduction
01:24 - Net Mode
03:33 - Replication System Basics
05:13 - Acto...

β–Ά Play video

Setting up networked games for multiplayer.

low charm
#

thanks a lot

timid moat
#

I'm getting this error: LogNet: Warning: UNetDriver::ProcessRemoteFunction: No owning connection for actor BP_MultiplayerCharacter_C_1. Function Show Players Name On Server will not be processed. But BP_MultiplayerCharacter_C_1 is the player running on the server.

fathom aspen
#

It is because the characters hasn't been possessed yet

timid moat
#

It works in the client but it doesn’t on the server.

fathom aspen
#

My answer still holds tho

#

Chances for this happen is you are firing this server RPC on BeginPlay and that's not good

timid moat
#

No. I’m not doing that. I’m firing on Onrep_PlayerState

fathom aspen
#

That's even worst. OnRep_PlayerState fires on simulated proxies. Server RPCs get dropped on simulated proxies

timid moat
#

Don’t worry. I’m don’t need to do that. Thanks

fathom aspen
#

Anyways if you want to make sure you are firing a server RPC and that you're an autonomous proxy then check IsLocallyControlled before firing that server RPC

sweet ore
#

hi guys. i want to make sure if the client can hack the value without variable by anyway?

#

sorry i'll try to ask again

#

if my client having skin or anything as an attachment. can the client change the value of it and just say hat44 and get the (hat44)

fathom aspen
#

Unless they server RPC and the server approves the RPC with blind eyes

sweet ore
#

thats sad. i thought if i didnt make variable they cant change value lol. anyway thanks you for help

delicate adder
#

anyone know if it's possible to connect to a remote session via e.g. IP address? I assume host needs to port forward the port (17777 default?) but then I'm unsure about connecting as host.

I get if it's not possible, this is just for demo purposes.

I'm using advanced sessions.

Ideally I can call Create Session on one PC, then that person can just DM their IP address to another person who can enter it and Join that session. But I don't see a way to do so.

FWIW I can see the session via Find Advanced Session if it's all done on one PC, and connecting to that session works fine.

fathom aspen
zenith linden
#

Is there a way to select the world you’re in when doing multiplayer in editor? When I hit f8 it puts me in the last clients world.

fathom aspen
#

F8 would just make you "unpossess" your pawn and be able to float around

#

I'm not sure what you mean by select the world

zenith linden
#

The world I’m floating around in is that of client 2 instead of client 1 or the server

#

You can select the world in blueprints when debugging, so I figured there would be a way to do that with editor viewport too.

fathom aspen
#

F8 works only for the client in the editor. AFAIK there is ToggleDebugCamera command which you can run in console command of the client in question

#

I know it's there but it never worked for me. I always get Command not recognized: ToggleDebugCamera when I run it and I never looked much into why that happens

#

Seems like I have to setup something inside something

quasi tide
#

When playing - eject out and go to the world outlier, there should be a dropdown that allows you to select which machine it is showing

fathom aspen
#

But that only shows the actor for that's world outliner. How would you be able to float around in that world (as client)?

quasi tide
#

Honestly haven't tried. Never needed to honestly. So I figured I'd throw that bit of info in, in case they wanted to see specific properties on actors in a specific client's world.

zenith linden
#

Not perfect but that will work

fathom aspen
#

Lol it only works for listen server

#

I think that's part of the cheat manager and I need to load the cheat manager for clients to be able to do it?

#

Lol that was it

fathom aspen
dapper obsidian
# thin stratus Pretty sure you always want to spawn the Hands on the Server and make sure they ...

I tried making the hand-spawning function RunOnServer+Reliable and instead of having unusable hands like before, I now have no hands at all whether or not I make the Controllers replicated, and in the latter case whether without a condition or with the Skip Owner condition. If I make the function RunOnOwningClient+Reliable, the hands spawn but, whatever the replication conditions for the controllers, lie clasped beneath the pawn. What might I be missing?

twin juniper
#

depends on optimization and what you do.

pallid mesa
#

monitor NetBroadcastTickTime in your profiles

#

no

#

i mean, world partition server streaming works

#

but it has a couple of gotchas in terms of net security

#

you can try world partition server streaming in 5.1

#

you only have to turn on a couple of CVars and you'll get it working

#

the server only loads the tiles with a streaming source

#

yeah hang on

#

@manic harbor @normal fulcrum the 4 starting in the line I highlighted

#

bear in mind this is all extremely experimental

#

therefore functional safety isn't totally guaranteed

#

use it at your own risk

#

πŸ‘

thin stratus
keen sigil
#

hi guys i had a problem with steam online subsytem, ​​two friends are connected to the game from different wifi, but we can both use the same character. The same character can play and jump together.
[00:49]
How can my connected friend come to me with a different character?

chrome bay
fossil spoke
chrome bay
#

He did say he was going to, but I guess they got swamped in 5.1 stuff 😦

dapper obsidian
dim trail
#

if im using get hit result under cursor for objects to find an AI under the cursor should it be done on the server?

#

im getting a hit result but breaking it says theres no data for the hit actor

fathom aspen
#

It should be done at the local controller level

#

Server for listen-server, and client for others

#

IsLocalController/IsLocallyControlled should be enough to tell you you're safe to use it

dim trail
#

its running on the client.. any reason why the hit result returns false but the hit actor returns data anyway?

fathom aspen
#

No idea. I would debug the native function to find out. But looking at it, seems if there was no hit then it generates a default hit result.

frail skiff
#

If you have a game that is both singleplayer and multiplayer, do you have to write 2 different implementations for functions that you intend to replicate - the actually replicated ones, and a singleplayer-only version - or do functions that are written to be replicated work even in an offline context where there is no server?

fathom aspen
#

It will just workℒ️

dark edge
frail skiff
fathom aspen
#

Real advice based on scientific evidence

#

You're welcome

frail skiff
#

Ah okay, cool

#

So the client basically has authority when there is no server

fathom aspen
#

It's called standalone net-mode then and they have full authority

#

Can't tell if that's an advice or a meme now fr

frail skiff
#

We were talking about a game where you could stack objects like blocks and see if they were supported by other nearby blocks

worthy magnet
#

Why is this not working? Am I missing something? Clicking the FindSessions button always fails. I'm launching 2 standalone windows, but when a player creates a server a debug string gets sent to both windows

oak oracle
#

Hi guys , in order to RPCs to work inside of ActorComponent you don't neccessaraly need to replicated that component right ?

sinful tree
#

The events can still be called, but they won't perform the server->client or client->server logic.

oak oracle
surreal schooner
#

If I wanted to edit the engine so that APlayerController was replicated to all clients, where would I even begin?

woven basin
#

Why would you want to do that though? Seems like the effort of doing that is likely or lead to just multiple issues…?

surreal schooner
#

Fair, but that isn't the question I asked. I understand the potential issues but I'm trying to solve a problem at work

quasi tide
#

Sounds like a terrible solution, but the Controller/PlayerController class would be where I started. GameMode is what spawns the PC so it may also get some networking stuff set there. So you can check there as well.

thin stratus
#

If I want to have a function with two different possible values for Data, how would I know which one I'm dealing with?

#

I couldn't make that bit out from your images.

#

Does the "BreakInstancedStruct" node return "NotValid" if I try to break the "Data" pin to the wrong class?

thin stratus
#

Or you literally are connected and use something that calls on everyone, like BeginPlay, to call your PrintString

#

For Finding Lan Sessions, has that ever worked for you? There are routers who don't support you just using the broadcast IP, which LAN Searches in SubsystemNULL are doing.

thin stratus
# surreal schooner Fair, but that isn't the question I asked. I understand the potential issues but...

Here is the thing though: By not stating why you want to do that you remove the option for us to maybe know of a better way to solve whatever work problem you have. It can totally be that you tunnel vision into replicating the PC to everyone (horrible idea btw), while there might be a way simpler solution. There sits a combined knowledge of multiple decades in this channel, about UE and it's multiplayer framework. So if you can, state the reason. Worst case, people can't help you or even suggest you to... replicate the PC to everyone, best case you get an alternative with less headache.

surreal schooner
#

Basically I'm trying to get online splitscreen. So splitscreen with remote clients. The problem is current splitscreen works only with ULocalPlayer, so I either need to make it work with UPlayer or a subclass of it, or "trick" the engine into spawning ULocalPlayers for everyone in the network, but then I don't know the replication impact of that.

thin stratus
#

Do you mean that you have issues with UEs default implementation for Online Splitscreen?

surreal schooner
#

I'm so sorry, there's already an implementation for Online splitscreen?

thin stratus
#

Online Splitscreen should be support out of the box theoretically

#

UE is already registering Splitscreen Players that a Client brings with them

surreal schooner
#

As ULocalPlayer, yes.

thin stratus
#

I haven't set it up yet, so there might be some initial things, but it should def be supported

surreal schooner
#

But we need to see the "screen" of the other player over the network.

thin stratus
#

Like that prison escape coop game?

#

No Way Out or whatever it was

surreal schooner
#

Cheatscreen was the biggest one I was shown.

#

No Way Out was referenced too, I think.

thin stratus
#

So this isn't about actual Splitscreen players, but about online players that you want the screen from?

surreal schooner
#

Yes.

#

"Screen", but yes.

#

But then it has to go into splitscreen

thin stratus
#

Yeah their camera basically

surreal schooner
#

Right but the built-in splitscreen support is for ULocalPlayer, which gets the view target from the player controller of the local player. Which is where the issue is.

thin stratus
#

Let me have a quick look through the engine to see possible solution

surreal schooner
#

Drawing to render target would murder performance.

surreal schooner
thin stratus
#

No Way Out was done in UE, so can't be that difficult. I doubt they replicate the PC

surreal schooner
#

Do you mean "A Way Out"?

thin stratus
#

Ah

#

Yeah

#

Too many ways out

surreal schooner
#

Right so they're apparently using Remote Play Together

thin stratus
#

Isn't that a Steam thing?

surreal schooner
#

Yep.

#

So they're still using local splitscreen, I'm assuming.

thin stratus
#

That would be weird. I never played that on Steam. Is that a library one can use outside of steam?

surreal schooner
#

I'm not familiar with the library that powers Remote Play Together

#

What I do know is that tying ourselves to that tech wouldn't be acceptable to my client, i.e we can't force people to use Remote Play Together

thin stratus
#

I wouldn't do that either, that's fair

#

Also, even the actual Splitscreen is a performance killer

surreal schooner
#

What I need to do is subclass the GameViewport class that lays out the split screen, override the function that lays out the screen from ULocalPlayers, and find a way to feed it the viewpoint of each player.

thin stratus
#

Yeah that's probably a good approach. And I understand your issue with LocalPlayer.

surreal schooner
#

Right, I think it's just that the further I dive into the functions that make it work, the more classes are required to get it working, all of which come back to ULocalPlayer

#

If memory serves

#

I kinda wiped it after I finished today lol.

thin stratus
#

Probably still worth having it written out here. Who knows what mad-person reads this and actually solved it haha

surreal schooner
#

Yeah, like I said, I wasn't trying to be rude to that person, I think I was just tunnel-visioned at the moment. Sorry @woven basin 😒

thin stratus
#

I wasn't implying that you were rude. Just making sure you open yourself up to help with the actual problem. :P

#

I wonder if one can delegate the data away from ULocalPlayer into APlayerState or similar

#

As you said, GameViewportClient (which you can override without engine changes), has LayoutPlayers, which could be used to get a list of PlayerStates instead of ULocalPlayer.

surreal schooner
#

Or that there was something deeper in that code that made me think I have to use ULocalPlayer

thin stratus
#

Yeah so it fells the data in the ULocalPlayer and later uses that in the SGameLayerManager

#

That is indeed very local driven

#

I wonder if one can just bypass the local functions and simply add ones-own

#

They call UpdateLayout when local players are added and removed. Simple enough to call that for non-local players (or a custom version)

surreal schooner
#

Yeah we're about on the same wavelength right now, I just have to keep trucking away at it.

thin stratus
#

UpdateLayout then calls AddOrUpdatePlayerLayers with an array of GamePlayers

#

That could be changed to an Array of PlayerStates in a custom function.

surreal schooner
#

GamePlayers is ULocalPlayer

thin stratus
#

Yeah I know

#

I'm just saying one could adjust this to use PlayerStates

surreal schooner
#

Is the function that gets it virtual?

thin stratus
#

No, but my current thought is to just put a second solution in parallel to the local stuff

surreal schooner
#

So this was my original idea, just to pass the viewpoint to the player state

thin stratus
#

The actually tricky part is the FPlayerLayer stuff

#

And SPlayerLayer I think

#

I wonder if that's even needed

#

Ah yeah it is

#

Or wait

#

I think that might only be for UI

surreal schooner
#

Yeah it's a mess and I feel weird charging so much an hour to this dude lol

chrome bay
thin stratus
#

Could I put Structs into it that have a common parent, and then break to the parent struct?

chrome bay
#

Yeah that would work

#

The way I implemented the break for the PR should traverse the struct hierarchy, so it's checking IsChildOf rather than IsA

thin stratus
#

@surreal schooner Random.. stupid idea...

#

Spawn a normal Splitscreen Player and map the other Client to it?

#

Basically let the Splitscreen Player spectate the other one

surreal schooner
#

That's what I was thinking

#

But the ULocalPlayer has a validity check that looks for a player controller

#

So unless I can dummy that and it still all works

#

No dice.

thin stratus
#

But does it matter that you have an additional PC?

surreal schooner
#

oh wait

#

"Spectate the other one" hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

thin stratus
#

It's kinda a work around, but I think this mgiht be a lot simpler to create

surreal schooner
#

You might be right.

#

I'll add that to the notes.

thin stratus
#

If that's going to be a solution let me know for my own sanity .D

surreal schooner
#

It's going to be an attempted solution but you've caught me after the workday lol

thin stratus
#

No worries hehe

surreal schooner
#

If we do get it working that way in x weeks I will be sure to ping you

woven basin
hexed pewter
#

I can finally host, find and join session via steam, but it only works when Steam download region is set to exactly the same
country-City. What can you do to make the session searches more global, so I could find session from all over europe?
I'm using listen server

chrome bay
#

You'll need to look at the distance filter

#

I would bet very strongly that it's not exposed in the Steam OSS plugin to gamecode, so you may need to mod the OSS - but nothing new there

hexed pewter
#

Oh, so can I just subclass OSS, or do I have to switch to src build of the engine?

chrome bay
#

Easiest option is copy the plugin out of the engine into your project directory, and modify it there

#

But if you need to make a change to the base OSS, then custom engine it is

#

Unless you also want every OSS plugin in your project

#

Not many folks seem to know but if you copy and engine plugin to your project, that one will be loaded instead. It only breaks when another plugin has a dependency on it

hexed pewter
#

Interesting, thanks a lot

surreal schooner
#

Hey, quick theoretical question. If you move from a main menu map or a lobby with a controller of type, let's say AMainMenuController and you ClientTravel into a map whose gamemode is set up for a controller of type AGameController, and both of them inherit from APlayerController as siblings, how does client travel resolve the difference in classes?

#

Does it not care? Does it just serialize the controller and fkn send it, even if some data is sliced?

chrome bay
#

You get a new controller and AGameModeBase::SwapPlayerControllers is called

#

Pretty sure you always get a new controller anyway

#

See AGameModeBase::HandleSeamlessTravelPlayer

#

That's also what virtual void SeamlessTravelTo(class APlayerController* NewPC); and virtual void SeamlessTravelFrom(class APlayerController* OldPC); are for, to do a handover

surreal schooner
chrome bay
#

You'd have to do some kind of handover yes, I'm pretty sure nothing persists from controllers - you always get a new one

surreal schooner
#

Right so like you said, just hand it off. It's not like the GameInstance.

chrome bay
#

No

#

And also, this only occurs server-side ofc

surreal schooner
#

right

wooden maple
#

Can we do multiplayer in VR? If yes, any guides?

bitter oriole
wooden maple
#

No? Cause your character wont load in the VR. As controllers are different for Oculus?

woven basin
#

(first on my screen) πŸ™‚

#

yep πŸ™‚

#

I'm in Australia - so all our clocks are forward apparently πŸ™‚

bitter oriole
woven basin
#

and Oculus is just a different input controller right? like gamepad, keyboard, mouse etc

bitter oriole
#

I would expect your VR game to work without VR if you want to have normal sales

#

From a business POV

#

So you can simply develop a regular MP title, keeping in mind the VR support

#

It's not like your developers are going to spend all day with a VR headset, you will test it on a screen

woven basin
woven basin
#

oh yeah - i totally dont think it will happen either πŸ™‚ (and nor do I want it to) - but he's trying, thats for sure...

bitter oriole
#

We might all live in a metaverse, but we'll be doing it on normal screens

#

I have two perfectly fine legs right there

wooden maple
#

Ahhhh alright, ill give that a shot then. Its a demo scene which I loaded in a VR Template. Added nav mesh and a pawn. Do i need to load the map in a First Person Template? Sorry newbie at UE

woven basin
#

its probably best to focus on the single player bit and get yourself comfortable there, then branch out into the multiplayer side

bitter oriole
#

I would certainly suggest to avoid either while beginning

#

But hey

wooden maple
#

The VR part is working completely fine, just the multiplayer was an issue. And i was told Multiplayer for VR is different. Ahhh my boss wants VR multiplayer Demo 😩 so gotta do it somehow

bitter oriole
#

Multiplayer is a project-defining feature that essentially bars you from physics, vehicles, non-character moving parts unless you're going to do a shitload more work on them

#

Obviously it's very doable but depending on the game it can be way, way harder

wooden maple
#

Its not a functional Game, just a normal room wherin you can move around in VR and interact with few objects or guns.

#

so i should just start with creating a normal scene with multiplayer and then it should work the same in VR, yes?πŸ‘€

woven basin
#

basically - yes

surreal schooner
#

It's all anyone's hiring for now, though :/

thin stratus
#

There are a lot of multiplayer clients, that is true

#

Usually with quite the high (probably not aware of) requirements in terms of skill level

twilit radish
#

This is clearly why Cedric is swimming in money πŸ˜›

rocky night
#

Hello Guys! Where can i reduce this anim tickrate for multiplayer. I need that if the othe rplayer is further away it doesnt tick 1 so optimized a lower value

#

its bp only project

fathom aspen
#

You will do it soonℒ️ patrick_hehe

fathom aspen
fathom aspen
rugged turtle
#

Anyone tried out the iris stuff?

chrome bay
#

tbh I've never done a PC->PC handover

devout dagger
#

If I have a replicated variable called Var1 ,which I change its value using an RPC, in the OnRep_Var1 function can I change another replicated variable? or do I necessarily have to call another rpc to change that variable?

chrome bay
#

Only ever really have a menu and a game controller at most in a project

fathom aspen
chrome bay
fathom aspen
devout dagger
chrome bay
fathom aspen
chrome bay
#

Yeah it's hard to work out what the question is asking exactly..

#

Not sure what the OnRep part is asking in this case

thin stratus
#

I guess

ServerRPC -> ChangeVar1 -> OnRep_Var1 -> ChangeVar2

split siren
#

I have a timer on server and I would like to start/stop it on server and have client approximately in sync. Since the start/stop (aka restart) can happen in 1 tick, I cannot use something like bool bIsTimerRunning. So I came up with rolling uint8 bTimerState which increases by 1 each time it is stopped/started and rounded up to even or odd number. (even indicates running and odd indicates not running).
It works, but leaves bad taste in my mouth after coding it. Is there any more elegant solution?

chrome bay
devout dagger
#

If I have a replicated variable called Var1 ,which I change its value using an RPC(SERVER), in the OnRep_Var1 function can I change another replicated variable? or do I necessarily have to call another rpc to change that variable?

thin stratus
#

Ints to ensure replication are totally fine @split siren

fathom aspen
#

But as James said properties are changed on server @devout dagger
OnRep is called on client, so you definitely don't want to change it there

thin stratus
#

They are used in the engine too to ensure that stuff is replicating @split siren

chrome bay
#

You should never change replicated variables client-side unless you know what you're doing (usually very special cases, like prediction)

fathom aspen
#

Unless you are predicting you mean πŸ˜›

thin stratus
#

Acutally, adjusting a replicated variable on client side is usually a shitshow

split siren
thin stratus
#

If you do prediction you usally don't even replicate the var

thin stratus
#

There is a C++ override for the RepNotify to ALWAYS call

rugged turtle
thin stratus
#

But in BPs you might be f'd

#

Cause that's a property changed notifier and true -> true is not changed :D

chrome bay
#

BP networking πŸ”«

thin stratus
#

Both works, BP networking might shoot you

chrome bay
#

The absolute genius of Epic choosing two totally different methods for C++ vs BP

thin stratus
#

Also James, small offtopic question, WTF is going on with the Achievements in HLL

chrome bay
#

Because that's not going to confuse people at all

thin stratus
#

Did you peeps have too much free time and fun haha

chrome bay
#

Oh lol.. we're adding new ones for the next update

thin stratus
#

!!!!!!!!!!!

fathom aspen
chrome bay
#

But we don't want people to know what they are, but they can find out anyway by just looking at the metadata.. nobody listens to me πŸ˜„

rugged turtle
thin stratus
#

Looks a bit broken

#

But yeah, I figured. Meta Data it is πŸ•΅οΈ

rugged turtle
split siren
#

While we have such talent in the chat atm, just going to leave this here. https://www.youtube.com/watch?v=zp4TlfZ5YCI

The Guided Hacking UE4 Dumper is finally here! Download link below.
Support us on GH: https://guidedhacking.com/register/
Support us on Patreon: https://patreon.com/guidedhacking
Support us on YT: https://www.youtube.com/channel/UCCMi6F5Ac3kQDfffWXQGZDw/join

Download the GH Unreal Engine Dumper here:
https://guidedhacking.com/resources/gh-unre...

β–Ά Play video
thin stratus
#

Wife has a lot of fun playing it. So you must be doing something right haha

chrome bay
chrome bay
rugged turtle
#

i wish more games adopted multiple people in one tank mechanics it's so much fun

#

honestly the only thing in that game I enjoy

split siren
# thin stratus Lovely

Not saying it is good or bad, just wanted to give you heads up about the tools that exist

#

Wondering how hard would it be to write an obfuscator.

thin stratus
chrome bay
#

Yeah I've seen a lot of these tools already tbh

rugged turtle
#

The real solution to hacking is making it illegal

#

save online gaming

#

by imprisoning the losers

#

😑

chrome bay
#

I'm pretty sure it can only gather "reflected" data types though

#

Which in UE, is most of it tbf

split siren
#

Oh 100%, there was ton of tools over the years, just this one feels very "script-kiddie" friendly

chrome bay
#

Large part of the reason the engine is so easily hackable is because of reflection, and it being notquite open-source

#

That "Memory View" is a good example of why you literally shouldn't trust a damn thing the client machine sends to you (the server)

#

"Just gonna change this float before UE sends it to the server" - uh oh

thin stratus
#

Honestly, if you only send input to the server, you are already quite far with the cheat protection

split siren
#

Never trust a client! #1 Rule of Multiplayer

chrome bay
#

defo

thin stratus
#

I don't think we have anything else that we send to the server

#

Very prediction-heavy though

#

(... reminds me I still have to solve GAS shit)

chrome bay
#

HLL is still exploitable for some things sadly, but some of it is just too mega to workaround

#

Did our best where it made sense though

thin stratus
#

aka ban you

#

If you want to re-buy a game very time, sure

#

And iirc there were some peeps who even got busted big time for selling cheats

chrome bay
#

DW, all the players will blame you, the developer, for being "lazy" anyway

thin stratus
#

Well, aren't you?

chrome bay
#

Then they'll buy a cheat "just to try it" and fuel the market

#

Thus the cycle doth continue...

#

LaZy DeVs

thin stratus
#

Cheaters be Cheaters

chrome bay
#

hackers gonna hax

thin stratus
#

Doesn't matter if Singleplayer, Multiplayer or Chess

rugged turtle
#

yo tbf some of the developers are kinda lazy

chrome bay
#

I've ranted about this, openly to myself, in my house sometimes. Only the cat is listening

rugged turtle
#

like ain't no excuse why people are flying like that

chrome bay
#

shouting at the walls

thin stratus
#

That cat has heard things haha

chrome bay
thin stratus
#

I would assume it's a mix of a lot of things

chrome bay
#

yeah defo

thin stratus
#

Deadlines, expectations, experience

prisma snow
#

Unless it is a small game with very limited resources, the management and development workflow should have those into account

thin stratus
#

It's also a lot of "Is this actually affecting what we earn with the product?"

chrome bay
#

Yeah absolutely

#

bizniz stuff

rugged turtle
#

you know a real weird one is Roblox is like so server authoritative lots of the hacking has disappeared

thin stratus
#

And if you have companies with the experience of "No, it doesn't, it's the loud minority that screams about the minority of cheaters." then you gonna get GTA 5 and Destiny 2

split siren
#

I really wonder how far did Valve get with detecting aim/walls with Machine Learning... It was a big thing like 2 years ago but no update since

prisma snow
#

Devs that need to do features in half the time they need, won't be able to worry about hack prevention

thin stratus
#

They also don't have to deal with it tbh

chrome bay
thin stratus
#

Most if it will clash against the wall of Community Mods

prisma snow
chrome bay
#

It's those false-positives that get you though

#

where someone gets banned for legitimately doing nothing wrong and `gitting gud"

thin stratus
#

Poor Shroud

#

Freaking aimbotter

rugged turtle
#

lol yeah til they make their cheats using datasets of real players just tuning it to be the best

#

lmao

chrome bay
#

always going to be some heuristic involved, and you've got to lean towards the "light" side to stop actual humans getting rekt

thin stratus
#

Bigger companies mostly invest in preventing players from gaining without the company gaining.

chrome bay
#

But the easy stuff like checking a player is firing a wep at a gajjilion rounds a second or from the other side of the map is a good start πŸ˜„

thin stratus
#

E.g. if there are a lot of botters

#

Or when WoW players boost others so blizz can't sell 60€ boosts

chrome bay
#

yeah agreed tbh

split siren
rugged turtle
#

that's why hacking should be illegal

#

I'll become president and solve all issues

#

we should execute them

#

set an example

thin stratus
#

oy oy oy

thin stratus
rugged turtle
#

The real solution to cheating is deleting all forms of games

#

obviously this is the easiest answer to the problem

woven basin
#

as an indie dev - if people start hacking my game to cheat in multiplayer (non-pvp), it means I've sold at least 2 copies, and that is more than I've sold now, so I'll take the win...

thin stratus
#

inb4 game got pirated

#

back to 1 sold copy

#

50.000 players online. 5€ to the dev

rugged turtle
#

refunded on steam lost money on server costs

chrome bay
#

Stadia amiright

#

negative latency achieved via time travel

rugged turtle
#

I tried stadia once on destiny 2

thin stratus
#

That's the trick. You get hired by people to make their game and then not have to worry about it selling or not.

rugged turtle
#

it was so terrible

thin stratus
#

Only shitty if the game goes through the roof

rugged turtle
#

write the core systems so terribly that no one can work on it besides you

thin stratus
#

Free exposure I guess crycat

rugged turtle
#

charge exorbitant fees

#

win-win

thin stratus
#

#sourcetrustmebro

rocky night
thin stratus
#

Did you check the function itself in c++?

rocky night
#

me? no its blueprint only....yea

verbal tendon
#

Seriously though if you're one of the first engineers on a new project and you have the political capital to ... push for documentation.
I'm not sure how this advice goes for places like the US where job security is not part of the dictionary, but new devs will love ya! πŸ˜„

dim halo
#

UMG buttons and widgets don't fire on click, on release, or on pressed events on android multiplayer, but is works fine on PC multiplayer, however, for a reason, this problem is only on android multiplayer.
(or its fire after pressing the button repeatedly)
Does someone have a clue?

fathom aspen
#

Correct, set bNetLoadOnClient to false to if you don't want them to

#

If you're talking WorldPartition I have no clue, I don't use it

#

It is

civic seal
#

Hey guys - question. When the server sets an input vector for a UCharacterMovementComponent but the owning connection has been interrupted, would the server inputs be ignored? I'm trying to understand why my movement components are acting wacky

#

i.e. ignore server inputs

kindred widget
thin stratus
#

In form of acceleration fwiw

quasi tide
#

@surreal schooner Caught up on what I missed last night. You could always try and join Hazelight's discord and ask how they achieved the effect you're going for in A Way Out.

north forge
#

Wondering what the new theoretical maximum player count on a standard unreal server will be with Iris. I can't make sense of the source code but someone told me there is some kind of authorization check that happens for every client in the tick for the default system but not in Iris?

devout dagger
#

I would like to see what this draws, what do I have to do to be able to see what this line of code is drawing?

still arch
#

Question, I have a weapon I want to pick up. When I pick it up and equip it, its visual for all clients except the listenserver.
If I during PIE check the BP_Rifle visible is set to true, and if I flip it it dissapears for the clients, but nothing seems to happen at all for the listen server. Any clue as to why this happens?

fathom aspen
#

Because there is an OnRep being called which you need to call it manually on server

#

OnRep get called only for clients in C++

worthy magnet
fathom aspen
#

So you end up changing the property tied to the OnRep and next line you call the OnRep

worthy magnet
thin stratus
#

Standalone in netmode only means that they are not connected

#

Fully standalone would be, for example, by rightclicking your UPROJECT file and clicking Launch Game twice

worthy magnet
#

Right

#

What setup should I mess with?

thin stratus
#

But to use LAN you don't need that

#

You need to set the SubsystemNULL as default in your ini

#

I don't have a project at hand to show you sadly

worthy magnet
#

No worries

pallid mesa
#

already sent you the CVARs u need to set to get server side streaming working

#

at an actor granularity and for preplaced objects bNetLoadOnClient can help you

#

also you can make something to opt out from world parti

#

setting "is spatially loaded" to false

surreal schooner
quasi tide
#

Aren't you just trying to get the camera though?

#

Because it's also on Console and I find it hard to believe that they would force it there too πŸ˜›

worthy magnet
sharp hound
#

Hi everyone, I have a dedicated server, i want to allow users to change map after they login. I tried with playercontroller ClientTravel, but players cannot see each other. Can anyone help?

ashen pebble
#

I can't get this code to work on any clients, but it works for the server.
Does anyone have a clue to why?
This is in an actor bp and it is set to replicate

dark edge
#

You need something like

Input -> Select UInteract to interact with -> Run On Server Event -> Call the interact

#

OR
Input -> Run On Server Event -> Select UInteract to interact with -> Call the interact

fathom aspen
#

Well the actor is obviously not owned by client so the server RPC will be dropped

fathom aspen
dark edge
#

@ashen pebbleYou need a Client -> Server RPC somewhere in the logic chain between the input and calling the event on that interaction component. Either in the pawn or playercontroller, whichever makes the most sense. Pawn probably.

sharp hound
#

@fathom aspen ok thanks, I'll do further investigations.

ashen pebble
fathom aspen
grave fog
#

How to spown players in deffrant playerstart?

graceful flame
# grave fog How to spown players in deffrant playerstart?

I placed player starts into the level then added a tag for each one so I can designate separate team respawn areas. Then I use get all actors of class (player starts) and can split them based on their tag. Then its just a matter of getting the location of a player start (can be randomly selected from the list, given the specific tag) and used as the location when spawning in a new character.

late compass
#

Is Iris only available when compiling the engine from source?

I tried to force the usage by overriding the target editor options (bOverrideBuildEnvironment) and adding a bUseIris = true, in addition to adding SetupIrisSupport(Target) in the modules, but it didn't work, it gives linking errors. And there is no IrisCore in the Intermediate folder of the Engine. πŸ‘€

Do I need to add anything else or is it really not available yet in the released UE5.1 ver.?

dark edge
fathom aspen
#

I don't think you can use it in the binary just yet.

split siren
#

Are there any docs to Iris yet? It seems like a no-brainer to use when it's ready

fathom aspen
#

None. Don't worry it's not ready yet xD

#

Epic will flood you with docs when it is. Though it's really sad that it's still hard to get it working.

split siren
#

Yeah, looking forward to reading what they did to optimise networking. Though I finally wrapped my head around Replication graph and Fast Paths, hope at least some of it is transferable

prisma snow
#

Is Iris going to replace the current replication under the hood (like Chaos did with Physx) or is more like an alternate system?

prisma snow
fathom aspen
split siren
fathom aspen
#

Much nastier to implement than the other I forgot what it's called path.

#

You can write blog posts on the RG until Epic releases their docs on Iris

grand kestrel
#

If I dare take a break my knowledge is then outdated

fathom aspen
#

As soon as I put my head into mastering one system, another 3 drop

grand kestrel
#

Yup

fathom aspen
#

One must be a multi-tasker with their systems πŸ˜„

prisma snow
prisma snow
woven basin
#

From what we know, does Iris change much of the code though? I.e. I’m starting to write down systems for MP, such as replication and TPCs, are they going to need to be entirely rewritten for Iris?

fathom aspen
#

They will keep working as before

prisma snow
#

Nice. Makes sense, they have tried to mantain stuff as compatible as possible with UE5

fathom aspen
#

I'm not sure I will know the answer, so it's obviously not #multiplayer

fathom aspen
sweet ore
#

is there any good way to test huge amount of non real players to test how many players can server handle? i'm thinking of making ai that run on server as same as players to check what requirments i need for server

fathom aspen
#

Whatever solution you end up with is going to be cloud-oriented

#

But I would be willing to hear other ways too

surreal schooner
#

How do I decrease the "rate" of replication of a variable, or rather to only replicate it when I set it through a function?

I'm using an Alpha to dictate movement of an Actor and it's on tick. But I only want the listen server to replicate it to clients when we have to "reset" the alpha to 0.

#

So that I can get some good prediction even on bad connections

frail skiff
#

Is character movement supposed to be replicated by default or do we have to manually set up replication?

fathom aspen
#

Only then the property will actually replicate

surreal schooner
#

Right, I'll go look that up

#

Seems like what I'm looking for

fathom aspen
frail skiff
#

Hmm, alright. That's what I was seeing when I looked it up as well, but I'm running into an issue where I cannot move the character when I increase the number of players to 2 or more

fathom aspen
#

Then you have changed something you shouldn't have to (not necessarily CMC related)

frail skiff
#

The character moves around fine when I have it set to only one player. But with more than one, they don't actually move. The character seems able to rotate and like it picks up the input for a second, but doesn't go forward or anything. I can open my UI, move the camera, etc

#

just can't actually move

fathom aspen
#

Are you editing the CMC?

frail skiff
#

No, I haven't messed with it

fathom aspen
#

Look into the logs

#

You will definitely see something related to you not be able to move

fossil spoke
fathom aspen
#

Wow the whole automation part is something I have missed

frail skiff
# fathom aspen Look into the logs

Checking, but the only errors I got in the error window that pops up were about some failed IK system I had tried to set up a while back in the animgraph, just deleted that entirely and tried again - this time no errors in the window

#

I'm scrolling through the actual output log now though

#

I have a yellow warning message in there that says LogOnlineSession: Warning: OSS: No game present to join for session (GameSession)

fathom aspen
#

No that's not related

surreal schooner
frail skiff
#

Hmm. I see nothing :/

sweet ore
frail skiff
#

The only thing that looks remotely like an error in the log is "LogSubsystemCollection: Failed to initialize subsystem dependency (WorldPartitionSubsystem)"

#

Ah I just switched the character to the default third person template's character and that one moves though, so it's definitely related to my custom character class

fathom aspen
#

Was gonna say, if you open up a new UE template, things will work as supposed, so it's definitely custom game code related.

frail skiff
#

It's funny, it only happens once the second character spawns in

#

There's a brief second where I can start to move the character, then the second player character spawns in and I can't move it

fathom aspen
#

Probably because you used GetPlayerXXX(0) functions

frail skiff
#

ohshit

#

you might be right

#

I have GetPlayerController blah blah in some of my cpp classes

fathom aspen
#

Butbutbut they are evil

fathom aspen
frail skiff
#

Sadly the network compendium doesn't really clearly address this (and almost makes it sound like it should work?)

#

What's the preferred way to get a player's character in multiplayer?

fathom aspen
#

The compendium doesn't warn you from not using it

#

But it explains it

fathom aspen
#

What class?

frail skiff
#

let me see if I can find an example

#

I have every case where I used that marked with a //TODO to make it mp friendly, since I knew it would eventually become a problem

#

just didn't predict this specific problem lol

fathom aspen
#

Ah you're converting, RIP

frail skiff
#

yeah I am

#

Ha, I'm not that deep into the project yet. There's a lot of stuff I've left for when I got to learning replication knowing that it would be easier to build replicated from the start. I just had a lot of other stuff I needed to learn first before I tackled networking

fathom aspen
#

Really worth the read. Same doc I took the pic from yesterday

frail skiff
#

Alright, will read it, thanks for the link

#

@fathom aspen alright so it's not looking like I have as many of these getplayercontroller statements as I thought I did tbh, but I did find one that's literally just grabbing the playercontroller reference on begin play

#

I mean, if you just want a player's character to grab a reference to its own controller, what's the MP friendly way to do that?

fathom aspen
#

GetController

#

Is one way

#

Though you have to understand that a function like BeginPlay fires on both server and client

silent bramble
#

What Brand is your computer?🐡

fathom aspen
#

So sometimes you want to filter execution and you use HasAuthority @frail skiff

#

But anyways, you don't need to keep a reference in the header

#

If that's a local one then it's fine

frail skiff
#

I did not realize that

fathom aspen
#

That is somehow mentioned in that doc

#

You can check an Actor's network role to see if it is ROLE_Authority or not. This is a useful method for filtering execution in functions that activate on both server and client.

frail skiff
#

nice, going to read that doc just as soon as I hunt down any other getplayercontroller usages and see if that unbreaks movement

#

Hmm. I'm not sure if GetPlayerCharacter is actually the culprit because I think I actually only had it 2 classes, one of which isn't in the level I'm testing on and the other I changed to GetController()

#

I just went through my whole codebase and Ctrl-F'd for "GetPlayer," the only instances were in those 2 classes

fathom aspen
#

Also you said you are doing GetController in BeginPlay

#

That's danger-zone

#

You might not have controller yet

#

And depending on what you're doing with it, it can be a real problem

fervent yacht
#

If(controller)Get Controller πŸ˜‰

#

I'm joking just to be clear.