#multiplayer

1 messages ยท Page 543 of 1

fossil spoke
#

Source Engine isnt UE4 engine lol

unkempt tiger
#

I am only respecting valve more and more the more I try to recreate what they did

chrome bay
#

Also, given that dedicated servers don't (and shouldn't) play animations, limbs are never in the same position there.

#

They can play animations, but they will never be in sync anyway - so it's pointless.

unkempt tiger
#

Welp, I was hoping to send some animation driving parameters and sort that out on the server

uncut pier
#

I have read that Unreal Tournament (which version?) is supposed to have a pretty good lag compensation system, and there was supposed to be some code to look at on a wiki, but the wiki seems to be gone.

chrome bay
#

Won't work

#

Server and Clients all run at different framerates too

fossil spoke
#

@uncut pier The Epic Github has the source for UT

chrome bay
#

UT has a system yeah, it's pretty simple but works.

fossil spoke
#

Its open for you to read.

hearty atlas
#

nice, i'm gonna go check that out later

unkempt tiger
#

god, is this not just crazy limited? I honestly dont get it

chrome bay
#

It's just not neccesary

uncut pier
#

Is it written in UE4?

#

What's not necessary?

fossil spoke
#

It means you arent stuck with an existing system.

#

You make the system yourself.

#

Flexibility.

chrome bay
#

UT and ShooterGame are both UE4 projects yes

unkempt tiger
#

how am I supposed to detect headshots then?

chrome bay
#

You can find the full UT source code on Epic's github for study, and ShooterGame is available through the launcher

unkempt tiger
#

Is it checking the height on the bounding box? Do I trust the client?

chrome bay
#

Trust the client to a limited extent. That's what we do on hell let loose, it works perfectly.

#

You can't accurate garauntee that the head is in exactly the same position on the server as it was on the clenet at any time. In a real-world scenario it's just not going to happen

fossil spoke
#

Do you guys use a bounding box as well on HLL?

chrome bay
#

Nah, I switched everything to projectile weapons so we needed a full lag comp system to go with that.

fossil spoke
#

Ah

chrome bay
#

The travel-time on weapons complicates things massively...

fossil spoke
#

Yeah no doubt

chrome bay
#

long live hitscan ๐Ÿ˜„

fossil spoke
#

Yeah love hitscan haha

unkempt tiger
#

:S

bitter oriole
#

@unkempt tiger You can maintain the transform of each bone of each player's for the past second, on the server, and use that information to decide whether a client actually got the shot. But every shooter today gives large leeway to the client because literally no one wants shots that do not register because ping spiked by 10ms.

#

So what most shooters do is trust the client to some extent

#

Which can be a bounding box etc

#

If you're doing a competitive shooter you already want intense anticheat measures, player reporting, etc...

unkempt tiger
#

I can accep tthis, but what I dont understand is how this scales if you say, have a monster character that's huge, and the differences between hitting an arm or a head are massive

fossil spoke
#

Yeah theres certainly not one final solution.

#

Its a combination.

unkempt tiger
#

Or was it never meant to scale?

#

It's this constant sense of doubt that I have with every line of code I write and it's agonizing

fossil spoke
#

You need to use the tool that best suites the job.

chrome bay
#

The other thing to consider is that usually servers are single-threaded because reasons, and evaluating animations on the servers main thread can dramatically reduce it's performance.

#

You want it doing the bare minimum possible.

unkempt tiger
#

Aye

#

How are cheat proxies handled in this case?

uncut pier
#

Is ShooterGame a simplified example project for learning, or is it good enough to use the way they do things there in a real project? Am I overcomplicating things thinking about lag compensation with rewinding?

unkempt tiger
#

Since cheat proxies bypass anticheats

bitter oriole
#

@unkempt tiger The system I described is not hard, really. You'll have what, 10 collision boxes ? Maybe 10 frames worth storing data for ? When a client shot comes in, do the weapon hitscan for <ping time / 2> ago in that stored data, and check that the claimed hit is close enough to your own simulation.

gusty hull
#

Do montages (and their contained notifies) run on the client for simulated proxies?

chrome bay
#

@uncut pier we used shooter-games built in system for about a year in a live game, no troubles.

#

Hell Ark, PubG and Lawbreakers all used it as a template, so do we

fossil spoke
#

ARK SE used ShooterGame

#

^^^

#

Its a decent template

uncut pier
#

Okay, what am I even doing here? LET'S GO

chrome bay
#

Yeah, it's extremely comprehensive

#

๐Ÿ™‚

hearty atlas
#

๐Ÿ˜„

uncut pier
#

No, seriously though, thanks ๐Ÿ™‚

chrome bay
#

Thank Epic ๐Ÿ˜„

bitter oriole
#

I pinged Vioxtar but it was for Endre I think ? Anyway

unkempt tiger
#

Thanks @bitter oriole I'll look into that

bitter oriole
#

Or not

#

๐Ÿ˜„

chrome bay
#

It's an old sample, but still has a lot of great use

unkempt tiger
#

So what you guys are saying is

#

Dont break your head over re-inventing the wheel

chrome bay
#

yes ๐Ÿ˜„

unkempt tiger
#

use shootergame

#

yes creepysmile

bitter oriole
#

Feel free to do it if it brings real value to your title, but otherwise...

#

Fair warning, SG sucks

#

Coding style wise

chrome bay
#

Of course it depends, nowadays some folks are moving to Gameplay Abilities which is a newer way of doing things.

#

Haha that is true also

unkempt tiger
#

the only thing it brings me is time saving

#

I dont get gameplay abilities lol

chrome bay
#

Yeah GAS is another ballgame entirely...

uncut pier
#

Oh no, this is supposed to be simple, guys. I can't have conflicting information

chrome bay
#

My advice, since I garauntee you'll reinvent your project at least twice anyway - have a look at shootergame for inspiration.

#

Multiplayer games take a short eternity to make, and it does have a lot of useful stuff.

uncut pier
#

Thanks for the advice. What about the coding style is problematic?

chrome bay
#

My biggest complaint is that the UI is all done in Slate, since it pre-dates UMG.

bitter oriole
#

It's basically made for 2013 UE4, with updates to compile on 2020 UE4

chrome bay
#

Yeah ๐Ÿ˜„

bitter oriole
#

And beginners still come here with compiling issues with it

#

You can throw away all of the UI and sessions and probably some other stuff..

#

But, it has working shooting mechanics, so

chrome bay
#

Yeah, I think it's useful for grasping the concepts at least.

#

Wonder if we'll get some sweeeet new samples for UE5.

#

here's the entire paragon and fornite source code bye

hearty atlas
#

i'm going to bookmark that for later ๐Ÿ˜„

chrome bay
#

UT is very much an abomination of a codebase, since it's entirely tailored to that game, but still has some cool stuff. Shame it's basically dead now.

unkempt tiger
#

is it still sensible at all to expect to achieve snapshot interpolation for networked physics? this is the real question

chrome bay
#

never in a million years

hearty atlas
#

yeah, this does look very simple.. it just provided an FVector as a result

unkempt tiger
#

jambax what's the main prevention in your opinion?

bitter oriole
#

@chrome bay People really want the Paragon sources and I'd love to see that tbh, but...

chrome bay
#

@unkempt tiger It's just a huge can of worms.. hard to nail it to one specific thing.

#

I wasted years trying to get networked physics to work nicely, learned the hard way.

hearty atlas
#

has anyone ever seen a codebase that is not an abomination? serious question ๐Ÿ˜›

unkempt tiger
#

what did you learn??

#

That you can't do it?

chrome bay
#

It only really works when you have a very specific setup, like Rocket League

#

and you can afford to rewind the entire physics scene at your whim

unkempt tiger
#

no no no no blobsweatsbutfast

#

are you saying that if I intended my game to have physics actors just like in Source 1 by Valve, I should quit and move to another engine?

chrome bay
#

Chaos has a rewind API now, and Epic are exploring an integration with that and the network prediction stuff but no ETA or defined goals for it yet.

#

I wouldn't expect to see anything for a while, maybe not until UE5 even.

unkempt tiger
#

so do I abandon UE4?

hearty atlas
#

Nice, i was looking at that new prediction plugin, but it scares me.

chrome bay
#

It's what character movement should have been

fossil spoke
#

The prediction plugin will probably ship with UE5 i reckon

chrome bay
#

oh totally

fossil spoke
#

Im looking forward to it haha

unkempt tiger
#

or do I try and handle that huge can of worms

chrome bay
#

I hope UE5 ditches CMC entirely but I expect they'll keep it to let people update easier

fossil spoke
#

Yeah i think it will remain

hearty atlas
#

yeah, it's current state is not ideal; but it says it needs to be optimized.

chrome bay
#

yeah, lots of work to do yet

fossil spoke
#

Someone said that it was hinted on UDN that CMC was going

#

But i highly doubt that

#

If anything it will just be deprecated and never removed.

chrome bay
#

Yeah

fossil spoke
#

Considering they want UE5 to be as easy as possible to migrate to.

#

CMC will still exist.

#

They also claimed that AActor will no longer exist, which was madness...

chrome bay
#

Haha.. hey you never know.

zealous delta
unkempt tiger
#

pretty sure its play as client

#

but thats me guessing

#

it makes sense since there is also a play as listen server

#

in which case youre also playing as the client

zealous delta
#

that image is from the unreal enigne documentation

shy kelp
#

@hybrid zodiac a while you helped me use anim montages in a replicated field. I put the montages in a mutlicast, which I played on server, but the animations are sometimes jittery on the client, this isn't a problem for the server tho. Do you have any idea why?

warped stream
#

that image is from the unreal enigne documentation
@zealous delta
You use the Client thing
Your checkbox is outdated

zealous delta
#

Iยดll try

plush wave
#

Where does SteamUser() come from?

fossil spoke
#

The Steam OSS/ Steam SDK?

unkempt stump
#

hi guys, what is the default port for my multiplayer game when I package it?

#

is it 17777 like in the editor or is it something else?

plush wave
#

Just going over the Steam OSS code... is it like not finished?

fossil spoke
#

Its barebones. Thats why that UWorks plugin thing exists, because the Steam OSS doesnt expose enough.

plush wave
#

Gotcha

#

Curious why Epic didn't really flesh it out more

kindred widget
#

I think I have three separate questions. I've seen a bit of struct nesting lately Like.. Having six total variables in your main struct that makes up the array, but four of those might be hidden inside of a second struct that's within the first. I've been needing to reorganize my inventory system for a better layout so that I have less hassle with designing around it. Right now, It's extremely simple a class(TSubclassOf) and an integer for the count of items. I was getting some stuff from the Class Default Object to populate the other stuff such as the name of the Item, Texture for the inventory. So..

  1. Why do people nest Structs? Is there any backend gain for this or is this just for broad organizational purposes?
  2. Should I keep getting certain things from the CDO like it's name/texture that I don't need to alter? I did this because I assumed that it would be cleaner to transfer just a class variable over network rather then pulling all of those variables out just to place in a struct to transfer. This way the client handles that stuff, less stuff to send I figured.
    3.More of an extremely specific question, but say I end up with a struct of... One Class(TSubclassOf), One Integer, A Float. I feel like that's all I'll need to be able to determine everything if I rely on the DFO to gather the rest of the information... How bandwidth heavy is a TArray of those structs? Say... Max two hundred of them? I'd need to update them semi regularly I think which means replication back to the owner. So I'm wondering how heavy one array of those might be per Fifty on bandwidth usage.
hybrid wren
#

HI there, I'm using a projectile in a multiplayer project, and the projectile is jittering on the client. Even using the double decimal rounding in the replication parameters. So, I unticked replication movement and did it myself using the tick event to store transform when actor has authority, and update the transform when actor is remote. Everything is smooth but I know it's a bad idea to heavily use Tick event and this could lead to network issue. What is the best solution for projectile movement replication ?

kindred widget
#

How fast of a projectile is it?

#

If we're talking like slow homing missile, then replicating is okay, but for general fast moving bullets people don't usually replicate it from what I've seen. In fact there's even a setting to disable the client correction temporarily when dealing with fast objects to keep it from looking jittery.

hybrid wren
#

Fast as fire projectile from a wizard hand lol. So if they don't use replication, what are they using ? tick event as I did ?

kindred widget
#

Things like bullets rely on being spawned in the same place in the same way on all machines. If you want a good feel for the client, most people seem to.. On mouse button down, RPC to server, tell server you want to cast fireball, server makes sure character has the mana or ability ready and if so, multicasts to all clients to cast a fireball at a given location with a given direction. Then it'll rely on the client to tell the server that it hit something but only from the client that casted the fireball initially. On all other clients it'll just hit something and play explosiony stuff, the end. Cosmetics. But the client that originally created the fireball would tell the server what it saw the fireball hit. The server would do some checks. Maybe ask if the fireball 's vectoring was possibly close enough to have hit this target etc. If yes, call the server event apply damage on the server version of the damaged actor and let it handle itself being damaged. Done correctly, most clients will see pretty much the same thing in the end.

hybrid wren
#

Ok, I'm gonna save this whole answer in a sticky note ๐Ÿ™‚ thanks. I'm using the GameplayAbilitySystem so things like mana check etc are already implemented. This whole process is doable for simple projectile, but what about projectile simulating physics ? I saw that physics simulation can be dramatically different between clients even if force / rotation / location are the same. I'm asking cause I do have a Rolling stone ball as one of my spell and so far it's not looking good (and I had to turn off physics simulation)

chrome bay
#

@kindred widget If an array of structs is something that needs to change often, then you should use FFastArraySerializer. By default when a TArray<> changes (or any of it's inner properties), the entire array is replicated.

#

The caveat of FFastArraySerializer is that order is not preserved.

#

So if order is important, you need to add an index property to the struct as well.

#

TSubclassOf is replicated by the classes full path name until a NetGUID is acked for it, so the first time it's replicated it will be costly, after that it'll be cheaper.

eternal anchor
#

@unkempt tiger Idk what you mean by scale, the usuall thing in the case of hit detection per bone./body part/whatever is to trust client

#

Nobody is really complicating it more beyond this point

#

client shoots, and send result to server (which is accurate) because server do not update skeletons (I for example strip animations assets from server entirely).

#

then server do some base verifications (were you here, cloud you rotate so fast, cloud trace hit capsule)

#

since server have pretty limited view of what happen it does limited verification and either accept client result or rejects it entirely

#

in most cases anti cheats will handle most wannabe cheater

#

the cheating problem is vastly overexaggerted by internet biasa

#

bias*

chrome bay
#

Personally I use UObjects for my inventory slots on one project

#

But only because the project in question requires complex subclasses of them.

eternal anchor
#

there is third way

#

polymorphics ustructs

#

with custom serialization (;

kindred widget
#

@chrome bay I'm not sure if I care about order. At least not right now. Out of curiosity. This.. basically sends the client changes to make to the array instead of copying the entire array?

chrome bay
#

Yeah you can do that too

#

@kindred widget FFastArraySerializer only sends the changed items yes

#

But importantly - it sends the entire item each time

eternal anchor
#

I have done it, and I don't recomened it, unless you have really heavy inventory

chrome bay
#

When using a USTRUCT() in an array, you lose the per-property replication.

eternal anchor
#

I turns out custom NetSerialization cannot handle acks/nacks

chrome bay
#

But, if you need an array, you can't do much about that ๐Ÿ˜„

eternal anchor
#

that's non issue

#

you can serialize bits indicating what changed

#

or use NetDetalserialize and go this way (;

chrome bay
#

Yeah you could do, get's more complicated though

eternal anchor
#

yeah, I did it, took me like 1 day

#

but

chrome bay
#

The TL;DR of this is there's lots of ways to approach it ๐Ÿ˜„

eternal anchor
#

I had problem with lost packets ๐Ÿ˜„

#

once bit for delta serialize was written (and didn't get lost), I cloud not resend missing properties because I didn't know if entire struct was acked

chrome bay
#

Ahh yeah makes sense

eternal anchor
#

that information is accessible in engine, and cloud be passed to NEtSerialize.. but it is not ;s

kindred widget
#

I'm sure I'll get around to some serious optimizationing at some point. Right now, I'm just trying to make it work without making it a complete shitstorm. Pretty much all of this is above my head at the moment. I get the concepts, but the specifics still look like hieroglyphics.

chrome bay
#

At the veyr least if you don't care that much about order, or if the array is large and changing often, use FFastArraySerializer

#

Setting that up is pretty straightforward.

kindred widget
#

I'll do that. Order doesn't matter since I'm probably not allowing individual slot placement anyhow. Just a simple.. This component has these items, this component has these items, player wants to move this amount of these items into this container, move the items on the server and replicate the changes, update the UI from new info. I've written a few different sort types already. Might even make tabs for different item types. Not really concerned with having a complex inventory beyond maybe weight management.

#

Hmm. Also just got the idea to add a favorite Items type array to move items to the top of the inventory.

chrome bay
#

Our of interest, what is the float and integer property for?

kindred widget
#

Integer is item count. Float was going to be a durability setting for items that have durability. IE not items used for crafting or consumables.

chrome bay
#

Ok so you can probably move the float onto the item itself right?

#

Assuming the items are objects themselves and not structs

kindred widget
#

Only when it's spawned. The float was to keep it updated when not using the actual actor, since the inventory is based off classes.

chrome bay
#

Right kk

#

You can make big savings by using smaller data-types is basiclaly my point. So if the stack can never be larger than say 255, you can use a uint8 instead of an int32 etc.

#

Or if durability is a range from 0-100%, you can quantize the float into a byte, or perhaps even smaller. Really depends.

wintry bobcat
#

I want to make a multiplayer on a huge map with potential of thousands players joining (even though it wont happen ever, i'd love to entertain the possibility). I've read that built in UE multiplayer is no fit to this task, but someone on forums said that in past years this improved a lot and now its not an issue anymore.
Anyways, my current approach is an external server using Java that can handle all the server side logic, send updates to players etc. But it has a huge downside: I somehow need to use navigation data from UE and I dont know if its even possible to export this ๐Ÿ˜ฆ also, the movement handling is crap, i have to do all predictions and stuff. This whole idea sounds like a reinvention of a wheel to me tbh.
What do you think, should I try to extract the navigation data or it is better to scrap my idea and just use the built in UE multiplayer?

kindred widget
#

That is fair. I didn't consider that I don't really need anything bigger than a byte for a lot of that.

#

@chrome bay Also, what is smaller than a uint8?

chrome bay
#

Nothing :D, but you can pack stuff into bits too remember

#

@wintry bobcat 1000's of players is not happening in UE4.

#

The huge-player-counts-ideas come up here all the time and you'll find nothing but discouragement here tbh. Nobody advises it.

kindred widget
#

Maybe like.. 100 players on a server, and then a third party solution to connect dozens of servers. But you're looking at some severe work even with that kind of style.

chrome bay
#

100 is pretty much the limit for stock UE4 - and that in itself is a huge challenge.

#

Thankfully, Fortnite was popular and Epic did a lot of optimisation work to hit 100.

wintry bobcat
#

I was hoping to avoid using sockets :/

chrome bay
#

Sockets isn't really your issue here.

#

Games that require 1000's of online players usually have to build their own bespoke engine - and you can't have the same quality you get in a game with fewer players.

wintry bobcat
#

I only see the problem in server's ability to hold players and manage packets

chrome bay
#

That's not the problem

#

The problem is executing gameplay code for all those players, and clients doing the same.

#

Put 50 characters into a map for example, and watch your framerate die.

#

Without any networking.

#

I'm sure this is the fourth time this week a huge player count idea game has come up here

wintry bobcat
#

I'm fairly sure you can place 50 characters and not update them every frame

bitter oriole
#

Typical problems of >20 players games :

  • client performance is a huge problem
  • server performance is a huge problem
  • network performance is a huge problem
  • need to have massive commercial success to have one server full at all times
chrome bay
#

I'll just say it, if you want to make an MMO, do not look to Unreal.

#

You will need bespoke tools and architecture to support it.

kindred widget
#

You can actually get up to like 200characters with the default mannequin in a level with okay fps... As long as you nuke their Movement Component and Mesh Component tick rate. Then they just look like little picture flipbooks.

chrome bay
#

That's the default mannequin in an empty level. Add all your other gameplay code on top too...

#

And then your art assets...

#

And complex animations. It adds up quickly.

kindred widget
#

Well, even before that, they look like little twitchy flipbooks. So, still not really a solve. XD

wintry bobcat
#

how can you even make a simple single player experience in unreal then, if it cant render even 20 character models without fps dying?

chrome bay
#

It can

#

But there's a big difference between 20 characters and 100

bitter oriole
#

And a single player game rarely crams more than 20 fully animated characters on screen

fleet raven
#

it's not the rendering that's the issue here

wintry bobcat
#

what is the issue then.
I really had no problem in culling distant players in my java draft so it wont be thousand on a screen ever (even if that many people will join)
cant unreal do the same?

bitter oriole
#

Unreal does the same

#

But if your current prototype supports 1000 fully animated characters with actual players using them and it all goes well, I'd suggest using that tech instead of UE4

#

It's quite well documented that the best UE4 developers struggle to ship 100 players games

#

If your business has such a massive success, your own engine will be cheaper than the 5% royalties after the first million dollar

wintry bobcat
#

maybe the issue lies in update rates? i dont need nearly as much as fortnite has.

#

haha no it will never be a commercial success i dont think so :)
i think there will be 100 players tops but as i said before, i'd like to think that it can hold much more

bitter oriole
#

Well 1000 players would put you in the top 0.5% of Steam games

#

So basically a million sales, something like $10M net gross

#

So surely you plan for that

#

The 100 players threshold is something like the top 4%, IIRC ?

wintry bobcat
#

I look at indie mmo with 1500 online and i dont think those guys have $10M :/

bitter oriole
#

If they have a Steam page it's easy to check !

wintry bobcat
#

no they are no steam

bitter oriole
#

Wow, 1500 players, so probably 500,000 sales, without Steam, that's impressive

wintry bobcat
#

its freemium tho

#

well, I deceived you, its actually 1300 max

#

they got a population tracker

bitter oriole
#

1300 online players is still 100x the average commercial game though

#

Anyway, UE4 won't work for 1000 players, that's for sure. A few very experienced UE4 devs who did ship 100 titles have said as much in the past, including Epic who struggled to reach 100 at all

#

Basically 100 players is already something you need to very carefuly engineer over the years

wintry bobcat
#

I'm just wondering why there is so much of a struggle. Obviously it must be related to complex simulations, precision, tick rate etc. Can't you just disable most of those things if you dont need them?

eternal anchor
#

well

#

once you remove animations

#

and basically leave moving capsule

#

you end up on transform eating cpu time on cache misses

wintry bobcat
#

no why, animations are client side

bitter oriole
#

Typical problems of >20 players games :

  • client performance is a huge problem
  • server performance is a huge problem
  • network performance is a huge problem
  • need to have massive commercial success to have one server full at all times
eternal anchor
#

last time i run profiler

#

on mp server

#

i actually check archives

#

wait second

#

single CMC took 9.7 micro seconds

#

that was on map with nothing but 70 randomly moving AIs

#

consisting of capsule two boxes and two bones

#

add to it some real AI

#

projectiles

#

player which are usually far more complex

#

and at that point server performance is not even an issue

#

you can really cut corners on what is on server

#

but clients will show wave white flag at this point

wintry bobcat
#

@bitter oriole yes I just dont know why server performance need to be such a huge problem, when there are simple games can have up to 1000 players with no lag
@eternal anchor my server on java has no such term as animation so it wastes 0% cpu time on it ๐Ÿ˜ฎ

eternal anchor
#

oo looking ad insights data again

#

I shouyld have disabled tick on skinned meshes on server

bitter oriole
#

@wintry bobcat Maybe they have no lag because they are simple. Like I said, if you want 1000 players, you need a different tech than UE4.

wintry bobcat
#

of course they are simple

eternal anchor
#

I actually never tested like 1000 CMC os moving capsules

wintry bobcat
#

i mean... cant you make a simple game with unreal?

bitter oriole
#

Sure

eternal anchor
#

but I don't think it will as much as performance issue

bitter oriole
#

But then don't use the character class

eternal anchor
#

as simply unreal networking won't handle it

#

Push Model make it somewhat better b

#

but Unreal NEtworking was optimized for sending data fast not lot

bitter oriole
#

Anyway, I've said what I needed to say - 100 is already very hard to reach for real games, 1000 is not possible. You don't have to believe me, feel free to do whatever you like

wintry bobcat
#

Well, I get it. Unreal networking is still not fit for anything thats not shooter game.

bitter oriole
#

Exactly ! It's terrible. You shouldn't use UE4.

kindred widget
#

@wintry bobcat It's not about being for a shooter game. Even in a lot of games where there's thousands of players online, a lot of that is broken up into different instances. A lot of big MMOs even break up stuff like stores. You might have 5 instances of a small store level with 50 players max in each. Each of them is a server executable running. They're all the same level, just that players don't see the players in the other four stores because they're not technically on the same server. Ark sort of did something similar with it's uh... whatever it's called, server clusters or whatever. Allowing travel to specific servers within a cluster that are all ran on the same machine, but different executables running for each map. It's not that it's not possible, just that the engine really wasn't designed for it and it doesn't work out of the box. By the time you strip enough away and handle adding the extra architecture around it to make it all work, you may well find a better solution.

wintry bobcat
#

@kindred widget yes i know of channel/instancing/zoning tech. I dislike this approach tho.
I'll continue improving my solution but I still need to overcome some challenges such as getting navigation data from unreal so i can use it on my server :/

eternal anchor
#

SpatialOS

bitter oriole
#

If you really want your company to go under

#

Worlds Adrift was SpatialOS's showcase game, went under last year with 100,000 sales because SpatialOS was too expensive and a technological nightmare

fleet raven
#

push model is only half the way

#

it could still be so much better

rose egret
#

guys I'm stuck at FP spectator. how should I implement it properly ? ๐Ÿ˜ฆ

#

do I need Replay system ?

chrome bay
#

Just give the player a spectator pawn?

#

There's a function in the gamemode to set a client to a spectating state

#

They just spawn a pawn locally.

unkempt tiger
#

what's a good method for networking timestamps? thinkerang

#

my inner dumbass is telling me to use floats or doubles but surely theres a better way

rose egret
#

I mean a real FP spectator for watching teammate or enemy. that default spectator is not enough alone.
we wrote a basic one but it had lots of problem.
the first problem is I cant tell the UE4 replication system to replicate something if the client is spectating the specified pawn. things like COND_SKipOwner, ..

#

for instance. in my AWeapon I have a replicated BulletCount with COND_OwnerOnly.
beause other clients don't need to know how many bullet I have in my weapon.
but the client who is spectating me should know that .

#

I dunno how to say but something like COND_SpectatorsOnly could help alot ๐Ÿ™‚

chrome bay
#

Well there's nothing you can do about that, if the property only replicates to the owner the other client will never know about it

#

The alternative is to not make the properly Owner only.

#

You can't change property replication conditions at runtime

#

They are defined per-class.

rain coral
#

If a client spawns an actor on their own, it will have the local role authority. But can it possibly get the remote role SimulatedProxy? Not making sense of an error I get

#

I would expect that if a client spawns a local object for themselves, the RemoteRole would be ROLE_None, but it seems to be ROLE_SimulatedProxy

#

If so, how can I tell if an actor is spawned by the client or the server?

chrome bay
#

Hmm I guess you could do IsNetMode(NM_Client) && HasAuthority()

rain coral
#

Ahh, I forget that this IsNetMode exists, thanks

drifting geode
#

Hi can anyone tell me please why replicating this on tick doesn't work? it prints 1 on tick but neither 2 nor 3. (Btw it is activated through a switch not running all the time)

odd iron
#

Hi Guys anyone got an issue with 4.25 when he trying to create a session or lobby ?

#

my engine crashing instantly when i create a session

kindred widget
#

@shut loom I'm no professional, or even elite at it, but as someone who's only been playing around with game design for about seven months I recommend just doing. I spent a couple weeks when I first started following a semi bad tutorial series on making a city builder. Then I spent even longer going back over what I made to try and understand why it all worked. I think that's an important step, going back over it to actually understand it instead of just following the tutorial. As far as Multiplayer specifically, I really urge you to learn the basic single player aspects first. Learning multiplayer really breaks down into three major aspects. Variable replication, RPCs, and understanding the Server/Client dynamic. All three of those are interconnected and requires forethought into implementing ideas over just doing it in a singleplayer game. But back to the original point of just doing, I strongly recommend it. Just recreate some of your favorite game things. You know how they should look, so make them yourself and try to not rely on tutorials too often. Get used to looking up what you need through the API. First make a single player version of it, and then if you're so inclined break it apart and make it work in multiplayer. Do very small simple things first. Then take that experience and start making a small game. I made a little store game where I had to place tables, and then order items to place them on the tables, and flying ships would spawn in and fly to landing pads and land then spawn AI that'll come to the store, browse over stuff and sometimes buy an item. Once all of the AI from a ship returned, it would fly away for another ship to show up. It was a very small game and had no real graphics implemented, but a small personal project like that might help a lot.

unkempt tiger
#

working on networked physics simulation

#

getting some cursed results ๐Ÿ˜„

bitter oriole
#

That your own physics ? ๐Ÿ˜›

hearty atlas
#

just interpolate, it will be fine. ๐Ÿ˜„

unkempt tiger
#

gotta find how to increase the replication frequency

chrome bay
#

So here's a thing, never call SetReplicates() in a constructor...

bitter oriole
#

As of 4.24 it's SetIsReplicatedByDefault or something

unkempt tiger
#

o, you recognized the delay?

chrome bay
#

When you spawn an actor, SetReplicates() will successfully make a call to UWorld::AddNetworkActor(), and it'll be added to replication graph with it's parent classes settings.

#

I was wondering why my actors were being added to rep graph without the right dormancy setting... now I know why

unkempt tiger
#

i still dont know what dormancy is nervouskeke

chrome bay
#
    : Super(OI)
{
    SetReplicates(true);
    NetDormancy = ENetDormancy::DORM_Initial;
}```
#

Rep Graph ends up adding the actor before any serialized properties have been loaded or defaults set... blergh

#

SetIsReplicatedByDefault only exists on components I think... but I can just set bReplicates = true; directly.

#

What a funky bug/non-bug that was

hearty atlas
#

is UCharacterMovementComponent the only model or are there other ones? (other than the Prediction plugin)

unkempt tiger
#

I didnt understand 90% of what you just said jambax blobsweatsbutfast

chrome bay
#

Haha, just sharing. This has bugged me for months.

unkempt tiger
#

oh very good

#

how do I change the replication frequency speed?

chrome bay
#

I think it's responsible for a few issues in this project.. Starting to amek sense now

unkempt tiger
#

these actors are replicating like, every half a second

chrome bay
#

Net update frequency

#

The value is number of times per second

#

Default is 100 which is mental.

unkempt tiger
#

I'm perfomring replication on a component attached to these spheres, do I set the net update frequency on the sphere or on the component?

chrome bay
#

You can only set it on an actor

unkempt tiger
#

oh

chrome bay
#

The components will inherit that

#

As they rep through it

unkempt tiger
#

I wonder if I can do that through Component code

#

GetOwner()->SetNetUpdateFrequency etc

#

ima try

chrome bay
#

You can if you aren't using rep graph, but it sprobably best to just set a default on the actor

unkempt tiger
#

ya it doesnt work

sharp knoll
#

@chrome bay oh thank you! I had SetReplicates in my Weapon constructor...

chrome bay
#

Yeah same ๐Ÿ˜ฉ going to see if epic will warn you when you do it in future. Seems like an oversight

sharp knoll
#

i assume just using bReplicates is the way to go? i couldnt find a SetReplicatesByDefault, or anything similar

chrome bay
#

Yeah it looks that way for the meantime. I was having issues with actors being added to rep graph in the wrong order too, even though one was spawned before the other. Very odd.

sharp knoll
#

omg... that must be why i was having that same bug, holy shit i had to do some wierd workaround for it too

#

The weapon was spawning for the character, before the character was spawning

chrome bay
#

Yep :D

#

Legit same issue here. It was breaking the actor dependency

sharp knoll
#

yeap same. I had overriden OnRep_Instigator, and make sure they would sync after the other loaded

kindred widget
#

Blaah. >.< Why is Int16 not exposed to blueprints.. I don't really want to combine bytes in blueprint. Hey @chrome bay going on my earlier inventory issue, I decided I probably want more than 255 items in a slot. But definitely less than 65000. Would I be better off using two byte values in my struct to send over a int32? Like one byte as a multiplier. Multiply it by 255 and anything over my multiple of 255 spills into the second byte. So.. 260 items would be first byte value 1 second byte value 5?

chrome bay
#

If it's less than 65,000 just a uint16 will do it

kindred widget
#

Problem is that I can't use uint16 in blueprints so I can't add it to my Struct that I'm using to implement the UI.

unkempt tiger
#

kk this is my plan for carrying out my second attempt at replicating a lot of physical actors at once, Ima lay this out for own book keeping but I'll be glad for any input/feedback/ideas:

  1. Every client has a ReplicatorDummy actor 'attached' to his view, which belongs to the client

  2. On the server, the ReplicatorDummy will collect all close enough physical actors' transforms into SubObjects stored in a TArray - this will be done by every ReplicatorDummy (that is, for every client)

  3. Every network update interval, the ReplicatorDummy will send out a Client RPC with the stored TArray (whose data will be compressed/quantized) (which again contains all relevant physical actors' transforms needed for interpolation) to its own owning client - that is a single RPC to every client. Additionally the RPC will also include a timestamp or a deltatime number which the client will be able to use for interpolation. Finally the RPC is unreliable!

  4. Upon receival, the client will store this snapshot in a snapshot history buffer, and every tick he'll blend snapshots - and use the resulting blended snapshot to teleport all actors to their corresponding positions etc etc

#

Gonna start implementing this today and finish it tomorrow, and HOPEFULLY get good results

sharp knoll
unkempt tiger
#

thanks though the replication graph only solves one problem which is to determine networking relevancy

sharp knoll
#

i dunno much about it, the overview of the plugin seems to fit ๐Ÿ˜›

unkempt tiger
#

which is only a part of my solution - which also targets handling lots of data, compressed, at once

sharp knoll
#

gotcha

unkempt tiger
#

what the replication graph does is it determines which actors are relevant to each client in a faster algorithm than a N*K sized loop

#

just to save server CPU time

sharp knoll
#

oh interesting, thanks for explaining that!

arctic willow
#

How do I smooth the LaunchCharacter movement on the Client side?
The CharacterMovementComponent Documentation suggest using RootMotionSource. "Refer to AbilityTask_ApplyRootMotionMoveToForce for a basic example" and I did. The Class uses the struct
FRootMotionSource_MoveToForce : public FRootMotionSource
for that, but I don't want to edit Engine code and create my FRootMotionSource_LaunchForce struct for that LaunchCharacter smooth problem.

Does somebody know an easy solution to that?

The Character should be able to move freely in the air and be effected by gravity, because I heard that RootMotion puts the pawn into a Flying state where he can't change the direction and where gravity is deactivated for that motion.

flint beacon
#

this is probably an easy one. Is it bad form to make RPC calls client to server inside of GameInstance? i need to trigger some GameSession functionality and assumed this was an acceptable pattern.

bitter oriole
#

GI is not replicated

unkempt tiger
#

can I declare/implement/invoke a RPC from an ActorComponent?

#

nvm

#

literally says they gotta be called from actors sad

hoary lark
#

where does it say that?

#

@unkempt tiger

unkempt tiger
kindred widget
#

@unkempt tiger They can be used in Components. The component must be set to replicate and it's owner must be set to replicate and the owner must be owned by the client. Can confirm, am doing it myself.

unkempt tiger
#

Oh sweet

hoary lark
#

lol uedocs

unkempt tiger
#

@kindred widget we're not talking about multicast RPCs right?

#

(since the wiki says those are within an exception)

#

I am interested in non-multicast RPCs

hoary lark
#

yes you should be able to call any RPC from an actor component subject to any regular rules

unkempt tiger
#

epic

#

thanks

#

goes to recreate a class yet again

kindred widget
#

@unkempt tiger What Hojo said. Mine aren't even multicasts. Client to Server RPCs are what I'm using.

unkempt tiger
#

sick

flint beacon
#

GI is not replicated
@bitter oriole solves that

unkempt tiger
#

is there any networked ID for actors I can use?

#

so that if replicated, a receiving client knows to reference a prop with said ID?

#

I found FNetworkGUID

#

But I'm failing to include it and this gets me thinking that this may be a more internal thing

chrome bay
#

There's nothing built-in no

#

network GUID's are unique per-connection.

unkempt tiger
#

oh, thanks

#

yeah I ended up using straight up Actor* for now

#

probably not very bandwidth friendly but that'll come later

meager spade
#

Actor* is cheaper than GUID

#

not sure what you are getting that?

cosmic trail
#

How can we tell when initial replication is first completed? When connecting to the game, I'd like a black screen until everything is replicated before revealing things. Otherwise things seem to pop

meager spade
#

you will have to delay it yourself

#

we call begin play on stuff, and hold the loading screen till everything is done

#

we also randomizer

cosmic trail
#

hmm, but how do I know it's done?

#

have to check everyone's begin play fired?

mystic hull
#

Hello , i have a small question

#

i need help with

#

can anyone help?

meager spade
#

there is no "proper way" @cosmic trail we just issue beginplay, and delay removing loading screen for a second or so

#

haven't found a nice way to do

cosmic trail
#

Ok gotcha thanks Spectrum ๐Ÿ™‚

meager spade
#

we do randomly generated levels

#

so we actually wait till those have finished, then we issue beginplay via the gamemode, then we have to generate the map snapshot for minimap, all this gets hidden behind the loading screen, and only once everything is done, the loading screen gets removed

#

but clients also generate the same random map using a seed, so we actually wait on the server till all clients are done, before we move on

#

quite a complex system but it works

sterile oriole
#

@mystic hull i would ask the question and those that can help and see the question may responed

mystic hull
#

okay.
i was following along Tom Looman's tutorials for multiplayer in Unreal while adding some of own scripting to the side.

so to get the general idea,
each player pawn has a health component and some weapons.
the weapons has a fire fn which is only called by the server, when the cliens wants to fire , it calls server_fire() which does the firing itself.

finally, each player's health component has a fn that will resond to its owner taking any damage ,

MyOwner->OnTakeAnyDamage.AddDynamic(this, &UHealthComponent::TakeAnyDamage);
,

and this binidng is only added if the Role is the server

#

which is all good so far

#

my problem is, if we are running the dedicated server approach

#

the server itself isn't a pawn, so why does the health get updated for the 2 clients

#

i set the health component for the pawns to be replicated, same for the float health

meager spade
#

i am not sure what you are getting at

#

you mean shooting one player, affects both players health/

mystic hull
#

i can screen share the code if that helps

meager spade
#

you do know in dedicated server, there is a pawn right/

#

for each player

mystic hull
#

yes

meager spade
#

so what actually happens

#

it prints Called once twice?

#

the big question is, do you have the pawn in the level (not being spawned but pre-placed in the level)

#

cause that would make sense

mystic hull
#

yes it's printed twice

#

yes , i have 2 player starts

meager spade
#

no i mean does your player exist in the level

#

not player starts

#

and it would be called twice, once for each client

mystic hull
#

no i don't have any pawns except for the 2 players starts

meager spade
#

and you have 2 clients right?

mystic hull
#

yes

meager spade
#

then it will print twice

#

once for each pawn on the server

sterile oriole
#

to answer the "the server itself isn't a pawn, so why does the health get updated for the 2 clients?"
the server is actually playing the game. clients are watching and providing input. Replication is for when data needs to exist on both client/server. The server should make the changes and send info to client through "Replication" and how you set it to send.

mystic hull
#

i am sorry if it's kinda dumb , but i guess i don't really get replication correctly.
my issue is that, why does the server call the begin play of something it doesn't own

meager spade
#

it does own it

#

its a replicated actor

mystic hull
#

because i set the health component to be replicated

meager spade
#

server owns all replicated actors

mystic hull
#

okay

meager spade
#

check this

#

really worth a read

#

to understand UE4 networking

sterile oriole
#

its a little difficult to get your head around it at first, i would watch a couple tutorials that explain and break down replication to help

mystic hull
#

thank you both so much for helping me

meager spade
#

in a nutshell tho, only server can replicate stuff,

mystic hull
#

what you all said helped so much , and i will do the read book

meager spade
#

when you start a game, the server spawns the Players Pawn

sterile oriole
#

client send inputs and request to server

meager spade
#

this is replicated to the client, and becomes an Autonomous proxy on the controlling client, and simulated proxy on non controlled clients.

#

at first its daunting, but once you grasp it, it is easy

sterile oriole
#

server takes the inputs and validates them. runs methods with data, and broadcast back to all clients that need the info to change to new data

unkempt tiger
#

Gah, am I doing something wrong? Every time I try and call an RPC I get this error Failed to find function None in PhysicsReplicator

meager spade
#

movement component (CMC), works a tad different, as clients move locally, and send the stuff to server, and server validates and either accepts the move as succesful, or rejects it which causes the player to revert back (rubber banding as most people call it).

mystic hull
#

okay i will ask a small question to see if i got it correctly (again thank you so much for answering)

if for a stupid reason , i decided to make the health component NOT replicated

#

and a client starts the fire fn, which calls the server_fire()

meager spade
#

then health would never replicate, and no client would know its health value

sterile oriole
#

i would make the Health variable Replicated

mystic hull
#

which applies the damage to the actor

meager spade
#

it would still work from a server perspective, but the client would not know what health he has (for things like health bars, etc)

mystic hull
#

this won't make any effect to the helath, according to the above code snippet , right?

meager spade
#

but why would you not replicate it?

#

it seems like it should replicate

#

and Health should be replicated

mystic hull
#

yes yes , i am just trying to break it so i can understand it better

#

thank you again, i will read the book you provided

#

thanks @sterile oriole and @meager spade

meager spade
#

once you get your head around it, it will make sense

#

don't expect to learn it in a week tho

#

there is a lot to understand

#

(Replication race's, that kinda stuff :D)

mystic hull
#

hahahhaha true, i now have unlimted respect to all the games with netcode

#

even if it's shitty hhahaha

meager spade
#

Unity netcode is worst

#

CryEngine is ok, tho that engine just makes me want to Cry. I think unreal has one of the easiest to understand netcode for an available to general public engine

mystic hull
#

i wrote a python script once to be the server for a unity game once, it was extremely awful expereince ahhha

#

yeah unreal's is clean, but the problem is it's kinda black box-y

#

which sometimes isn't the best thing

meager spade
#

i would also recommend downloading the ShooterGame example

#

as it shows some replication stuff there

sterile oriole
#

im looking for the video ue put out that helps explain it really well and helped me at one point

meager spade
#

altho some stuff in that video, is bad practice ๐Ÿ˜„

#

or is that the new one

sterile oriole
#

its more of the concept that helped me XD

meager spade
#

i remember seeing one where they had replication inside a UMG widget

sterile oriole
#

its their more recent one

meager spade
sterile oriole
#

no this one is where they show the hitching in networking if you do replication wrong

#

i think

#

ive been sitting here scrolling through my youtube history looking for it this whole time from when the original quest was asked XD. had to go all the way back to feb. way to much time spent on youtube

mystic hull
#

thank you so much though <#

#

this will come in handy with the book

#

then i will go complete the course, because honestly there is alot unexplained

sterile oriole
#

Ive been learning by just diving in hard and debugging and pestering kaos every now and then what id mess up XD

unkempt stump
#

anyone know the updated commands for the ` console Open/Connect commands?

#

says they are not recognized

silent phoenix
#

Can anyone help me understand this. Have a dedicated server with world composition. I'm trying to replicate removing foliage. I have it replicated with OnRep. The foliage removes fine. If i disconnect and reconnect it is still gone. But if i leave the tile and come back it is respawns. Can anyone explain what is going on here?

unkempt stump
#

would anyone know why the camera is shaking while playing multiplayer with real players?

#

this doesn't occur in simulation

twin juniper
#

Hi there, I'm working on an advanced spectator system (network camera smoothing, specific replication code, UI). I've seen there's no such thing in the marketplace. On what templates do you want to make it work with? Doing it for third person at the moment.

unkempt tiger
#

Trying to get a server to client RPC to work, and it does if the RPC doesn't take any arguments just fine

#

But it crashes as soon as I pass a even just a float

#

And the implementation

#

All of this on an actor class

#

Is there anything missing?

winged badger
#

looks like you called it on a null PC

unkempt tiger
#

a null PC?

#

As in a client?

winged badger
#

your playercontroller (i assume that is) was null

#

when you called a function on its ref

#

there is nothing wrong with the RPC itself

unkempt tiger
#

Oh.. hmm

#

Where do you think the call on the nulled ref was?

#

Was it on the receiving side, or the sending side?

#

This also makes me question why it worked without an argument, what was different?

winged badger
#

printfloat is i assume a function on the PC?

unkempt tiger
#

its a macro elsewhere

#

To add an on screen message

#

#define printfloat(variable) if (GEngine) GEngine->AddOnScreenDebugMessage(-1, 1.5f, clientservercolor(), FString::Printf(TEXT(#variable ": %f"), variable), false)

winged badger
#

when you call a function on a nullpointer

#

function will work just fine

#

unless it tries to dereference this

#

then it crashes

unkempt tiger
#

I dont know where it would try to dereference this blobsweatsbutfast

winged badger
#

accessing any member, variable or function

#

clientservercolor() requires GetNetMode() or GetLocalRole()

#

i assume

unkempt tiger
#

It... uh

#

Yes...

#

Yes mhmmrmh

#

thinking intensifies

#

But this is confusing because

#

I was calling clientservercolor before when I didnt pass any arguments, for example

winged badger
#

i also assume you called this very early

unkempt tiger
#

I did, it was about 200 ticks from the start of the connection

#

I called this

#

(Clientservercolor was used there as well)

winged badger
#

compile DebugGameEditor binaries

#

start the game from VS

#

make it crash

#

then check your Locals window

unkempt tiger
#

Alright, let me just find out how to do each one of those steps :D

#

To compile the DebugGameEditor binaries, do I just build the solution with this configuration?

#

K I'm on it.... building / launching is taking a while

#

@winged badger I just rebuilt the solution with the DebugGameEditor configuration and launched through VS, tried to make the game crash (by sending an argument as described) and it WORKED

#

So...

#

ยฏ_(ใƒ„)_/ยฏ

winged badger
#

in your Locals window, whats the value of this?

unkempt tiger
#

Ugh let me check

#

FUCK I just used Alt+F4 isntead of Alt+4

#

am I retarded

#

i'll relaunch ๐Ÿ‘€ I want to die, help, this is taking way too long to relaunch, and load all symbols, please dont go ๐Ÿ‘€, its launching, aaah, now I get why people said C++ dev is slow

thin stratus
#

4.25, 3 Players, PlayAsListenServer: All 3 Windows show "<ProjectTitle> Preview [NetMode: Server] (64-bit/Windows)"
It doesn't say Client0 and Client1 anymore. Can I change that somewhere?

unkempt tiger
#

Zlo, I'll admit I'm not exactly sure how to use the Locals window

#

Should I select some variable of interest in a certain way?

thin stratus
#

Did you already hit a breakpoint?

winged badger
#

there will be stuff there when you crash

#

or when you hit a breakpoint

unkempt tiger
#

Oh I got it, yeah I did

#

I was just being retarded

#

This is what this references

#

I can't seem to crash it because, well the problem is seemingly gone now

#

at least in this build

#

(which is marked red for some reason?)

#

Oh that means the value changed

#

.. I guess I'll just try to rebuild the entire solution again in the normal configuration and hopefully the problem will continue to be resolved

unkempt tiger
#

Conclusion, magically resolved after building the solution itself (rather than just the game project...)

warped stream
#

Can I cast an actor to an interface and pass it over the network? I remember having problems with that, but it doesnt make sense

thin stratus
#

can't you send the actor and then use the interface?

warped stream
#

I have to redesign stuff then. (Edit: Yes I can. Just feels wrong to pass an actor parent ref and cast inside the other method)

#

So theres no way as it looks. The actor cast fails after passing it over the net

#

Like passing 2 objects to a sum method and casting to and integer inside the function

chrome bay
#

Yeah you should just pass the object reference, then have the receiver cast / get the interface at the other end.

#

Casting to an interface doesn't work if you implemented the interface in Blueprint. You have to use Implements<>

warped stream
#

Yes. I fixed it that way^. Thanks

#

I guess internally UE does a network ID lookup to get the right object on the other side, that information gets lost using an interface

chrome bay
#

Yeah, UObjects are the only things which support replication.

winged badger
#

TScriptInterface<T> just silently fails, if you try to replicate it

#

no warning, no anything, just a null on the other end

#

โค๏ธ unreal

chrome bay
#

Ah yeah.. that figures ๐Ÿ˜„

warped stream
#

Was that a design decision or a C++ limitation?

winged badger
#

i imagine there is an entry in some drawer in epic with TODO: make TScriptInterface replicate

#

it does have an object pointer inside of it, so i imagine it wouldn't be all that hard to do

warped stream
#

Something has to implement that interface. I don't exactly how all the UE parenting is done, but UObject sounds pretty high up, atleast above Actor. Atleast it would be possible to cast to an actor. And if that's possible you can pass an interface to an RPC, which internally does a cast and retrieves the information if possible.

winged badger
#

@chrome bay finally got around to implementing NetworkManagers with FastArrays for replicating Actors that no longer need to replicate themselves. Works like a charm ๐Ÿ˜„

warped stream
#

i imagine there is an entry in some drawer in epic with TODO: make TScriptInterface replicate
@winged badger That sounded more like you making fun of me ๐Ÿ˜ฆ

winged badger
#

i wasn't, epic has a huge backlog

warped stream
#

I know I'm joking :3

#

I don't think that they will implement something like that soon unfortunately.

winged badger
#

I now have 16 NetworkManager Actors managing the replication for about 1600 NetAddressable non-replicated Actors

chrome bay
#

@winged badger That's awesome. So the intermediatte actor reps the information for the others?

#

Is this for the procedural generation?

winged badger
#

yeah, syncs them via callbacks, and its procedural

chrome bay
#

nice

winged badger
#

prefab buildings randomly placed on slots

chrome bay
#

does sound useful, even if just to avoid masses of actor channels all being opened at once...

winged badger
#

our bottleneck was the CPU time to evaluate actors for replication

chrome bay
#

Yeah that makes sense.. wonder if Push model would have helped there too

winged badger
#

for this, not really, as this is push by design

chrome bay
#

Yeah sounds good

#

def useful

winged badger
#

fastarrays won't replicate unless explicitly told to

#

took some lying to the engine to get the actors net addressable when procedurally spawned

#

as we let clients spawn the same level with the same seed

#

setting NetStartupActor to true manually and such

#

added preloading of level assets in the lobby

#

takes about 10 seconds to fully generate a 1km squared map over network now

chrome bay
#

That's pretty good tbh.. I'm pooling a bunch of actors for my projectiles atm, they start out dormant which helps a bit but there's still a big spike when they initially get spawned.. slows stuff down a lot.

winged badger
#

you could have a pool of them saved with the level

#

makes them automatically netaddressable, by being loaded from package

chrome bay
#

Ah that wouldn't work for this case, but having some way to spawn actors independently then have them link up automagically would be handy

winged badger
#

we use PreSave a lot

#

to hook up links, setup on level references, turn the editor only marker actors into structs with just data...

#

every time you hit a save on the level, it executes

#

you can spawn them independently as long as you have exact same names on every machine

#

and convince the engine they were are level actors

#

in that case, a static NetGUID is assigned (last bit of the GUID)

#

and when clients receive a static NetGUID, they know they should resolve the NEtGUID, rather then spawn it

chrome bay
#

Nice.. that's good info. I might see if I can trim some fat off of it at some point..

dawn summit
#

Greetings. I have a noob question about User initiated multicast.
How this should be implemented (c++) ?

#

I just need a proper chain of function calls.

bitter oriole
#

What would that be ?

dawn summit
#

@bitter oriole you asking about the specifics?

#

it's a bone simulation switching, that should be visible to all players

bitter oriole
#

Generally multicast is not a great idea

#

How about a client to server RPC and then a simple replicated state?

dawn summit
#

by state you mean repnotify for a property?

#

will OnRep_ function will be triggered on all clients when they are relevant?

#

i.e. to update the state

bitter oriole
#

I never use OnRep, tbh

#

Well, almost never.

dawn summit
#

i'm new to network programming, i've read only about those methods

bitter oriole
#

The important thing is to consider events, vs state

#

Multicasts are used to send one time-sensitive information that needs to be sent to all currently connected players, regardless of how far they are ; they won't be sent to a player connecting 2 seconds later

#

Replication is used to ensure the current state will be copied to other players eventually - new player or not. Maybe one minute later if the player is super far away or the bandwidth is low and this actor not super relevant for him.

#

OnRep is basically just a nice helper to tell the client "new replicated value ready", but it's perfectly possible for the server to set BoolValue from false to true, then from true to false a second later, and the client might never get any onrep

dawn summit
#

hm...i think onrep will work, as i don't need to know if it was in that state, i just need the current state

bitter oriole
#

OnRep is not a replication tool

#

It's just a way to write less code

ocean geyser
#

i havent read the above, but if you just need to know the state of a variable just replicate it?

bitter oriole
#

Basically my point is that most of the time you should use replication

#

You can use OnRep if you don't have a tick

dawn summit
#

jss...i thought OnRep is mandatory for replication -_-

bitter oriole
#

Nope

dawn summit
#

yep, i've checked the ACharacter source...as i have no other examples

bitter oriole
#

It's just a way to call code when the value has changed

dawn summit
#

all replicated variables MUST be set on server only?

#

i.e. i need to call Server_ RPC and let it set the variable?

bitter oriole
#

Yes

chrome bay
#

I use OnRep all over the place personally ๐Ÿ˜„

dawn summit
#

OnRep is called on clients or on server?

chrome bay
#

Clients

#

When they receive a value and it's different to what they currently have.

#

You can flag the property to call the OnRep whenever it's received though too, even if it matches the clients value.

dawn summit
#

how?

chrome bay
#

DOREPLIFETIME_CONDITION_NOTIFY(AHT_Ordnance, ReplicatedOrdnanceState, COND_None, REPNOTIFY_Always);

#

The server will still not send the property if it thinks the client already has that value though.

#

It's mainly useful when you might have a client messing with a replicated property too.

#

(Which you shouldn't really do most of the time)

dawn summit
#

thank you, i've used your example and found a docs page...

dry turret
#

i managed to make my server visible to clients, but when i try to connect via open this message is logged - LogNet: UChannel::CleanUp: ChIndex == 0. Closing connection. [UChannel] ChIndex: 0, Closing: 0 [UNetConnection] RemoteAddr: (ip):7777, Name: SteamNetConnection_11, Driver: PendingNetDriver SteamNetDriver_11, IsServer: NO, PC: NULL, Owner: NULL, UniqueId: INVALID what does that mean?

#

i see it's making a reference to SteamNetDriver which i was told to disable with "bUseSteamNetworking=false" in DefaultEngine.ini in order to be able to connect to the server

deep flare
#

Would anyone here have an idea why HasAuthority() is throwing an unhandled exception for me? It's happening in a common function that is called many times. For context, I'm trying to drop an item from inventory and have it spawn in the world as a new pickup. During the beginPlay phase this function gets called a lot, but only when I go to drop the item does this happen:

bitter oriole
#

You called it on nullptr.

flint beacon
#

hi there. looking for some example code for using UListView from C++. if anyone is aware of a good example id be happy to learn of it.

dawn summit
flint beacon
#

thanks. my brain is just constantly in the MP space.

deep flare
#

@bitter oriole you're right, I figured it out a few minutes later

tight wyvern
#

I know root motion replication isn't officially supported, but can it be done? I've seen conflicting answers across the internet.

warped stream
#

Clients
@chrome bay And server

#

IIRC

#

On rep is called when state is changed.

unkempt tiger
#

what's the best way to display the network's current bandwidth traffic in kbps?

#

I found these counters in stat net but I'm not sure how to interpret them

woven lava
#

Hey does anyone have the Vivox sample project for the plugin? For some reason their samples are dead on their developer portal, and the documentation on Unreal is not very specific on any actual code implementation.

wintry bobcat
#

Yesterday I said that I'm making my own server on Java that can handle many players and I'm basically using UE4 as front-end. My only challenge was that I dont have the navigation data in my app, that I need for things such as AI movement and player position validation.
So I came up with a ridiculous idea: what if I run my whole map renderless on a server machine and connect it with my java app via tcp, then java app tells this program to spawn empty actors and move them around using navigation mesh? Voila, I now know all the places where bots can go, I can even skip the pathfinding.
What do you guys think about this idea? Is this valid plan or stupid, I want to hear honest opinion

hoary lark
#

skimming it, the whole thing in its entirety sounds like you're trying to save $1 by spending $2 to me, but that's about as much intelligent input as i've got

wintry bobcat
#

Why tho? Basically I only add a single socket connection to a ue4 project and in return i dont have to:

  1. think of a way to extract the navigation data
  2. implement pathfinding algorithm
chrome bay
#

@warped stream on reps do not get called on the server.

warped stream
#

Oh, interesting. Okey thanks.

jolly siren
#

Anyone have a AI wander algorithm that doesn't look horrible? I'm debating on using steering behaviors for it, but haven't worked out the wall avoidance yet that will still support walking up ramps.

unkempt tiger
#

a good AI wandering approach is to go to places that are far away from the current position, preferably ones that the actor didnt visit before

#

you can do that by keeping a last-positions buffer, or better yet keep just the last position and use that to calculate a velocity

#

give preference to new positions that are aligned with the velocity normal

jolly siren
#

yeah the main issue I'm trying to solve right now is them wandering back and forth in corners or near doorways. And also not making drastic changes in direction very often.

unkempt tiger
#

that velocity trick can help

#

discourage going back and forth constantly

shrewd tinsel
#

hi can anyone tell me why my variable "PlayerOwnerRef" is null for all clients except server? Vector/Rotator/Struct passes by successfully. thanks

jolly siren
#

@unkempt tiger Would you use something other than GetRandomReachablePointInRadius then?

shrewd tinsel
#

does gamemode own playercontroller?

shrewd tinsel
#

that blasted me way back

#

thanks

jolly siren
shrewd tinsel
#

oh that makes sense!!!

jolly siren
#

yeah it's a handy diagram

shrewd tinsel
#

bookmarked

dawn summit
#

@jolly siren what are those black arrows?

jolly siren
#

Just standard pointers

shrewd tinsel
#

why can't i pass a reference to pawn through multicast?

#

only server has the reference

jolly siren
#

A reference to what?

#

A playercontroller?

shrewd tinsel
#

to pawn actor

#

i might need to put in more thinking into how i do this

#

i feel it might be because im doing it via player controller

dawn summit
#

but references are local entities, isnt it?

jolly siren
#

You have a multicast on a PC?

shrewd tinsel
#

oh they are arent they?

jolly siren
#

That alone doesn't make any sense

shrewd tinsel
#

pc?

jolly siren
#

playercontroller

shrewd tinsel
#

the networking of ue4 hasn't clicked for me yet

#

im trying to spawn a projectile for everyone and then delete it for the person who spawned it

jolly siren
#

PlayerController only exists on the server and the owning client

#

So a multicast on a PC doesn't make sense

shrewd tinsel
#

ok, i get that now

#

the event wont fire for all clients except one and server

#

how can i determine which pawn is which over network?

#

will passing ref like that work?

arctic kiln
#

is it true that when actors become non-net relevant, they basically destroy, and are recreated when becoming relevant again?

#

or is that not accurate

meager spade
#

that correct

#

they destroy and recreate on clients

arctic kiln
#

hmm okay, it's a little confusing to me because i can still see their character meshes when they become non-relevant

#

and when becoming relevant again they basically warp to their actual server location

#

culprit was the "Net Load on Client" bool which is set to true by default for characters

ember cloak
#

trying to run the editor and in debug I get

#

[2020.05.23-01.56.32:250][ 0]LogAudioMixer: Display: Initializing Sound Submixes...
[2020.05.23-01.56.32:251][ 0]LogUObjectGlobals: BeginLoad(/Engine/EngineSounds/Submixes/MasterSubmixDefault) is flushing async loading
[2020.05.23-01.56.32:251][ 0]LogStreaming: Display: Flushing async loaders.

#

why would submixers be flushing?

#

If I remove my asset manager from the ini file

#

it runs

#

I get this

#

[2020.05.23-01.35.58:681][ 0]LogAudioMixer: Display: Initializing Sound Submixes...
[2020.05.23-01.35.58:683][ 0]LogAudioMixer: Display: Creating Master Submix 'MasterSubmixDefault'
[2020.05.23-01.35.58:683][ 0]LogAudioMixer: Display: Creating Master Submix 'MasterReverbSubmixDefault'
[2020.05.23-01.35.58:683][ 0]LogAudioMixer: Display: Creating Master Submix 'MasterEQSubmixDefault'

#

I dont understand why it would stall

kindred widget
#

@shrewd tinsel Typically the practice for creating projectiles is to make the weapon that's firing them do it. You do this by spawning a replicated weapon actor on the server and give it's ownership to a specific client. Because it's replicated, spawning it on the server will create it on all clients but only the client who owns it can call RPCs from it. This allows you to tell the client's version of that weapon that the player wants to fire. The client version of the weapon RPCs to the server version and the server version does checks to make sure it's able to fire, if can fire, multicast spawn projectile.

warped stream
kindred widget
#

@warped stream Editor preferences, or plugins.

buoyant wedge
#

Hello guys. For widgets is better set it on the HUD or in the player controller with bool "is player local controlled!?".

kindred widget
#

@buoyant wedge Not really sure what you're asking. You... want to keep a bool somewhere that tells if the.. player? Is locally controlled? and use it in a widget?

buoyant wedge
#

@kindred widget no. I wanna know for display a widget to all player is better e to set the event on the HUD or in the player controller. I wanna just know the better implementation ๐Ÿ˜Š

warped stream
#

Ohhj thanks

normal jacinth
#

Morning ๐Ÿ™‚ How do you guys handle loading screens? I feel like I'm hacking it right now - creating the screen on the 'BeginPlay' of the map I'm loading, which seems a bit dumb. But I don't know which other class to put the create and destroy widget on.

shrewd tinsel
#

@warped stream ElectronicNodes plugin

#

@kindred widget thanks for explanation. doesn't that mean that player fires bullet after some milisecond delay after getting confirmation from the server?

thin stratus
#

Yeah it will be based on their ping

#

You can also predict the shot on the local client and only use the multicast for the remote clients

#

But it all needs some fixing at some point, cause your projectiles will never be aligned this way

#

It might be the easiest to spawn a replicated projectile on the server and let the projectile movement Component do the rest

#

In cpp you could set the Interpolated component of the movement component to the mesh of the projectile, then it should look smooth even when being correctly slightly

normal jacinth
#

I'm having an issue with creating a session after you've been kicked from one (server disconnects). It works it the client leaves manually because I can run Destroy Session. But how do I handle being kicked? Where can I place the Destroy Session node?

shrewd tinsel
#

@thin stratus do you think spawning an unreplicated visual representation of projectile for everyone locally is a bad idea?

#

i noticed replicated projectile movement is jerky

fleet viper
#

ummm what did the devs think when they changed the launching method in 4.25?? How am i now supposed to debug and see how server and client react to things

thin stratus
#

@shrewd tinsel it is jerky if you dont set the Interpolated component

#

@fleet viper ?

fleet viper
#

@thin stratus

thin stratus
#

The settings support the same they did before

#

Offline starts every player disconnected

#

ListenServer makes rhe first player the host and the rest the clients

#

Dedicated server makes everyone a client and starts a dedicated server.

shrewd tinsel
#

how come run on server RPC doesn't work in gamestate?

#

server never prints

fleet viper
thin stratus
#

That is displaying wrong. That's all

fleet viper
#

ok good

unkempt tiger
#

anyone know whats a best-practice way of creating actors for each player controller, and set their owners to that of the player controller?

#

Creating said actor inside the construction script of a custom player controller class is optional, but feels cheesy

stoic acorn
#

@unkempt tiger, is this for local co-op or network multiplayer?

unkempt tiger
#

network multiplayer

worthy knot
#

add force at location not replicating

#

its on my event tick

versed bear
#

is there any way to give the client total authoritative control over my player's character movement? I want to put less priority on position hack prevention and not have the server freak out every time my player is like 1 inch off of where it's supposed to be. I just want to have smooth movement on the client without having to deal with prediction etc and have the server just accept my client's position.

jolly siren
#

@versed bear ClientAuthorativePosition = true with a high MaxPositionErrorSquared

bronze arch
#

hey guys there is possible to fire a function when a variable is changed? (without replication)

jolly siren
#

Call the function when you change the value of the variable? Not sure what you are getting at

winged badger
#

wonders what this has to do with multiplayer

#

also, don't double post

jolly siren
#

@bronze arch Please only post the same question in one channel. And Zlo is correct, this isn't relevant to #multiplayer

bronze arch
#

I posted 20 min ago and none replied. so I thought it is not related for blueprint channel. thats why I also posted on here.

#

im not spammer so

#

about the question, i wanted to do like how does work onrep variable in multiplayer.

#

but the actor is not replicated so its authorized by owner

winged badger
#

you make a Setter function for the variable

#

you set the value only from inside the setter

#

and call any additional logic you need

bronze arch
#

but the variable is array

#

it add or remove from another blueprint

winged badger
#

then you wrap the Arrays Add function in your custom Add

#

and do the exact same thing

#

or SetArrayElemeent in your custom Set

#

same principle applies, always

#

you also turn the array private so it errors out when you start adding stuff to it bypassing your function

worthy knot
#

I have multicasted my move forward events too

#

and even set all variables to replicate and tested, but nope

#

its not making my car go forward on other clients

brazen wigeon
#

hey guys, new here, hopefully posting in the right category, do you guys have any good tutorial for dedicated servers in UE 4.25 ? It doesnt matter if it involves C++ or not
EDIT: Found some tutorials online, but they are for older versions and since i didnt keep up with the updates i'm going to assume they've changed some things.

worthy knot
#

and if you need the latest server target file, you can take it from Epic Games Shooter Game

brazen wigeon
#

Awesome, i'll take a look, thanks a lot ^_^.

unique basalt
#

Hi guys, testing default movement replication and you can cheat in it just by pressing "enable speedhack" in cheat engine. Whole system itself looks fine, but there are no client input checks and i cant understand where to add them. Maybe anyone done this before? Would appreciate help

bitter oriole
#

You should take a look at how the cheat works, so that you can work on adding countermeasures

unreal pine
#

LogNet: Warning: UNetDriver::ProcessRemoteFunction: No owning connection for actor WB_GameState_C_2147481944 Does this make sense to anyone? I threw some logic onto the gamestate so it properly replicates, but now I'm getting "no owning connection" for my GameState. Am I doing something wrong?

bitter oriole
#

Yeah it makes sense

#

You likely tried to call a RPC on server from the client, on an object not owned by that client

#

Which is not possible

unreal pine
#

So the game state exists on the clients, but is owned by the server

#

so I can't actually call an RPC on the game state from the client?

unique basalt
#

Well, for cheatengine's exact speedhack comparing severtime and clienttime would work, it wont help against clients that sending higher movementvalue than they should, so i must check that on the server every time they send it, but i cant find part where Value is transformed to the FVector_NetQuantize10, which is ServerMove() parameter

bitter oriole
#

@unreal pine Correct, you need to call RPCs on player controller, player state, or pawn

unreal pine
#

Even from the pawn, I've got the same issue though. I've got an RPC set to execute on server only, but when I call it I get LogNet: Warning: UNetDriver::ProcessRemoteFunction: No owning connection for actor OneShotCharacter_C_2147481033

#

(client-side)

bitter oriole
#

Sounds like the character is not currently possessed

unreal pine
#

Word, appreciate the response. I'll make sure the character is possessed, and continue to run these warnings down ๐Ÿ™‚

worthy knot
#

I checked replicate movement, and still the add force at location isnt replicating to other clients

bitter oriole
#

Forces are not replicated

#

Physics are not even really possible to replicate

worthy knot
#

@bitter oriole What? are you sure?

bitter oriole
#

The physics engine is not deterministic, so applying forces on clients is just going to make you end up with completely different scenes.

#

Checking "replicate movement" means the object will teleport to the server location a few times per second

#

None of this is going to give you a playable multiplayer vehicle. You need something more advanced than that

worthy knot
#

Thats really sad to know, I wish they could add such a simple feature.

bitter oriole
#

Nothing simple about it really

worthy knot
#

such a basic necessity

bitter oriole
#

This stuff is just not easy at all. The character movement component in UE4 is like 30,000 lines of C++, and a multiplayer vehicle is not that different. It's worse really since the velocities are so high.

worthy knot
#

If Unreal's Wheeled vehicle could have basic stuff like, surface detection etc, things would be so much better

#

but Nah

bitter oriole
#

Find a game engine that has multiplayer vehicles, I guess. I don't know one, but....

worthy knot
#

I have to create a raycast vehicle from scratch, and i need to network replicate it

#

find another engine? aint nobody got time for that

#

Gotta do things the hard primal way here

#

...like making a car from scratch

bitter oriole
#

Udemy course it is, then !

#

It'll explain how to add multiplayer to a game vehicle from scratch

#

I did that myself, though nowhere near as complex as a wheeled vehicle. Took a few months and it's working well now

versed bear
#

wow these courses seems way overpriced. it's like $250 in my local currency. I guess knowledge is power...

bitter oriole
#

They are 90% off half the time

#

... though honestly the course is very much worth that kind of money

versed bear
#

that's good to hear, I'll bookmark this course in case I want to try it out.

unkempt stump
#

hey guys, does anyone know if there is documentation on how Sets, Arrays, and Maps are replicated? (Are they copied over entirely when replicated or is it by key, index, etc.?)

worthy knot
#

@bitter oriole Torque is also a force movement of physics actors right?

jolly siren
#

@vagrant fjord I think you meant to put that in #cpp

bitter oriole
#

@worthy knot Yes

worthy knot
#

Yeah so that can be replicated

#

force can be replicated

#

Check this

#

The rolling ball template used physics forces, and in the end of the video they showed that they smooth synced the template for MP

bitter oriole
#

Well, go try it

worthy knot
#

I have it already

#

Integrated it, yet no replication

warped stream
#

@warped stream on reps do not get called on the server.
@chrome bay How do you explain this?

#

Maybe thats a blueprint thing

bitter oriole
#

Yes, Blueprint fires OnRep on server too IIRC, contrary to C++ OnRep.

warped stream
#

Well. Thank you

stoic acorn
#

Do you put the creation of HUD and widgets onto the PlayerController?

bitter oriole
#

Put it on HUD

dry turret
#

still can't connect to my server. if anybody would like to help, pm me so i can link you the logs. it seems like the last thing i need to sort out before the game is shippable so i'd really appreciate it

steady dirge
stoic acorn
#

@bitter oriole so If I get this correctly. I'd create a HUD class and put any replicated BP code in there, that will tell each client to create any User Widgets. Is this correct?

steady dirge
#

@brazen wigeon Maybe my previous post is something for you

bitter oriole
#

@stoic acorn HUD is not replicated, and only exists on the client. You should not try to replicate UI.

stoic acorn
#

Not replicate HUD but to control what appears on the HUD. Where do you put that info?

warped stream
#

If its pawn information like health etc, it's fine on the pawn

#

However, you have to make sure that you only update the HUD if its YOUR pawn

chrome bay
#

Blueprint is different and for some reason treats the OnRep callbacks differently to C++

warped stream
#

Thanks yeah. I already got told that

chrome bay
#

Don't really know why they decided to do that tbh, I only ever use CPP for MP

thin stratus
#

@chrome bay Don't think you can manually call OnRep functions in BP. So they probably just made it simpler for BP peeps by just calling it for Server too.

brazen wigeon
#

@steady dirge thanks, but does VS2019 actually work? I've tried using it with the launcher build of UE (C++ Classes) and damn....it has a lot of errors that dont let me build

#

i'm assuming its gonna work for the source version but wanted to check

bitter oriole
#

2019 works fine for launcher builds.

#

Have been using it for the past year or so

brazen wigeon
#

any custom settings tho' ?

bitter oriole
#

Nope

brazen wigeon
#

for me it gives a lot of errors, works fine with 2017 tho

bitter oriole
#

I use Visual Assist for the highlights, but there is no reason for compilation to fail

brazen wigeon
#

yep, installed that one as well

#

ive tried following some tutorials and i cant even #include from "Classes/etc", i need to include starting with "Engine/Classes/etc"

hoary lark
#

probably just missing the module dependency in your build cs

pseudo gull
#

@woven lava send me a pm with your mail and ill send you the sample project

chrome bay
#

Has anybody found that actors that are marked as "Always Relevant" do not stay relevant for clients when they have a low net update frequency?

#

This only occurs with replication graph

#

Legacy driver doesn't have the issue. Even stranger, the actor replicates when I move near the world origin.. even though it's position is nowhere near the origin.

#

If the net update freq is 50Hz or higher, it works fine. Lower than that it stops working.

#

Rep graph is costing me hair lately..

jolly siren
#

"Legacy driver" ๐Ÿ‘€

polar wing
#

I've been having weird issues with rep graph too, just turned it off until I can figure it out a bit better later on.

#

Messed up how my weapons replicate their states for reasons unknown

chrome bay
#

I've run into a lot of interesting edge cases it's not happy about lately.

polar wing
#

Yeah, it seems fiddly.

chrome bay
#

Like you can add a 'Dependant' actor listing between a parent and child, but if the parent is added to the graph after the child, it silently fails to replicate because it doesn't setup the dependency properly

#

It's a pain in the arse when spawning one actor in the BeginPlay() of another

polar wing
#

I'm dreading having to dive into the backend code to modify spatialisation eventually (need a 3D spatialisation scheme)

chrome bay
#

Because the child actors end up being added to rep graph before the parent because of the way SpawnActor() works.

polar wing
#

That's good info to know tho! I feel like that one took some searching to figure out

chrome bay
#

You have no idea ๐Ÿ˜„

#

Learning a fair bit about how sensitive it is to spawn orders and stuff this week

#

And the dangers of calling SetReplicates() in a constructor

#

Legacy doesn't have an issue but Rep Graph is no happy

polar wing
#

๐Ÿ˜ฎ maybe that's my exact issue with the weapons

chrome bay
#

Yeah, whatever you do don't do it

polar wing
#

ok, keep going I'm writing this stuff down

#

xD

chrome bay
#

Just set bReplicates= true; directly

polar wing
#

does that still work in 4.24+? I had the compiler yelling at me about calling it directly when I upgraded

chrome bay
#

It does yeah (for actors anyway)

#

But if you call SetReplicates(), it successfully calls AddNetworkActor() in the constructor and routes it through rep graph before any of the serialized properties have been set

#

So it ends up being initialized with whatever the parent classes settings are

#

Think Epic are gonna add a warning for it now, though they should just skip AddNetworkActor() if it's running at construction time

#

May do a few PR's if they don't

polar wing
#

oooof

#

let's just cancel multiplayer until next year

#

xD

lost inlet
#

4.25 deprecates that in favour of SetReplicatesByDefault

#

which is safe in the ctor

silent phoenix
#

Is there any way to find out a list of players on a world comp tile? Or do I need to implement a system? I was thinking a trigger box and an array of PC's but is there a built in system that I am overlooking?

warped stream
#

How do I return ownership to server?

#

I can just clear the ownership? With set owner to null or so? (Because server can do stuff on it, I just want to clear the ownership from the client)

steady dirge
#

@brazen wigeon VS2019 and UE4.25.0 no problem at all.

grizzled stirrup
#

When searching for sessions with QuerySettings such as SessionSearch->QuerySettings.Set(SETTING_GAMEMODE, InGM, EOnlineComparisonOp::Equals);

#

Does the SearchResults returned filter out any sessions that don't meet that QuerySetting? So in this case only a specific gamemode would return

#

It doesn't look like it filters by default and instead you must do something like:

FString QueryGM;
SessionSearch->QuerySettings.Get(SETTING_GAMEMODE, QueryGM);
FString FoundGM;
CurrentSearchResult.Session.SessionSettings.Get(SETTING_GAMEMODE, FoundGM);
FString QueryCustomCondition;                        
if (QueryGM == FoundGM)
{
  // Join session
}

#

Though I'm probably doing something wrong as it seems it really should filter as otherwise you could get 20 garbage search results that are on the wrong GM and you couldn't join even if there were valid games elsewhere

#

Maybe this is because I'm using the null subsystem and testing on my local machine with multiple instances?

#

Otherwise you'd always get 20 random results that could have terrible ping, the wrong GM and more which would defeat the purpose of setting the queries in the first place

spare skiff
#

For a replicated array, when the server makes a change that affects just a single element in the array (such as modifying, adding, removing), what gets sent over the network? (a) just that single affected element, or (b) the entire array?

ebon nimbus
#

What is the correct way to change a material instance being used in a cascade emitter so that all clients will see it, without a warning?

#

attached to actor's begin play

#

the update

#

the warning

#

it does work, but I know im doing something wrong due to the warning

hardy ferry
#

Anyone know if it's possible to replicate a timer handle without just calling a second timer with another new variable?

#

Initial function is called on server.
Tried doing this.
Did not replicate to client properly. Timer was basically null

worthy knot
#

To those saying physics cant be replicated, the rolling ball template uses AddTorqueInRadians and it certainly got replicated with the SmoothSyncPlugin

foggy hinge
#

Not sure why anyone would say physics can't be replicated?

worthy knot
#

@foggy hinge Exactly like what even? I mean i tried to use AddForce at location to test in multiplayer that didnt work, but I am testing the AddTorqueInRadians on the rolling template and its most certainly working

#

^ At this point im not even sure if this is a hoax or truth, need some admins to answer this for me

foggy hinge
#

Guess that person is wrong.

worthy knot
#

there were like 3 people telling me this

foggy hinge
#

So the nuance is that ideally what you do is simulate the physics on the server and then replicate the results to the client.