#multiplayer

1 messages Β· Page 526 of 1

solar stirrup
#

I wanna have control over when my component gets replicated

fringe sinew
#

Okay so I have a sort of complicated question.

#

In a dedicated server environment, how would I handle the following:
I built a login system that works and authenticates but now after authenticating, I want the client to go to another map. I've only worked with listen servers so I really don't know that much about dedicated servers, what I am wondering is how this would work? How do I make the two clients share the same map? On listen servers, the host is listening for connections after the map is opened with the listen thing, and clients do client Travel to it, in a dedicated server what to do?

rose egret
#

@fringe sinew it depends but usually for dedicated server u have to launch a game server which is not easy. first you have to use services like gamelift, playfab, ...

fringe sinew
#

Hmn.

#

I do know about that but I can also run the dedicated server locally too for testing purposes.

#

All I need to know is how to handle multiple maps ;-;

rose egret
#

ServerTravel

fringe sinew
#

Yeah I did some digging and found that we can only have one map on a dedicated server.

#

Well can we have it like a parent map and many different children maps that can be loaded via level streaming?

ruby meteor
#

My level blueprints BeginPlay node fires not instantly after a client loaded in, but there seems to be a delay corresponding to the clients ping. I tried to use a loading screen, which gets removed after the level loaded, and should be instantly added again, but due to the delay in the BeginPlay node the loading screen dissapears for a few frames

#

Any idea why this is happening, and is there a blueprint that gets loaded instantly so I dont have the delay?

chrome bay
#

@solar stirrup No - components are replicated through their owning actor, so you need to call ForceNetUpdate() on the owner

rose egret
#

how long does it take to execute a shipping-build-dedicated-game-server on a normal PC ? given the assumption level is empty
I am thinking whether my matchmaker should cache ready game servers or not

solar stirrup
#

F

thin stratus
#

@rose egret You want to have idling instances that are ready to move from an empty waiting level to the actual game level.

rose egret
#

@thin stratus yes they are actually waiting in lobby map which is empty. when all users joined then the instance travels to game map.

#

I may also preload assets of the game map in lobby as well. don't know how much it helps

#

how a dedicated server handles assets ?
as far as I know textures and render meshes are not cooked in dedicated server.

twin juniper
#

@thin stratus I had tried to run all the movement through the server for my grappling hook but for some reason the character still glitches back to normal position

thin stratus
#

Shouldn't though, so something is still wrong in your setup

twin juniper
#

Nvm I got it to work thank you @thin stratus

ocean geyser
chilly mason
#

not strictly ue4, but can the same UDP socket on linux not be used to do blocking writes and non-blocking reads?

nimble basin
#

Hi all, is it possible to pass in variables in some way as a connecting client? Say I have a Main Menu that will determine the game mode/map that will be put into play, and I'm connecting to a server as a client. I want them to be able to choose to connect as a Regular Pawn, or a Director Pawn (something like a spectator but replicated so players can see them). Right now I'm passing in the choice with a command line option on clients, but I'd like it to just be two different buttons on the main menu that you can choose as a connecting client. As server I can pass in variables via the open level options string. Is it possible to also pass in variables from client somehow?

empty hamlet
#

Hello! I have no experience making a multiplayer game in UE4, but I'd like to avoid shooting myself in the foot early :)
From the bits and pieces I've seen, there seems to be quite a lot of replication (and perhaps even extrapolation) handled by the engine. I'm making a simple little P2P multiplayer physics-based racing game with full server authority (think micromachines) with custom physics to get my bearings back.

In order to harness the built-in network stuff, does it matter if I use a regular actor instead of a pawn, or should I switch asap in order to avoid issues? Should I look into networking early in general or can I delay that to later when I have a working single player prototype?

#

Another idea I had (wish I fear might be redundant and I doubt is novel) was to use localized authority. Two cars colliding would notify the other car of a contact (forces applied) with a timestamp. The earliest (or only) timestamp would then gain authority for every subsequent interactions between them. This would create a constant authority ordering among players (which could start out with a fully meshed ping contest). It would err on the side of collision but could allow seamless transition when a host leaves and adapt to network disturbances.

Again, no idea whether that's desirable though and how much more of a pain it would be to implement than full server authority πŸ€·β€β™‚οΈ

winged badger
#

unreal has no built-in P2P

empty hamlet
#

@winged badger Sorry maybe peer-to-peer is the wrong word, I meant authoritative client

#

As in, no dedicated server

winged badger
#

thats listen server, its still server auth

empty hamlet
#

Oh yeah listen server, haven't heard that one since my CS1.6 days

#

Well that's what I'm going for anyway, doesn't need to be P2P

winged badger
#

unreal also doesn't do host migration

empty hamlet
#

@winged badger Well that second idea would definitely require a proper P2P implementation, but it's more of an idea I'm toying with, I'd want to set something up with just regular server authority first

quaint spear
#

How much refresh rate is good for server? Especially for big size RTS? Like 1000+ units

chrome bay
#

Massively depends on the game, server hardware etc. There's no one right answer for that.

#

Answer is try it and see

crude drum
#

hello everyone

#

are there any scenario's when multiplayer (replication, rpc's) wont work in VR builds?

chrome bay
#

nope

#

All works the same

crude drum
#

ok

#

i seem to have a problem then

#

because everything works fine if not vr mode

#

but as soon as i switch to vr builds my replication is out the window

#

also any reason i would see an offset in attached actor on server in vr but not in normal mode?

chrome bay
#

Nothing springs to mind unless something is specifically done for VR to work - but generally speaking any and all networking and general gameplay logic is unaffected whether it's VR mode or not

#

So I'd say there's something else at play there

empty hamlet
#

Because I've got the bad habit of making long drawn out preamble that noone cares for and ultimately detracts from the question, I'll just repost here the core questions I asked ealier :D

In order to harness the built-in network stuff, does it matter if I use a regular actor instead of a pawn, or should I switch asap in order to avoid issues? Should I look into networking early in general or can I delay that to later when I have a working single player prototype?

#

And I've made a preamble again.

chrome bay
#

If you want an object that the player controls and moves around, use a pawn

empty hamlet
#

It's a physicsy car

chrome bay
#

Still a pawn IMO.

#

In fact, AWheeledVehicle inherits from Pawn.

empty hamlet
#

Is there any issue to not using a pawn?

#

It's a fully custom physics model

chrome bay
#

Well it's what the gameplay framework expects - and in my experience working against it ends with peril.

empty hamlet
#

just rigid body collision and ray traces

#

Gotcha. Thanks

chrome bay
#

Network roles and the like won't be correct for example, possessing the vehicle is the best way IMO. All my vehicles are based on pawns if it helps (and they also use a custom phys sim)

empty hamlet
#

Roger, do you know if there's a straightforward way to convert a regular Actor to Pawn by any chance?

chrome bay
#

Oh yes

#

Just change

#

public AActor to public APawn πŸ™‚

#

And when you control it, make sure the controller "possesses" it

empty hamlet
#

The C++ code is contained in an actor component, so the actor is a BP one

chrome bay
#

Yeah just reparent the BP to a Pawn

empty hamlet
#

Oh okay, I'll try that out as soon as I get home πŸ™‚

chrome bay
#

Incidentally this reminds me, it will also allow you to use the engines AI system - which expects an AI controller to possess a pawn also.

#

May not matter, but food for thought either way

empty hamlet
#

Might matter πŸ€·β€β™‚οΈ Thanks a ton πŸ™

chrome bay
#

But as you get further in you'll find that players generally have a controller, a pawn and a state - and those three things work in tandem together by design.

empty hamlet
#

@chrome bay I see, by state do you mean a specific object or just the collection of variables in the object?

chrome bay
#

specific object - the player state actor

stable kindle
#

hey hey sorry to bug you again @chrome bay but any reason you can think of as to why the network profiler will be blank on opening a .nprof file 😦

chrome bay
#

No idea sorry. Works okay for me in 4.24

#

Some older engine versions broke it, not sure which ones though.

#

Just make sure it's running in an actual networked instance of the game

#

E.g, press PIE, then start the profile, stop the profile, then stop PIE

stable kindle
#

ahh

#

much apprecieted!

stable kindle
#

@chrome bay 4.22.3 source build had issues.(not sure if it was just our setup or because it was broken anyway) using the .exe from a 4.24 build and managed to profile. Thought i'd let you know. Thanks very much for pointing me in the right direction ^_^

tardy orchid
#

Can someone help please, I can't find a single tutorial on how to do pawn possession in multiplayer

#

I tried 2 different approaches but they both only work on singleplayer

#

I don't know much about that, what I meant by saying different approaches is in one the TP character does the possessing and in the other one the controller does the possesing

#

can u point to any tutorial or documentation for multiplayer possession

#

well just a few days back I managed to launch the server for the first time

#

so umm

#

I'm trying to get in a vehicle

#

without any animations

#

ok thanks for the help

tardy orchid
#

ok thanks, I gotta go now, so I'll look into it later, thanks for all the help, really appreciate it

quaint spear
#

How many ticks per second is good?

#

15 works?

#

20?

bitter oriole
#

Depends on the game

quaint spear
#

If there is more entity like 10000+ units in RTS

#

how much is needed?

bitter oriole
#

In a RTS ? Maybe one ?

winged badger
#

you need to seriously fake stuff to get over 100 units moving around at the same time, at least using CMC

#

and if it can't do a 100-120 FPS on a high end computer, the game might as well not work at all

quaint spear
#

occlusion can work btw

#

like making stuffs not networked when on screen

bitter oriole
#

He's talking about dedicated server tick rate I guess

quaint spear
#

Just for stress test how thing going to be handled

#

for RTS

bitter oriole
#

So which tick rate are you talking about

#

UE4 ticks are basically frames, so you might be talking about clients, the server, or the net update rate

chilly mason
#

this is how daedalic tried to do an rts game in ue4

#

the project got put on hold but they might talk about tick rate etc, can't recall but worth to watch

#

will not work w/ thousands or even hundreds of units imo

mystic patio
#

Hey all! Can someone please remind me what the console command is for displaying character/CMC movement corrections/reconciliations? I've used this 100 times, but right now I'm having one of those moments where I just can't seem to pick the right words for Google to give me the answer I want.

#

Ugh, never mind. Finally found it: p.netshowcorrections 1

chilly mason
#

In a bit of a pickle: I'm sending data from my server to a game client via UDP, using plain old FSocket. The data as captured by wireshark (and ngrep on the server side) looks like this:

tÐ+È<ΒΌYΓ€E 5Ê}@3bSΓ…ΓŽΓ…Γ€Β¨VÎøÞ!ΒΏp1 138.197.206.197 57935|

The payload of which is p1 138.197.206.197 57935|
Now for some reason, Socket->RecvFrom() on the client side seems to be getting p|, which is a message that's been sent several seconds before that, has been ACK'd so it shouldn't ever be appearing in ue4. It certainly is not what's being sent over the network. My question is why.

#

the corresponding ngrep capture is this:

U 138.197.206.197:22222 -> 68.53.95.72:52545 #49
  p1 138.197.206.197 57935|
#

it seems like old data is being returned by Socket->RecvFrom() somehow, like if it's caching it or something

#

to better illustrate

bitter oriole
#

@chilly mason Is the socket newly initialized at that point, before calling RecvFrom ?

chilly mason
#

it's not

bitter oriole
#

I would expect the data to pile on starting from the creation of the socket, until you call RecvFrom

chilly mason
#

I'm consuming data as it comes

bitter oriole
#

So was the undesired message sent before or after you created the client socket ?

chilly mason
#

the flow looks like this:

#
  1. client registers w/ server
  2. server sends list of players
  3. client asks for a new list of players every x sec
  4. server respond w/ list of players
  5. client consumes response
#

(I'm debug logging everything that's consumed by the client as strings)

bitter oriole
#

Alright

#

Sounds like TCP stuff to me but okay

chilly mason
#

udp

bitter oriole
#

No, I mean this should be TCP

chilly mason
#

ah

bitter oriole
#

Anyway, so you then go on to get partial data on one update, then the rest before the other update ?

chilly mason
#

hum? :)

bitter oriole
#

What's the exact issue ?

chilly mason
#

the issue is that the first list of players is empty as the server is not including the querying player in the list and that message seems to be repeating on the client side

#

when calling recvfrom

#

i.e. the first list message is empty

#

p| --> an empty player list

bitter oriole
#

Alright

chilly mason
#

once another client connects, the server now includes that client in the original client's list messages

#

e.g. pStranger 1.1.1.1 12345|

#

messages always start with p and end with |

#

(players are delimited by |)

bitter oriole
#

But you can see the real data on Wireshark ?

chilly mason
#

yes, as in the screenshot above

bitter oriole
#

Alright so what's the code like ?

#

In the receiving loop

chilly mason
#

also in the screenshot

#

at the bottom

#

for now, everything fits inside a single MTU worth of bytes so it's a very simple usecase

bitter oriole
#

Gonna need more context, when does that happen

chilly mason
#

it happens on a simulated tick @ 30fps

bitter oriole
#

So you're reading network data on tick ? πŸ™‚

chilly mason
#
void UHoruNetManager::Tick(const float DeltaTime)
{
    if (KeepAliveTimeLeft < 0.f && Socket)
    {
        printf("keepalive\n");
        KeepAliveTimeLeft = KEEPALIVE_INTERVAL;
        int sent = 0;
        Socket->SendTo(KEEPALIVE_BYTE, 1, sent, *MatchMakerAddress.Get());
    }

    TArray<uint8> data;
    data.SetNumUninitialized(MTU_SIZE);
    int read = 0;
    int sent = 0;

    if (PlayerListPollTimeLeft < 0.f && Socket)
    {
        PlayerListPollTimeLeft = PLAYER_LIST_POLL_INTERVAL;

        // request the player list from the matchmaking server
        if (Players.Num() == 0)
        {
            data[0] = 'l';
            Socket->SendTo(&data.GetData()[0], 1, sent, *MatchMakerAddress.Get());

            Socket->RecvFrom(&data.GetData()[0], MTU_SIZE, read, *MatchMakerAddress.Get(), ESocketReceiveFlags::None);
            FString received = BytesToStringHoru(&data.GetData()[0], read);
            printf("[tick] received: %ls\n", *received);
            if (received.StartsWith("p"))
                OnPlayerListReceived(received);
        }
    }
}
#

it's debug mode, so yes on tick

#

I have a threaded version but I'm not turning it back on until I fix this

bitter oriole
#

Alright, so I don't know if that's the issue but I've never used RecvFrom outside of a while loop on the read size

#

Generally speaking, UDP is entirely unpredictable, and the safe way to read data accurately is one thread, that only does reading (not sending), in a loop, all the time

chilly mason
#

I have a version that does just that

#

the problem is

#

I'm not having issues with the data not being sent

#

which is something I'd understand

bitter oriole
#

Sending isn't a problem

#

Receiving is much harder

chilly mason
#

not being sent [by the server]

#

in other words, if my silly debug tick reader would not be getting packets - that I'd understand

#

but it's getting them and they're "stale"

#

there's no data corruption since both the start char and terminator char are arriving correctly, and in fact the packets contain older messages

#

whereas both wireshark and ngrep are telling me that it's the correct message that's being sent

bitter oriole
#

It's clear to me that the reading code here is the issue

chilly mason
#

well I can try switching the threads back on

bitter oriole
#

That's not even the issue

#

You should however get the incoming size before you read

#

Using HasPendingData

chilly mason
#

ok let me try that

bitter oriole
#

Basically while(haspendingdata(size)) RecvFrom(size)

#

And after the while loop exits, you can decode the data

chilly mason
#

yeah I get the threaded idea

bitter oriole
#

No thread needed for that

#

If you want to read from a socket, you need a while loop

chilly mason
#

same problem w/ haspendingdata

bitter oriole
#

So what's the coede like now

chilly mason
#
            uint32 expected = 0;
            const bool bResult = Socket->HasPendingData(expected);
            if (bResult && expected > 0)
            {
                Socket->RecvFrom(&data.GetData()[0], MTU_SIZE, read, *MatchMakerAddress.Get(), ESocketReceiveFlags::None);
#

hold up

#

replacing the if w/ the while as you suggested fixed it

#

thank you!

bitter oriole
#

Alright

#

Sockets suck, I gave up on them a decade ago after doing too much of that kind of debugging

chilly mason
#

suckets

#
uint32 expected = 0;
            while (Socket->HasPendingData(expected))
            {
                Socket->RecvFrom(&data.GetData()[0], MTU_SIZE, read, *MatchMakerAddress.Get(), ESocketReceiveFlags::None);```
bitter oriole
#

HTTP + JSON is my goto "easily talk to a random server that's 10 lines of Python"

chilly mason
#

this is for a nat punchthrough server/client type of deal hence the use of udp

#

and now it works perfectly, time to turn the threads back on

bitter oriole
#

Cool

chilly mason
#

now to get flatbuffers to work

rotund whale
#

Anyone know how to fix "Failed to create session" when starting multiplayer game? I have online subsystem enabled, steam subsystem enabled, maps added in packaged maps list

#

Ah there was a map I missed, nevermind

tacit sigil
#

Noob question. if i have a map that's configured to, say, "Player State Lobby", and it's a CHILD of "Player State Base", can i still access variables and such from "Player state base" since it's the parent? or am i strictly stuck with what's only in "Player state Lobby"?

bronze arch
#

https://www.youtube.com/watch?v=09yWANtKmC8
after i watched this, i got a new idea about my 1000 players in one map replication.
Can we seperate players to channel? Like you did realize every MMORPG games have a Channels in a map. If one channel reached to 75 or 100(sample) then they loggin to channel 2 or more.
Then servers replicates 75 times instead 1000 times for 1000 players.
Can someone help me for tips how i can seperate players to channels in one map?
Making session or what?

Creating a networked multiplayer game isn't easy, but Unreal Engine's gameplay framework is designed to set you up for success. On this episode of Inside Unreal, Technical Writer Michael Prinke will cover fundamentals such as the server-client model, various features of replic...

β–Ά Play video
rotund sapphire
#

run separate servers (by using load balancing in cloud) and route new players to 2nd, 3rd servers

bronze arch
#

so chat system is will running seperately thread. so they can pm or talk in the same world

rotund sapphire
#

players between servers won't see each other, for the better

bronze arch
#

mean make execute dedicated server seperately ?

rotund sapphire
#

yes

bronze arch
#

then its makes more ports for connecting

rotund sapphire
#

you can open many ports on a fw no big deal

bronze arch
#

as i saw (referring BNS) that using only one ip and port, they looks like changing session for channel in same server executes. Cant we do ?

rotund sapphire
#

they probably have a load balancer that will route your network to a server behind the curtain

#

hence you have one ip:port for accessing but internally it's been rerouted perhaps

bronze arch
#

ohhhhhhh

#

you right

rotund sapphire
#

Or they have an entierly custom server logic that has yet been documented :)

bronze arch
#

its rerouting on server side

#

That makes sense

rotund sapphire
#

But it's not really an issue operating many ports and many addresses for a game

#

Sessions can explain the client where to join

bronze arch
#

i thought that sessions creating a game instance in same server executes

#

well

#

Thank you man

hoary lark
#

1000 players in one map
voxeldeath

rotund sapphire
#

unholy

#

probably the actors should idle a lot, so others can tick. that way you can turn a 30fps server to a 3fps, hosting 10 times as many players.

bronze arch
#

not even small πŸ˜„ my goal is 10k or more players

hoary lark
#

why not 100k i say

bronze arch
#

ehh because need more adversite for 100k players playing at same time

#

so not possible yet

chilly mason
#

you're a nobody under 1M is what I say.

hoary lark
#

why you gotta put me down like that

chilly mason
#

have a million reasons

#

<insert annoying smiley>

rotund sapphire
#

1m peek or 1m sustained?

chilly mason
#

BOTH!

rotund sapphire
#

hard bargain

chilly mason
#

<insert more annoying smiley>

bronze arch
#

would mean that i could reach LOL game Concurrent users pepeYIKES

#

well with load balancing there no problems for limitations

#

gj epic

#

and robert ofc

meager spade
#

wish you luck to get 10k players to play the game let alone connect πŸ™‚ Very hard out there. and i am not being sarcastic or rude. Just wish you the best of luck.

#

Very hard for indie developers unless you have done something no one has seen, and even that is hard :/

bronze arch
#

why hard to get 10k players with load balancing?

#

about server spec limits?

meager spade
#

no i mean to get actual players

#

nothing about the server

bronze arch
#

oh mean advertising

#

ehh i already have 2k players atm without releasing so, if i could more ads and event for more players, and streamer youtuber etc... why not?

meager spade
#

never said you couldn't, just said its really hard

bronze arch
#

imo my game not looks like indie game if you look at from outside

#

yeah in reality its very hard, but if you dont give up, you can do it.

rotund sapphire
#

10k players can potentially result in outputing 750.000 player data over the network. Depending on the tick rate it will generate pretty high output. Just wondering if load balancing is enough or better think about other packet distribution models.

bronze arch
#

yeah before taking a professional developer, i should use smooth sync for decrease bandwidth instead CMC replication. (1x send rate per frame) after selling that game. if i get rich, then i can make my team for developing and optimize more on this game with custom socket distributions

#

even max freq is 10x send rate for all actors in game so

#

there last status optimization for networking in game match. still trying to do reduce

#

yikes

inland sun
#

[HELP] old guy with simple problem yet it eludes me. [blueprints] I want to set a bool variable to true if the player is the host in a session. I can screen share and show what I have. Its got to be a simple issue but its making me angry.

winged badger
#

why? you can just call IsServer from almost anywhere

inland sun
#

trying that as you typed that lol

#

its part of a way the host can promote clients to "moderator" status

raw quarry
#

Anybody have success passing the IP address command line argument to a packaged game executable?

#

I have a separate launcher/matchmaking application and I would like to have the unreal executable connect to the specific ip/game server that is provided in the command line arguments

#

however, I can't get it to respond to any command line arguments at all, even just providing a different default map file

chilly mason
#

@raw quarry for shipping games you have to enable custom maps from the cmd line first // HORU: macro: allow specifying custom map in Shipping builds GlobalDefinitions.Add("UE_ALLOW_MAP_OVERRIDE_IN_SHIPPING=1");

#

put this in your target.cs

raw quarry
#

ah, thanks I appreciate it

rose egret
#

hi. given the assumption I want to make a first person game that has following details.

  • a big map 10 times bigger than PUBG.
  • the only continuously replicating actors are players default ACharacter. they just move in the world.
  • for each client there are nearly 50 loot actors. (items on the ground)
  • all loot actors are replicated to all clients but their NetUpdateFrequncy is 0.5

so the question is how many client a dedicated server can handle ?
and whats the limits ? I am concerned about both CPU performance and bandwidth

#

πŸ€”

shell forum
#

I’m confused on UE4’s networking implementation. When you run an event on the server such as OnDamage, does the client have access to the logic that is occurring in that event.

rich ridge
#

@rose egret Its highly ambitious requirement.

#

You need all the possible combinations to optimise your game like Replication graph, NetDormancy and hopefully Network Prediction(yet to be announced officially).

rose egret
#

πŸ€”

rich ridge
#

UE4's dedicated server will accept any number of connections.

#

If you have money you can get a high end CPU with 96 cores and 100GB+ RAM.

#

What do you want is up to you?

rose egret
#

as far as I know UE4 server is single thread so 96 cores cant help

rich ridge
#

I didn't know that.

#

@rose egret even though it is single threaded you could create your own thread to do heavy calculation and broadcast result in game threqd

#

You can offload tasks into worker threads

rose egret
#

@rich ridge I know that but I have no heavy task. its all engines default stuff. I think I have to do a test. though I don't know how many PC my manager could provide for me .

rich ridge
#

@rose egret I don't think your manager will provide you 100+ Desktops.

#

Using editor your could launch as many clients you want.

void nest
#

What would be the most optimal way for (none ticking) items to be spawned without any delay, but also as efficiently as possible. Currently the items we have in our game are replicated, but with a net update frequency of 1. Setting the update frequency to 0 does not spawn the items at all. Now I've been wondering if there is a way to force the creation / spawning of the items, but other than that NOT have the item do any further replication, except for it's destroy event. So meaning, that I want the spawned items to do no replication at all, except for their creation and destruction. But it seems that to achieve this there always needs to be a decent amount of update frequency (10 usually works well), but this means that thousands of spawned items are considered for replication 10 times per second per item (10 x 1000 items for example results in 10 000 replication considerations per second which are completely useless as the items do not need to send any replication data while being alive). It's hard to believe there is no better way of achieving this? There must be a way to force update the creation and destruction, but have replication per second disabled, right?

gritty pelican
void nest
#

The problem with the current setting of 1 (or lower than 10) is that when the item is spawned it usually takes a few seconds before the item is replicated to all clients which is not what we want. I've also tried force net update on beginplay (on the server) thinking that this would force the item to be replicated as soon as it's created on the server, but this doesn't seem to work. My guess is that force net update only forces the replication of all replicated actor attributes, but ironically not the most important aspect which is it's creation and destruction..

rich ridge
#

@void nest Check Actor Dormancy

#

This is what you are looking for.

void nest
#

Currently it's set to awake

#

should it be something else?

#

perhaps "never" ?

rich ridge
#

Yes it should be never

void nest
#

ah ok

#

will try that

#

thanks!

rich ridge
#

And when you met a condition where is should replicate then set it awake and after that your need to call one function to make it replicate

void nest
#

force net update right?

rich ridge
#

Yes

void nest
#

sorry my keyboard suddenly went into azerty mode haha

rich ridge
#

This should solve your problem

void nest
#

Yeah I already use that function after I change a replicated property πŸ™‚

rich ridge
#

But you are not setting the Dormancy right?

void nest
#

Does this mean I still have to do a force net update on beginplay on the server?

#

The dormancy was set to awake by default

#

I never change that in code, no

rich ridge
#

Set the default value to be none for that actor

#

It will be spawned

void nest
#

I set it to never, which seems to be none

rich ridge
#

Yeah never, atm I don't have UE4 editor.

#

So I might use incorrect terms

void nest
#

Np πŸ˜‰

#

will try it now

#

ok well... that seems to work πŸ™‚

#

cheers man!

rich ridge
#

Good to know.

gritty pelican
#
void ACPP_DesertPlayerController::AddSteamItem(FString WebAPIKey, int32 AppID, TArray<FSteamInventoryItemDef> ItemDefID, FString ItemPropsJSON, FString SteamID, bool bNotify, FString RequestID)
{
    FString SteamCall;

    SteamCall += FString("key=") + WebAPIKey;
    SteamCall += FString("&input_json={\"appid\":") + FString("\"") + LexToString(AppID) + FString("\"");
    for (int i = 0; i < ItemDefID.Num(); i++)
    {
        SteamCall += FString::Printf(TEXT(",\"itemdefid[%d]\":"), i) + FString("\"") + LexToString(ItemDefID[i].Value) + FString("\"");
    }
    SteamCall += FString(",\"itempropsjson\":") + FString("\"") + ItemPropsJSON + FString("\"");
    SteamCall += FString(",\"steamid\":") + FString("\"") + LexToString(SteamID) + FString("\"");
    SteamCall += FString(",\"notify\":") + FString("\"") + LexToString(bNotify) + FString("\"");
    SteamCall += FString(",\"requestid\":") + FString("\"") + RequestID + FString("\"");
    SteamCall += FString("}");

    FHttpModule* Http;
    Http = &FHttpModule::Get();

    TSharedRef<IHttpRequest> Request = Http->CreateRequest();
    //Request->OnProcessRequestComplete().BindUObject(this, &AHttpActor::OnResponseReceived);
    FString Host = TEXT("https://partner.steam-api.com");
    Request->SetVerb("GET");
    Request->SetURL(Host / TEXT("IInventoryService") / TEXT("AddItem") / TEXT("v1") / TEXT("?") + SteamCall);
    Request->ProcessRequest();
}``` Am I performing the function correctly?
steep cipher
random sundial
gritty pelican
#

Thank you, I will watch it if I can’t do it myself

void nest
#

@random sundial Do you have any link where I can find some more info on that upcoming function?

#

Seems very interesting

random sundial
#

@void nest So far there are only the commits from what I have seen, may be more out once it releases.

The basics of it seem to be that you enable it in your engine build target (you do need to build the engine from source to enable it though) then everytime you modify a property you mark it dirty with MARK_PROPERTY_DIRTY() a bit like Fast Array Serialization.

void nest
#

Ok, but judging from the description of the function it seems to force a global push of all replication marked variables and objects? So I take it this includes actors that are created on the server and added to the list for replication. If an actor's update frequency is for example low which would normally mean it's existence could potentially take a bit of time to be pushed trough to clients, a function that globally forces an update could be helpful, but not sure if this is what the function does. I'll have a look anyway, thanks. πŸ™‚

random sundial
#

If you enable push networking the engine won't check if properties have changed as it does now. So you need to manually tell the engine that something has changed.

#

Actually that may be the wrong macro. I gotta find the other commits related to push networking

potent cradle
#

Hey guys, has anyone worked with any flocking behaviour systems on multiplayer? I found a lovely asset but it's not MP supported: https://www.unrealengine.com/marketplace/en-US/product/flocking-behaviour-system-ideal-for-simulation-of-birds-fish-bees-and-more/
I figured it's maybe because it takes up too much bandwidth to replicate this sort of stuff?

rich ridge
#

@random sundial The push model is only to reduce to overhead of variable replication.

#

It should not be used for deciding when to or not to replicate

#

The idea behind push model is that when a variable or attribute is actually changed then only replicate

random sundial
#

I didn't state that it decided when to replicate did I?

rich ridge
#

My bad, sorry.

random sundial
#

No worries. πŸ™‚

fleet raven
#

push model can certainly be used to decide when to replicate

#

i.e. an object with no changes whatsoever makes no sense to process at all

#

(only works when all properties are using push model)

chrome bay
#

The point of push model is that you do decide when to replicate something. It still follows the normal replication rules, I.e. it won't replicate unless it has changed.

#

Just means the engine isn't checking for changed properties on it's own, you have to tell it.

#

Only useful for reducing CPU cost for property comparisons on the server. No other benefit really.

#

Doubt most of us would get any measurable benefit from it unless you're making a large-scale online game.

rich ridge
#

@chrome bay and @fleet raven then what is use of Dormancy.

#

how does dormancy fits into Push Model.

#

Is dormancy getting deprecated, I guess no?

fleet raven
#

I'm gonna have a measurable benefit because I need to replicate an actor with a few thousand sub objects that rarely change

#

so I'm gonna use push model to ignore all the unchanged ones

chrome bay
#

Dormancy is different, dormancy kills the entire actor channel after a while.

fleet raven
#

ye it can't be used on a finer level

chrome bay
#

yeah different tools really

meager spade
#

what causes client/server mismatch

#

we have the same binaries

#

and same BP's

#

only happens if one uses source engine over launcher engine

#

afaict

royal isle
#

Hey, will calling OpenLevel create a new Session and delete the existing one if the server has seamless travel off?

gritty pelican
#

This code works. To issue items in the Steam.

.h
UFUNCTION(BlueprintCallable, Category = "STEAMWORKS")
void AddSteamItem(FString WebAPIKey, FString AppID, int32 AddedSteamItemID, FString SteamID, bool bNotify, FString RequestID);
virtual void OnRequestFinish(FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, bool bSucceeded);

.cpp
void ACPP_DesertPlayerController::AddSteamItem(FString WebAPIKey, FString AppID, int32 AddedSteamItemID, FString SteamID, bool bNotify, FString RequestID)
{
    FString Host = TEXT("https://partner.steam-api.com/IInventoryService/AddItem/v1/");
    FString ItemDef = "itemdefid[0]=" + FString::FromInt(AddedSteamItemID);
    FString FinallCall = Host + "?key=" + WebAPIKey + "&" + ItemDef + "&appid=" + AppID + "&steamid=" + SteamID + "&notify=" + (bNotify ? "1" : "0") + "&requestid=" + RequestID;
    
    TSharedRef<IHttpRequest> Request = Http->CreateRequest();
    Request->OnProcessRequestComplete().BindUObject(this, &ACPP_DesertPlayerController::OnRequestFinish);
    Request->SetVerb("POST");
    Request->SetURL(FinallCall);
    Request->ProcessRequest();

    GEngine->AddOnScreenDebugMessage(-1, 15.0f, FColor::Red, FinallCall);
}

void ACPP_DesertPlayerController::OnRequestFinish(FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, bool bSucceeded)
{
    if (bSucceeded)
    {
        GEngine->AddOnScreenDebugMessage(-1, 15.0f, FColor::Red, HttpResponse->GetContentAsString());
        GEngine->AddOnScreenDebugMessage(-1, 1.f, FColor::Green, FString::Printf(TEXT("SUCCESS REQUEST")));
    }
    if (!bSucceeded)
    {
        GEngine->AddOnScreenDebugMessage(-1, 15.0f, FColor::Red, HttpResponse->GetContentAsString());
        GEngine->AddOnScreenDebugMessage(-1, 1.f, FColor::Red, FString::Printf(TEXT("ERROR REQUEST")));
    }
}```
chrome bay
#

I don't suppose anybody has experience with packet-spoofing do they? Is there a tool out there I can use to modify packets I'm sending to a Server? Note this is for testing anti-cheat code ofc not creating it... if anybody has any tools they know of can they DM me πŸ™‚

bitter oriole
#

The easiest would be to implement your own cheats in the game code

#

Assuming the client can freely change anything on the client-side is the safest course anyway

chrome bay
#

Oh duh.. of course

#

Good idea

winged badger
chrome bay
#

It's just to test a _validate function really

neon mango
#

@jolly siren Did you solve your actor replication on replay issue?

jolly siren
#

Yes I did, I was destroying certain actors after scrubbing to avoid actor spam, but I resolved all that.

neon mango
#

You were doing that manually? The code I thought did that on its own

jolly siren
#

Yes I was. It does but I was ending up with a bunch of floating gun pickups for example. Because they use physics to fall to the ground. But when scrubbing they were missing that and leaving me with floating pickups. I could have resimulated physics but that still doesn't look great.

neon mango
#

So when you would scrub, DemoNetdriver would destroy them, respawn them but not properly assign physics?

#

So you just opted to destroy them for good.

winged badger
#

@chrome bay it is a fairly good talk

jolly siren
#

Yeah, unless you scrubbed before they were dropped

#

And yes I was destroying them which was breaking my equipping logic. Now I'm hiding them instead shortly after scrubbing.

neon mango
#

I think there may be another two solutions to your problem if you wanted to keep them visible. As I had a similar issue and submitted a bug fix for it, but while I submitted I put a TODO: part which was to include other edge cases such as that

winged badger
#

i do that for all actors that have to do something on being destroyed

neon mango
winged badger
#

hide, setlifespan

neon mango
#

When the DemoNetDriver respawns the objects, it fails to look at the settings for the rootcomponent as it exists at that time in the recording.

#

My fix creates a Rootcomponent template

#

and you can properly reapply on spawn the settings but I only did what I needed, Mobility

#

Simulate physics could easily be added now

jolly siren
#

Very interesting, yeah scrubbing causes loads of issues πŸ™

neon mango
#

I was trying to make it even more robust as I bet all components not just the root would suffer from this

chrome bay
#

@winged badger just watching now πŸ˜„ definitely useful.

neon mango
#

but the root is a good place to start as most problems probably would happen there as is the case of Physics and Mobility

#

I'm assuming @jolly siren that the default class settings for your root component is having the Physics not simulated?

#

and you turn it on at runtime?

bronze arch
#

target fix 4.26 big oof

#

still didnt came 4.25 yet so

#

next year?

patent crystal
#

Developing on the Oculus Quest and running into some database issues. Went to try firebase but it needs google play services so it will not work in the quest, is there a current consensus on getting the quest pinging databases correctly? Are people just writing their own apis?

meager horizon
#

if an RPC is set as not reliable, what determines if the RPC is dropped?

#

is there some general congestion metric it has internally to decide based on the priority value?

chrome bay
#

packet loss, available bandwidth etc.

meager horizon
#

ok

#

there are some cosmetic things im doing as rpcs, because i cant find another way right now... obviously i dont want them 'reliable'

#

basically a way to tell all clients that 'this actor should have this position of these child parts'

#

i would just replicate the components, but they rotate at speed, so this would be a Bad Thing (tm)

chrome bay
#

The engine itself doesn't detect any traffic congestion or dynamic traffic control.

#

Well components replicate their attach parent if they are indeed replicated.

meager horizon
#

hmm

#

well, i just learned something new

#

if i have a blueprint variable set to rep notify, im getting notifies about it every tick, even when the value doesnt differ from the one before

#

i thought it only notified on change of value? seems not, it notifies whenever its been set, even if its set to whatever it was already. as i was using it on an axis variable from an input, it would flood the pipe

#

so ive added some extra logic before setting it, to not set it if the value hasnt changed

neon mango
#

@bronze arch you also having issues with Replay ? IDK why they picked 4.26 maybe give people time to vote on it?

#

If it doesn't get enough votes do they just ignore it?

chrome bay
#

Rep notify will be called if the received value is different to the local value.

winged badger
#

blueprints have their own ideas for OnRep

#

and its definitely not a replication callback

#

it just kinda doubles as one

meager horizon
#

having my own check before attempting to update the replicated variable does work

#

also it seems that replication will only work in some cases from the authority

#

e.g. the server

#

thats expected, yes?

#

its basically one way, if i want to update and replicate a variable i have to make an event with 'executes on server' set, and change the replicated value there

#

or it already be executing server side

chrome bay
#

yeah

meager horizon
#

yeah, makes sense then, wouldnt want the clients poking those values without authorisation

chrome bay
#

If a client wants to change something, they need to call and RPC

#

I mean there's nothing stopping them setting the values locally if they want to, but that change will only occur for them

buoyant shell
#

Hi guys! I'm trying to use UCharacterMovementComponent::ApplyRootMotionSource manually (without the GAS plugin) and I can't make it work. It's documented that it should be called from the autonomous proxy for it to work. But the server is always applying a strong correction that won't let my character move an inch. The method is supposed to create a saved move that the server will process. Has anyone had luck using this method manually?

tardy orchid
#

@lament cloak huuge thanks for the help, I've made a lot of progress with ur help, I can now get in and out of tanks and I'm moving forward with my mobile game

#

Also this is the last day I can flex that I'm only 16:D

#

thanks

#

in advance:D

#

damn

#

u old:D

bitter oriole
#

20 is old now, damn

bronze arch
#

wdym im 22 im grandpa

hoary lark
#

when i was 16 people who are currently 16 weren't even sperms yet monkamega

chilly mason
#

you guys seen/use this?

#

not the same as steam sockets in stock ue4, but very similar

timid moss
#

what exactly is it for?/ dont we already have a system for that in ue4?

bitter oriole
#

It's basically what UE4 implements

cloud kelp
#

hey y'all im having some trouble with multiplayer in blueprints if anyone can help. I got movement working, but when i reparented my gamemode to inherit from Game Mode instead of Game Mode Base, the movement no longer works.

chilly mason
#

@timid moss you could call it a UDP transport layer I guess

#

doesn't do serialization but I'm planning to use flatbuffers for that

#

has some code to do w/ protobuffers but I'm still just learning about it

#

probably as an extra

#

@bitter oriole doesn't ue4's net layer assume a strict server-client model?

bitter oriole
#

The network stack does

#

The stuff below that doesn't need to really

chilly mason
#

stuff below is FSocket isn't it?

bitter oriole
#

FSocket has nothing to do with client server stuff

#

It's just a socket

#

FSocket is UE4's base socket class for TCP-style or UDP-style messaging over UDP

chilly mason
#

yes

bitter oriole
#

Nevermind, FSocket actually is either TCP or UDP

#

I would look at UChannel for the higher level stuff

chilly mason
#

I've taken some cursory glances at IpNetDriver and it seems to be tied to UNetConnection and that to DataChannel etc. which is operating on replicated properties of actors, it seems

#

so what I'm getting at is I can't seem to find an injection point where I could take ue4's network transport layer and use it for my needs

bitter oriole
#

What are those needs, really ? At this point it might be relevant to know πŸ˜›

chilly mason
#

sure, it's lockstep multiplayer

#

for an rts

#

peer-to-peer if you will

bitter oriole
#

Lockstep and P2P are two very different things

chilly mason
#

yes

#

lockstep p2p

#

no central server

#

only for nat punchthrough and basic matchmaking

#

but after players have been connected together the server's out

bitter oriole
#

I trust the choice of P2P is to handle a player quitting ?

chilly mason
#

p2p is so that I don't have to pay for lots of servers

bitter oriole
#

Listen server works for that purpose just as well

#

For the record I always advise against dedis πŸ˜›

#

But listen servers go a long way

chilly mason
#

listen server is a single server

#

so one player always has authority doesn't it

bitter oriole
#

Technically yes, the server has authority, but you also said lockstep, in which case the server can simply act as a data relay

#

(which does include some cheating options for him)

chilly mason
#

sure but then everything is going to the server first which then relays it onto clients

bitter oriole
#

Yes

#

That doesn't preclude a lockstep model

chilly mason
#

sure, didn't say that it didn't

#

so I'm wondering if there's a layer in the ue4 network stack that I could use only for sending/receiving data

bitter oriole
#

Basically the only drawbacks from listen servers would be

  • terrible at handling a disconnection from the host, though in a lockstep RTS any other player could become host rather more easily than for a shooter
  • technically twice the latency, but it's lockstep so...
chilly mason
#

then there's cheating

#

which at this stage in my unreleased pre-pre-alpha of a game is not important

#

adtmittedly

#

and yes, latency is important

#

anyway - I get where you're coming from and appreciate the advice, but I'm set on moving forward with a p2p network model

#

if I can repurpose ue4 netcode to my needs perfect, but if not then I'll use something like valve's net transport lib

bitter oriole
#

Other than FSocket, I don't think you'll reuse much

chilly mason
#

cool, appreciate the insight

crude drum
#

hey guys

#

so i am getting duplicated copies of a replicated actor on client but not on server, it this correct
if yes then is there a way to remove them

thin stratus
#

That's not correct.

#

Server spawns, client gets one copy.

winged badger
#

or in your case, server spawns, client gets a copy, client spawns and then there were two

thin stratus
#

Right if you spawn on everyone the you would get that result πŸ˜ͺ

still wing
#

Hey I have trouble replicating door collisions.
Instead of using ReplicatedMovement, I have a float of "amount open" that is replicated and I rotate the door on server and client by this float.
In the end server and client have the door mesh in the same position
Server can move through normally
Client get's stuck in the doorframe as if the doormesh is still closed, but then moves trough, since he moves normally on the server.

It seem like client caches the collision and when I move the door mesh on client, it moves the mesh, but not the collision.
Is there a way to tell the client to not cache this collision and act as if client mesh is the authority or something? It will always be same on server and client, so I just need to disable this behaviour

crude drum
#

@thin stratus yep that was it

thin stratus
#

@still wing You could enable collision to draw

#

Not sure what the console command was

frank copper
#

show COLLISION maybe?

ebon plover
#

Hi ! I am having some weird issue, the GameMode spawn the character, give it to the controller, and WTF he unposses it ? No code call unpossess stuff =/

bitter oriole
#

Well, what does the player unpossess ?

ebon plover
#

the PB_Player

#

The server travel, he spawn the BP_Player, use the new controller for possessing the pawn and magically unpossess it ...

fossil veldt
#

@chilly mason Did you make any progress on P2P via manually manipulating UE4's network stack?

bitter oriole
#

Unless he discussed it further after we did, I think the end of the discussion was that UE4 has a general-purpose socket class, and then the Actor channel class above that, which already assumes a server.

#

His choice was going to Steam's network library, which is probably the best choice he could make

fossil veldt
#

Yea that makes sense

#

Would you need to implement that functionality into the engine source do you think?

#

Or could you build it as a plugin

bitter oriole
#

It doesn't have to be in the engine source, since P2P is fundamentally incompatible with UE4 multiplayer. Just ignore all of UE4's multiplayer entirely and do your own

fossil veldt
#

Yea

bitter oriole
#

No replication, RPC, nothing like that - just use SteamLibrarySendData or something

#

Since the goal is a fully lockstep game, it makes a lot of sense

fossil veldt
#

ah that makes sense

#

would it be possible to create a custom actor that derived from actor with custom replication through SteamLibrarySendData

bitter oriole
#

UE4's replication system is fundamentally incompatible with P2P

#

Using Steam sockets is a different issue

#

So, depends what you ask

fossil veldt
#

Not for P2P, For listen server but just manually rather than through UE4's system

bitter oriole
#

As far as I understand, UE4 does use Steam networking by default when you use the Steam OSS.

#

So that's not the issue

thin stratus
#

You sure?

bitter oriole
#

Well, what does bUseSteamNetworking control ?

thin stratus
#

Didn't they look for someone to make a plugin for this a few months ago?

fossil veldt
#

I thought it still uses UE4's default networking, Just means it uses Steamworks api

bitter oriole
#

By default when using Steam, you're going to be using FSocketSteam sockets

fossil veldt
#

ah ok

thin stratus
#

Ah yeah, they also have a different netDriver.

bitter oriole
#

FSocketSteam::SendTo calls SteamNetworkingPtr->SendP2PPacket, for example

fossil veldt
#

Oh ok

bitter oriole
#

Which is funny because Steam net is P2P capable

#

UE4 is not

fossil veldt
#

huh.

bitter oriole
#

And yes you can fall back to the default UE4 sockets.

#

You'll probably lose NAT punch

#

Not sure about that

#

i'm also not sure whether you can use Steam OSS without the Steam net driver

#

Cedric might know

fossil veldt
#

I just want to remove the Variable tickrate really more than anything

thin stratus
#

50% sure you can as you can decide that in the config (using net driver or not)

bitter oriole
#

Oh yes you can

#

But can Steam OSS work without the Steam net driver ?

thin stratus
#

What is relying on it though?

bitter oriole
#

It can work without the Steam sockets, that much is clear

#

No idea πŸ™‚

thin stratus
#

Yeah me neither

#

Would need to test that I guess

bitter oriole
#

@fossil veldt What do you mean with variable tickrate ?

thin stratus
#

Is this going into the direction of RTS stuff?

fossil veldt
#

UE4's Server Tickrate by default is synced to frame tickrate of the Game

bitter oriole
#

Yeah, that's by design

fossil veldt
#

Yeah I find it so hard to work with

#

I would much rather it just be independent like the physics tick

thin stratus
#

Usually people start asking about this stuff if they are making an RTS :D

fossil veldt
#

It's not for an RTS

#

It's for an FPS Game

#

I really like listen servers

thin stratus
#

Right, well not sure you can get away from this. You can change it for Dedi Server but that much you probably know.

fossil veldt
#

But the lack of control over the tick rate in UE4 winds me up the bend

bitter oriole
#

How in hell would you do it differently, though ?

#

Tick rate is a performance thing

#

It's not a design thing

thin stratus
#

It would need to run on a different thread or not?

fossil veldt
#

Create a seperate thread for Networking

#

Yea

bitter oriole
#

Doesn't make sense

thin stratus
#

That sounds like a hell to manage if at all

bitter oriole
#

You need the game to tick faster

#

Tick rate is about gameplay updates

thin stratus
#

Even if you get the network stuff on a fixed update rate, the game can't process them if it lags :D

#

So you are basically not much further.

bitter oriole
#

If your game runs at 30fps, it's just not possible to have 60 tick rate, thread or not

fossil veldt
#

Yea but essentially the send rate of the client with variable tick rate always depends on their frames

bitter oriole
#

The send rate depends on the actual rate at which the gameplay state is changed

#

That's pretty universal

#

You can't change the game state without running the entire game

#

You can't update the network data if the data hasn't changed

#

If a client is unable to run the game above 30fps, no tech on Earth will give you tick rate above 30

#

Tick rate is the rate at which the game state is updated

#

The actual network update rate might be lower, but it can't be faster because it makes no sense at all except for wasting bandwidth

fossil veldt
#

Yeah

bitter oriole
#

If you want say 60 tick rate for your game all the time, get a dedicated server, ensure the performance is strong enough for 80fps, set framerate smoothing to 60 and you're good

fossil veldt
#

Problem is that I have, If someone is peeking around a corner, you want that to always happen at the same rate

bitter oriole
#

Then your game requires dedicated servers, there is no alternative

fossil veldt
#

Yea but wouldn't the client send rate still be variable?

#

LIke if a client is running on their potato PC at 10 FPS

bitter oriole
#

Of course, but that's unrelated to the server tick rate

#

Servers need to smooth the client's incoming data

#

Here is what you need to understand : if the client runs at 10fps, you will never have more than 10 new data points per second. Whether it's the movement, aim, firing inputs.

#

Since no more data exists, there is no more data to send

#

You could make a thread running at 60fps that sends new data, sure, but what would it send other than 6 times the same old location, aim and firing input ?

#

Total waste of bandwidth

fossil veldt
#

Well the Physics thread is detached from the Game Thread isn't it?

#

So for things like movement you would be able to send that data

#

independently of the game thread

bitter oriole
#

Physics, sure - but that's not what's relevant to send

#

What's relevant is the player's inputs

#

And that is very much tied to the framerate

fossil veldt
#

Yea that makes sense

#

So what's the best way to be updating things like the player movement

#

Say for example I have "ServerMove"

#

as a function

#

Should I be calling that OnTick

bitter oriole
#

Your player needs to send movement updates to the server that tell the server which inputs were changed over how long since the last update

fossil veldt
#

Yea so you'd send the updates and a server time

bitter oriole
#

The server might run at 60fps, the client at 75fps or 43fps - so it has to simulate the player's inputs locally over a period of time, merging or splitting the player input data

fossil veldt
#

But I can never work out how you are meant to send the updates as I feel like I never know if I update the positions via an RPC if THAT frame a packet will actually be sent

#

as it's all abstracted

#

Or if it just throws it into a buffer

#

and sends it as and when

bitter oriole
#

All sent at the end of the frame

#

Basically here is how your server tick rate works : if you have a server tick that's 16ms of delta time and you have two 10ms player input - you simulate the first one entirely, have 6ms left for a 10ms update, so you simulate these inputs for 6ms, and store the packet with a 4ms duration for the next frame

#

Probably with a delay, and some dynamic time stretching

#

And no, if you have variable frame time for gameplay as UE4 does, there really is no other option

#

Feel free to not use Blueprint or any game thread code, use UE4 for rendering only, and then build your own network stack + fixed-time gampelay updates

#

If you're doing a shooter, the stuff I describe is very much the normal

fossil veldt
#

Yeah that makes sense, I don't wanna use Blueprint for any networking tbh, I find it to be inconsistent

#

Would you just have an Actor deriving from AInfo for the network stack then?

#

That controls the entire sending / receiving for each client

bitter oriole
#

You keep thinking this is a network problem, but it's really not

#

Sending and receiving is not your issue here

#

Your issue is how to simulate client inputs that were created at 10fps

#

On a server that runs at 60fps

#

This isn't a network or a tech problem, it's a math problem

fossil veldt
#

Yea

#

Feel free to not use Blueprint or any game thread code, use UE4 for rendering only, and then build your own network stack + fixed-time gampelay updates
@bitter oriole

#

What did you mean by the network stack

#

Just manually have 1 class for the RPC sending?

bitter oriole
#

No, I meant ignoring UE4 multiplayer entirely

fossil veldt
#

Oh right

bitter oriole
#

For the record, here is how my listen server simulates remote inputs with variable framerate

#

It's quite simple overall

fossil veldt
#

Ah ok

bitter oriole
#

The server here simulates the gameplay at his own tick rate, without losing accuracy if the client is faster, and without hiccups if the client is slower

fossil veldt
#

That's awesome, Thanks for that

bitter oriole
#

The UE4 character does a lot more than this

fossil veldt
#

I don't use the UE4 Character, I'm using my own custom Pawn

#

So this is helpful

bitter oriole
#

Yeah, for a custom pawn you need your rollback/replay/smooth correction mechanism for the AutonomousProxy role, a smoothing mechanism for Authority, and (easiest part) an interpolating mechanism for Simulated

#

Also some large amount of determinism, though that's a lost cause

jolly siren
#

Does anyone know if there are any CMC properties I can change to make character location more in sync between the server and client? Players look like they are shooting next to the enemy and getting hit markers in spectator because we use clientside hit detection.

thin stratus
#

More in sync?

#

They will always be async due to ping.

#

The only thing you can do to get them "more" in sync is by reducing the error tolerance if that's what you mean

#

@jolly siren

jolly siren
#

yeah, I know ping will always cause them to be out of sync. Was just hoping to tighten it up more

#

Not sure what else I can do to improve spectating

fossil veldt
#

@jolly siren PUBG has this problem also, I think the best way to fix this is to just stream a replay instead

chrome bay
#

Caused by lag comp. Not much you can do really

fossil veldt
#

that way you're slightly behind the live gameplay but you have the exact server approximation of what happened

chrome bay
#

Shooter always sees the person they're shooting at back in time by both their ping and the victims ping combined.

fossil veldt
jolly siren
#

Right, yeah was just hoping to tighten up

fossil veldt
#

ah fair enough

jolly siren
#

Stream a replay as in via http streamer? This still won't be able to reproduce what each client sees tho correct?

chrome bay
#

Correct - will be servers' view

#

And the shooter will still lag behind

jolly siren
#

Right, so that doesn't help either

#

@thin stratus Did you have a specific property in mind by "error tolerance"?

fossil veldt
#

And the shooter will still lag behind
@chrome bay Surely it won't lag behind? Because it's directly the server's view of it

#

I figured the lag was due to the ping of receiving the packets from the server

chrome bay
#

It is - but the victim still has to send their movement to the server first

fossil veldt
#

ah

chrome bay
#

And the shooter will be receiving those updates back in time, so they'll be shooting at the target back in time as far as the server is concerned

fossil veldt
#

Couldn't the peer send a replay via http instead?

chrome bay
#

Not really, they may not have the full view of the game - plus how do you decide which peers view to show

fossil veldt
#

If you're spectating like he was in the vod then surely you only need what that specific peer can see

#

you decide based on which client you spectate

#

So if you spectate player5 for example

#

player5 streams you the replay

jolly siren
#

Right, the POV you are currently watching is the peer we want at that time

chrome bay
#

Could do that yeah, and all you'd have to do, in theory, is "rewind" the victims transform a bit further based on the shooters' ping time

fossil veldt
#

yeah

chrome bay
#

You would then see the victim "relatively" close to where the shooter saw them

fossil veldt
#

And then if you wanted a "freecam" spectate which I assume you do

#

then just use the local gamestate instead

chrome bay
#

tbh, I'd just live with it πŸ˜„

#

As that looks like a pretty extreme case

jolly siren
#

yeah we have a freecam, it works fine. Just trying to improve first person

fossil veldt
#

As that looks like a pretty extreme case
@chrome bay Nah, It happens lots in PUBG

chrome bay
#

Doesn't surprise me.. but yeah seems like a bit of a paradox to solve to me

fossil veldt
#

Looks nearly an indentical problem

thin stratus
#

@jolly siren Eh, yeah, lemme check

jolly siren
#

Why would I need to rewind transforms if I'm streaming the focused players replay?

fossil veldt
#

@jolly siren Maybe take a look at how games in UE4 handle killcams

#

Should imagine it's the same principle

thin stratus
#
bool AGameNetworkManager::ExceedsAllowablePositionError(FVector LocDiff) const
{
    return (LocDiff | LocDiff) > GetDefault<AGameNetworkManager>(GetClass())->MAXPOSITIONERRORSQUARED;
}
#

@jolly siren That MAXPOSITION thingy, can be changed via config

#

This would cause more corrections though if you make it smaller

jolly siren
#

okay yeah we currently have that set to MAXPOSITIONERRORSQUARED=1600

lime sorrel
#

I'm becoming convinced I'm an idiot but how do I test different server tick rates when playing in editor?

rocky totem
#

if i want to load a savegame on the server and have it spawn an actor. where would you put the load function so that any spawning or modifying of actors is replicated to all of the clients

#

i would put it all on the pc but a dedicated server doesn't get a pc

chilly mason
#

@fossil veldt I've looked at the steam socket github impl some more and have decided against them - they're hardcoded against protobuffers which is not what I'm looking to use

fossil veldt
#

You checked out RakNet?

chilly mason
#

right now I have a rudimentary implementation working based off of UE4's FSocket s and something called reliable.io

fossil veldt
#

might be a good option

#

Are you just completely ignoring UE4's existing system then?

#

And just manually connecting the clients?

chilly mason
#

I'm only using FSocket, yes

fossil veldt
#

Ah interesting

chilly mason
#

yeah so I've checked raknet out, briefly, along w/ others of its ilk like enet but I came to the conclusion that they're either not actively developed and/or ancient

#

which is fine in terms of maturity but not so great wrt performance

fossil veldt
#

Aye, It's a shame FB bought raknet and then bailed on it

chilly mason
#

yes

#

building a system off of smaller independent components like reliable.io is how I'm approaching this

#

preferring single header libs over larger frameworks

fossil veldt
#

yah fair

chilly mason
#

also the github steam sockets code doesn't include some of valve's proprietary tech and I'm guessing (maybe incorrectly) that it might be some of the good stuff that they're leaving out

fossil veldt
#

aye

#

It's a shame, There used to be a P2P Support card on the UE4 Trello

#

I dunno if they just binned it

#

or it's still on the roadmap

chilly mason
#

from 4.24 on I guess?

#

+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="/Script/SteamSockets.SteamSocketsNetDriver",DriverClassNameFallback="/Script/SteamSockets.SteamNetSocketsNetDriver")

fossil veldt
#

oo dang

chilly mason
#

without having looked at it much, to me this implies that they're using the underlying steam sockets

#

that comes w/ valve's nat punchthrough and optional relay for synchronous nats (which is great)

#

but that's just my assumption so you'd have to check it out

fossil veldt
#

Yea that's ace, I used to use a plugin called UWorks for that but the author scrapped the NAT punchthrough

#

was gutted

#

Gonna check that out

chilly mason
#

tbh nat punchthrough is a dirt simple thing to do

#

took me half a day but I've not used sockets in like 15 years :)

#

so someone w/ more brains can probably do it in a couple hours

fossil veldt
#

From what I've heard it was a pain in the ass to maintain with UE4 due to OSS

chilly mason
#

oss?

fossil veldt
#

online subsystem

chilly mason
#

ah

fossil veldt
#

epic apparently makes changes to it a fair bit

#

and it likes to break lots of things

chilly mason
#

yeah I was referring to the actual client/server logic

fossil veldt
#

Yea

proper ravine
#

so i have my game world generating a bunch of bushes

#

and when a player harvests them i want them to delete
but replicating that is being tough. i imagine it's because the players dont have authority over stuff generated by the game world.
is there a common solution to this?

tall pine
#

from what i understand, from the playercontroller you would send a server RPC to let the server know that you want to harvest a bush. The server then will delete this bush, and that will get replicated back down to the client

proper ravine
#

thanks you'd think i'd understand that by now but hearing someone say it again was enough for me to find the problem lmao

rocky totem
#

@proper ravine this is the note I keep for myself at work. I have the same issue all the time

winged badger
#

you should upgrade then: "if replication doesn't work client to client press this button", button gives you a nice jolt, then gives you the rest of the message

#

reinforced learning πŸ˜„

rocky totem
#

lol well at least at this point I see the note and remember the fix. I don't have to go look it up

meager spade
#

anyone had weird issues with Net relevancy not updating actors X distance away from host?

tall pine
#

can you elaborate?

meager horizon
#

if i want to pass a pair of arbitrary FString values to the server, for the server to place into my character as its spawning it, whats the best way to do that please?

#

from a client

#

i was thinking i could do something with the open map args

#

am i best to set the values after spawning, and use an rpc?

severe widget
#

controller can send that up, if it's a respawn

#

otherwise, yeah option string on the travel URL

wise depot
#

Does anybody know if its possible to disable "ack" packets from clients for specific values being replicated?

currently in a 10 players game we send an ack back to the server every single time we recieve a position update for another player, which we just don't really need to do.

These ack's are quite a large overhead on bandwidth so if possible i'd like to just disable them for position updates of other uses on the client

#

these ack's alone are 3.2kb/s of bandwidth which is absurd

half jewel
#

these acks might be part of ue4's "replicated variables are always up to date" design?

#

maybe you can transition to unreliable rpc's but i dont know if they are lighter

#

i suppose the question is, how do you make "unreliable" replicated variables ?

wise depot
#

yeah i suppose that's the better question

meager horizon
#

so what i ended up doing... is storing what i needed in the game instance

#

as it turned out there was a lot more than one or two values i needed

#

game instance as far as im aware only exists on clients, so i can stash it there, and have a combination of transient data, and non-transient saved data stored to an ini file. when i want to use it, i get the game instance and pass it to the server via an RPC marked "reliable, run on server". that way only the server sees it.

#

the character looks for those values directly in the game instance in begin play

chilly mason
#

@wise depot not overly familiar w/ ue4 replication but you could just write a getter/setter function pair for your variable and have that rpc unreliably

#

or something like an UpdatePosition() function, yeah no need for getters and setters here

hidden mural
#

When I last used unreal years ago, world origin rebasing only worked in singleplayer. I hear this is possible in multiplayer too now with the "stock" networking code.
Does this mean multiplayer maps no longer have a size limit?

normal garden
#

Already posted this in #blueprint but was referred here

#

I have it setup so that when I aim, the max walk speed of the character is lowered, and then raised again when the aiming stops.
However, on the client, the movement becomes jittery and laggy when I aim
And I dont think it actually decreases speed
I know it has something to do with replication
But I'm not sure how to put it into practise

silent phoenix
#

How can i tell which server to join to with advanced sessions? I'm trying to get it working on a dedicated server but it is creating 3 sessions and only one of them is valid. The session ids are just random numbers so i dont know what to do

thin stratus
#

You shouldn't have 3 sessions for one server.

meager horizon
#

if i want to store an encrypted password client side, which represents the players user account on a system, whats the easiest way to encrypt that value so that its not just plaintext in an ini file with ue4?

#

i do fully understand that no encryption i apply there is secure, and is just to prevent casual viewing by opening a file in notepad

#

so in theory i could probably just base64 it. but, better options would of course be a better option

meager horizon
#

ive decided i'll just use that, with a key determined from the user's pc details.

#

with an aim to moving from an encrypted password to an encrypted ticket

fleet raven
#

y store password at all

bitter oriole
#

Just put it in a file with no extension

#

If it's something the client shouldn't know, it shouldn't be on the client

#

The design here is likely bad

vague zenith
#

Anyone have experience integrating Discord SDK? Are there any plugins for Blueprints?

meager horizon
#

@fleet raven I could also store a session key. It still has implications that if compromised someone can play the game with it as that player, it just means that they can't use it to get into other services because near everyone uses the same password for everything when they shouldn't

bitter oriole
#

It's not a password if it's stored in a file on the client

#

It's an identifier

fleet raven
#

if someone manages to steal your session key you have bigger problems

#

you know, like them apparently being able to access random files on your pc

bitter oriole
#

The bigger question is why you'd be afraid of the player knowing the key

half jewel
#

anything that happens on the players computer should be considered impossible to hide or protect in a sense. multiplayer must be designed around this.

fleet raven
#

I assume the concern is about people besides the player accessing it

half jewel
#

though i dont know why a unique identifier should be kept from the player

meager horizon
#

The bigger question is why you'd be afraid of the player knowing the key
@bitter oriole I'm not, it is a case of not being low hanging fruit. Which is why I didn't want to expend too much energy on it

#

Not being plaintext in any form is probably enough

fleet raven
#

I would also ensure the key file can not be trivially used on another pc

half jewel
#

what is it though? an actual password the player types in?

meager horizon
#

I've encrypted it using the pcs Mac address as a key. It should stop it being lifted and used on a other pc yeah

fleet raven
#

players might send their entire folder to someone else when they want to share saves or whatever, you never know what they will do

meager horizon
#

We'll it's the "get unique machine id" BP node. Which as far as I'm aware is Mac address on windows

fleet raven
#

it actually returns a random guid from the registry

#

which is shared between all unreal games

#

(on the same pc)

meager horizon
#

But unique to that pc?

fleet raven
#

yes

half jewel
#

and this is used to identify unique players over multiplayer ?

meager horizon
#

Should be secure enough to prevent casual or accidental copying of the file to a different system

half jewel
#

the client says to the server i am GetUniqueMachineID ?

meager horizon
#

@half jewel yes, it's either use this or use the assigned token. I can decide as it's my API

half jewel
#

during x y z login authentication or w/e

meager horizon
#

No, the machine id is used to encrypt a copy of the password and username stored to an ini

#

Then those saved credentials are decrypted and used to sign in over https

half jewel
#

ohhh that makes more sense now

meager horizon
#

The credentials are exchanged for a base64 random session id which is then used by the unreal engine based dedicated server

fleet raven
#

store the session id instead and allow resuming a session

meager horizon
#

That should be easy enough to do

half jewel
#

yea you can make something solid i suppose, its done all the time for things like steam autosign in and epic games launcher auto sign in... user/password encryption storing and what not

fleet raven
#

should never ever store a password in a way that it can be retrieved from - even on the players pc

meager horizon
#

I agree

fleet raven
#

(of course that assumes the session id is sufficiently massive that it is not possible for someone else to guess it or have a reasonable chance at brute forcing one)

meager horizon
#

64 characters of random entrpoy encoded into base64 is sufficiently long

fleet raven
#

yes

zealous saffron
#

Just use a login token

fluid finch
#

Since 4.23 I've had some issues with my character's location jittering and "teleporting" small distance while moving (on client side). In the profiler I see that serverMoveNoBase is the most frequent RPC. Anyone know what it might be?

pallid mesa
#

are you using chaos for the physics movement system?

#

in case you do: chaos has an issue with scaled meshes

fluid finch
#

no chaos and no physics

pallid mesa
#

cmc employs chaos on newer versions if activated iirc. Seen that from kaos spectrum, we figured out the issue. Downscaling the plane mesh his character was moving on top solved the issue

#

take a look either way if yoiu are moving on top of scaled meshes

#

also listen server?

#

might want to see your issue with a gif if possible

fluid finch
#

its world composition and moving on top of level streamed landscapes, dedicated server

#

It appears as a network saturation issue, but it was a clear distinction between 4.22 and 4.23

chrome bay
#

ServerMoveNoBase() means it can't resolve the base actor properly most likely

pallid mesa
#

^You might need to debug why you are geting to that state

meager horizon
#

why does "is locally controlled" in blueprint not do what i think it does, in a local splitscreen match?

#

e.g. im using it to determine wether or not to show a umg component (hud) against a character

#

and one character gets a hud, thats visible to everyone, all other characters get nothing.

#

works fine networked with dedicated server or listen server.

rose egret
#

how to I net serialize a TArray In Netserialize ?
``
struct FAggrAttachCompressed
{
ESlotName Slot; //name of the slot . e.g stock, body, front
uint32 CosmeticHash; //hash of the attached item name.
TArray<FAggrAttachCompressed> Attachments; //sub attachments
bool bIsAttached = false;
bool bIsFPViewOnly = false;

bool NetSerialize(FArchive& Ar, class UPackageMap* Map, bool& bOutSuccess)
{
    bOutSuccess = true;

    Ar << Slot << CosmeticHash << Attachments;
    Ar << bIsAttached << bIsFPViewOnly;

    return true;
}

};

USTRUCT()
struct FAggrDetailsCompressed
{
GENERATED_BODY()

EAggregateName AggregateName;
TArray<FAggrAttachCompressed> Sockets;

bool NetSerialize(FArchive& Ar, class UPackageMap* Map, bool& bOutSuccess)
{
    bOutSuccess = true;

    Ar << AggregateName;
    Ar << Sockets; // problem :(

    return true;
}

};

template<> struct TStructOpsTypeTraits<FAggrDetailsCompressed> : public TStructOpsTypeTraitsBase2<FAggrDetailsCompressed>
{
enum { WithNetSerializer = true };
};
``

chrome bay
#

In local splitscreen both players will be locally controlled

meager horizon
#

then why dont both players have a hud?

chrome bay
#

They will all have their own instantiated HUD class

#

But the HUD will likely cover the whole screen

rose egret
#

its seems calling Ar << Sockets; doesn't call NetSerialize but << operator

meager horizon
chrome bay
#

@rose egret because it will, you have to manually call NetSerialize() if you want it to use NetSerialize()

meager horizon
#

my hud doesnt cover the whole screen, its a umg widget component attached to the character that follows it

chrome bay
#

<< operator is for all archives

rose egret
#

friend FArchive& operator<<(FArchive& Ar, FAggrAttachCompressed& A) { bool bSuccess; A.NetSerialize(Ar, nullptr, bSuccess); return Ar; }
its ok?

meager horizon
#

rather than 'traditional' hud

chrome bay
#

@rose egret no

meager horizon
#

what should i use instead of 'is locally controlled' that will work fine with both local split screen and networked multiplayer then please?

chrome bay
#
    {
        bOutSuccess = true;
        MyType.NetSerialize(Ar, Map, bOutSuccess);
        return true;
    }```
rose egret
#

found it. SafeNetSerializeTArray_WithNetSerialize

#

😐

#

another question . if I use Ar << MyUEnum will it be compress like Ar.SerializeInt(EnumValue, EnumMaxValue) ?

chrome bay
#

no

#

If you want to do that you need to do it manually

#

Using Ar.SerializeBits(&Enum, MaxBits);

#

It's also worth pointing out that your function will serialize the entire TArray anytime one element changes

#

You lose per-item changes when using NetSerialize

rose egret
#

yet another question. now that I have the following net serializable struct how does engine detect whether properties changed or not ?
``
USTRUCT()
struct FAggrDetailsCompressed
{
GENERATED_BODY()

EAggregateName AggregateName;
TArray<FAggrAttachCompressed> Attachments;

bool NetSerialize(FArchive& Ar, class UPackageMap* Map, bool& bOutSuccess);

};
``

should I add UPROPERTY() to those properties who I want to be captured ?

chrome bay
#

It mem compares them unless you override the == operator

rose egret
#

it memcmp with the last replicated copy ? oh damn what if my struct is too big

chrome bay
#

The short answer is it's complicated, but yeah generally the replicator will keep a copy of the struct and basically do == on them to decide whether to replicate.

#

But it's done through reflection and goes through a bunch of templates as well, depending on whether you have a valid TStructOpsTypeTrait template defined for that struct.

#

You should really only use NetSerialize() if you know what you're doing. The default engine serialization is fine for most things, and for TArray<> you should probably use FFastArraySerializer where possible anyway

plucky jasper
#

I am trying to Multicast from a Server Executed event - I am printing a string to test, but the string is NOT printed on any of the clients D: - halp

chrome bay
#

That current implementation will send the entire struct, including the entire array and all of it's elements anytime that struct changes. That's probably going to be worse than the default engine replication.

plucky jasper
chrome bay
#

@plucky jasper client probably can't call the Server RPC

meager spade
#

the actor has to be owned by something with a owning connection

#

RPC's to server/client require a owning connection

#

Multicasts don't and must be called on a authoritive actor

plucky jasper
#

hm

#

Its a weapon

#

Which is procedurally generated

#

trying to figure out how I would go about generating on the clients then :/

#

since currently im just sending a seed

#

and was thinking that, since the server initiates the multicast it wouldnt had been a problem :/ ?

rose egret
#

@chrome bay thanks. I replicate that struct once as a whole.
one of the reason that I didn't use default UStruct properties is that UE4 reflection doesn't support struct recursion via arrays. thats so annoying

meager spade
#

you would not multicast to generate the item on client

#

that is verybad

#

the weapon would be replicated

#

and just created on server.

plucky jasper
#

Ah

#

I thought it was bad practice to send the entire thing across

#

guess I'll do that then, thanks

rose egret
#

@plucky jasper its kind of procedurally generated weapon. (but its cosmetic only)
instead of a skin set a rifle like AK47 is made of different parts (stock, body, grip, magazine, ...)
so that players collect those parts from matches and make their own weapons .
holy NDA πŸ™‚

plucky jasper
#

Problem is, the entire weapon is generated

#

So I have to create the components

#

since its not a fixed amount

chrome bay
#

Yeah you'll have to replicate the weapon actor and all of it's components and properties, unless the properties can be deterministically inferred from the seed

plucky jasper
#

They can for sure

#

Like, im generating the weapon currenlty, from a seed

chrome bay
#

So long as the properties are non-changing ofc

plucky jasper
#

So I wanted to send the seed to the client and then have them generate the weapon

#

I suppose I could set the seed and just have the client generate it after

#

yeah no changes πŸ™‚

chrome bay
#

The trouble is you can't reference the weapon actor or components over the network that way

#

They won't be resolved

#

So the actor and components at least, have to be generated server-side then replicated.

plucky jasper
#

right

#

hm

#

currently unsure how I would go about actually generating the components

#

or rather send them to the clients

chrome bay
#

Well, the actor will automatically replicate the replicated components.

#

And any replicated properties within

plucky jasper
#

oh so

#

If I create the components on the actor from the server it'll just be generated ?

#

ah

chrome bay
#

yeah

plucky jasper
#

should def be relatively easy to do then

#

thanks man

rose egret
#

what I am doing is replicating a FAggregateDetails . clients make a hierarchy of actor from that . for us each part is a actor not a component .

plucky jasper
#

Not sure if I need to replicate the seed

#

since I can't generate the parameters on the client that way

#

supposedly

#

Guess I will just replicate the parameters instead

#

I think

#

aaah.. so confusing lol

#

Ah I think I got it πŸ˜„

chrome bay
#

I would rep the seed, and have a generic "init" function for the components which takes in that seed

#

Any properties you can infer can then be set

plucky jasper
#

Ah right thanks man

rocky totem
#

what would be the chain if i needed to call a function from the client to the server, which then replicates the data back to the client

#

but only to the client that initially called it

chrome bay
#

Either call a Client RPC

#

Or, use a replicated property with COND_OwnerOnly as the condition.

#

@rocky totem

woeful anvil
#

how well does replication graph work in 4.23?

silent phoenix
#

Is there anyone who has got VOIP talker working willing to lend a hand for a second?

chrome bay
#

Rep graph works okay for me so far. in 4.24 currently.

#

Been using it for a while.

summer nova
#

repgraph works well enough for unreal to use in the multimillion game fortnite πŸ˜›

chrome bay
#

4.21 version is horrid

woeful anvil
#

is 4.23 version same or improved from 4.21?

chrome bay
#

I think it's a little more stable, I've had no real issues so far in 4.24.

#

4.21 liked to replicate dead actor pointers for some reason

woeful anvil
#

yeah I had that issue a lot in 4.21

#

is 4.24 the same as 4.23 rep graph?

chrome bay
#

I'm not sure

#

We had to fix the 4.21 version somewhat but I can't remember how we did it

woeful anvil
#

4.24 has a lot of shader compiler bugs so I don't want to switch to it, gonna wait for 4.25

chrome bay
#

Was a long time ago

#

Shader compiler bugs?

woeful anvil
#

compiling the same shaders every time I load the map

chrome bay
#

Oh weird. I've not had that yet

woeful anvil
#

and the FPS is a lot lower than 4.23

#

for me

#

seems like the odd builds are the good ones

#

just wish 4.23 had the atmospheric light scattering that .24 has

chrome bay
#

The atmo light scattering kills perf for me

woeful anvil
#

hmm

chrome bay
#

Gave it a try in a pretty much empty map, dropped from 180FPS to sub 80

woeful anvil
#

oh wow

chrome bay
#

Seems more useful for archviz, but maybe it needs tuning still or there are some quality controls somewhere

#

But then they did mention mobile so... not sure :/

woeful anvil
#

i'm sure vol clouds will also be perf hogs

chrome bay
#

yeah no doubt

woeful anvil
#

the price we pay for stunning scenes

meager horizon
#

i found this code to make a component face the player's camera. it looks like it wont work in multiplayer due to the hard-coded player id 0. how do i fix that to work in multiplayer? im aware it will only be making a non-replicated change to the component position that will only display for that player.

chrome bay
#

The ID will be fine

#

0 will return the clients controller.

#

For split-screen it won't work, because both players share the same world and actors

meager horizon
#

ok, thanks

#

thanks, works fine

#

split screen seems a bit of a second class citizen tbh

#

a hack

#

it wouldnt be the only split screen specific thing i'd need to be aware of

proper idol
#

hi, there seems to be a problem with the generation of my navigation mesh. It is not there at all when i start my vr game with a dedicated server. I load the same map without that dedicated server it works, but when ever i connect to the server, it is not there anymore. Anyone?

bronze arch
#

guys i have a basic question about OnRep variable;
When OnRep variables changes before you joining to a match, it fires function again to take new variable value after you joined?

chrome bay
#

yep

#

So long as the value is different from the default

bronze arch
#

Okay thank you

honest scarab
#

Anyone know the best way to make a zone capture point and replicate it to all the players that are on the same team as the zone that is being captured? I've tried to put the calculating variable in the game state, but when on the client, it is not calculating to the server, even when it is properly replicated. Is this the best place to put this variable?

long willow
#

(Also please ping me if you have anything to add)

#

Actually its not related to the casting nodes it seems, if I disconnect the casting nodes and make it all run locally, the speed is still not set when I try sprinting or crouching on a client, it only works when I do it on the server

#

So I guess the question just changed to, how do I change character movement speed on clients?

proper ravine
#

could someone tell me why this isn't working as far as sound replication goes? being called from Event Any Damage if that makes a difference

#

also just calling the multicast one w/o the server event doesn't work either

ocean geyser
#

@long willow no need to do a multicast. i would make sure Max Walk Speed is replicated and set it on the server when you crouch and such. personally what i do is modify the move forwards/right functions and alter Value based on what is being done

#

@proper ravine is the client the owner of the object making a RPC call to the server?

proper ravine
#

nah i dont think it is lmao

#

whoops

ocean geyser
#

problemo solvedo lol

proper ravine
#

well i mean

ocean geyser
#

a tip, keep the output log open Window->Developer and its in there. when you make an RPC call that fails it shows in the output log

proper ravine
#

if it's coming off of Event Any Damage it should have ownership of itself?

#

oh that's handy

ocean geyser
#

your any damage event should be called from the server anyways if its a MP game

#

give me a quick run down on how this works. what/who calls your any damage event and how is it triggered

proper ravine
#

when the player attacks it calls a server replicated event that applies radial damage

#

and then the structure event graph overrides the Event Any Damage node, and from there we're calling the Server->Multicast for Play Destruction Sound

ocean geyser
#

so client attacks which calls a server event to apply the damage to whatever the client attacked. well your already on the server so you have no need to call another server event, you can simply call the multicast function directly (if i understood you right)

proper ravine
#

so if damage is applied on the server then Any Damage only runs on the server?

ocean geyser
#

you see where your setting health to 0.0

#

thats in your any damage function correct?

proper ravine
#

yup

ocean geyser
#

and your any damage function is called on the server right?

proper ravine
#

that's what I didn't know I think