#multiplayer

1 messages ยท Page 401 of 1

arctic willow
#

@meager spade i didn't wrote the hit function, but thx anyways ^^

#

i try that @shut gyro @pallid mesa

arctic willow
#

@shut gyro @pallid mesa the OnRep get's called on the server but the client still doesn't spawn the emitter

tired jasper
#

@strong breach server was fine but client couldn't move at all =/ damn, thought i had it...

pallid mesa
#

@arctic willow here you have an example of using a on_rep to execute arbitrary code on all the clients: ```C
Header file:

UPROPERTY(ReplicatedUsing=OnRep_HitScanTrace)
FHitScanTrace HitScanTrace;

UFUNCTION()
void OnRep_HitScanTrace();

Cpp File:
void AVGWeapon::OnRep_HitScanTrace()
{
// Play cosmetic effects
PlayFireEffects(HitScanTrace.TraceTo);
}

void AVGWeapon::Fire()
{
    // Trace from eyes to crosshair location

    if (Role < ROLE_Authority) {
        ServerFire();
    }

    AActor* MyOwner = GetOwner();
    if (MyOwner) 
    {
        PlayFireEffects(FVector(0,0,0));
        if (Role == ROLE_Authority) 
        {
            // Client VFX
            HitScanTrace.TraceTo = FVector(0,0,0);
        }
    }
}

void AVGWeapon::ServerFire_Implementation()
{
    Fire();
}

bool AVGWeapon::ServerFire_Validate()
{
    return true;
}
```
dull stream
#

I added some velocities in my custom phys function but when its playing over a network it causes a lot of smoothing problems when there is lag

#

Im actually just calling SafeMoveUpdatedComponent, not really changing the velocity value since adding velocities there was causing me problems. But theres something wrong and theres so much code in the charactermovementcomponent its hard to figure out.

arctic willow
#

@pallid mesa i tried that but it seems that the client's never calls the hit function, so "if(Role < ROLE_Authority)" never will be true. My logic is in an Obstacle class that get spawned by the Server. Could it be that the client doesn't call the hit function because the owner is the server? But how do i than spawn the emitter on the client side?

dull stream
#

did you replicate your obstacle actor?

arctic willow
#

yes

dull stream
#

okay so the server and client are getting the obstacle

arctic willow
#

yeah and the obstacle get's destroyed on the server and on the client

#

it's just the ParticleSystem that doesn't get replicated

dull stream
#

shouldnt particle systems only be on the client?

#

is there a reason the server needs it?

arctic willow
#

yeah that's true, i try to spawn them on the client site with the OnRep function

dull stream
#

when what is being replicated?

arctic willow
#

my EmitterSpawnLocation Vector should be replicated whenever it's value gets changed.

dull stream
#

hm. maybe that would work. but i would consider using an RPC that gets called when your important gameplay event happens on the server. like firing something for example, you fire, server determines something is hit, calls a function on the clients to notify them what was hit and the location of the hit. Then the client does whatever it needs to do, like spawning a particle effect?

#

I dunno, Im still new to this stuff to but I feel like doing on rep for spawn location seems like a questionable way to go about it

arctic willow
#

I think i tried already an NetMulticast that should spawn the emitter everwhere but this still didn't worked

dull stream
#

hmm odd

pallid mesa
#

I read a bit over, you cannot rpc to server a thing if the server is the owner

#

you can only rpc if you have the client as the owner

winged badger
#

You can multicast from server

pallid mesa
#

to the clients yes

winged badger
#

No matter the owner

arctic willow
#

i think i tried that already, but i try again

winged badger
#

My funny question is... does you emitter spawn at 0,0,0?

arctic willow
#

thought about that too, but it should get spawned at the GetActorLocation()

#

i test it

winged badger
#

Where did you try to multicast from?

dull stream
#

@pallid mesa what i mean was, multicast from server to clients to tell them, "hey the shot hit something its time for you to do local client visual stuff"

#

might not be the best way to do it

pallid mesa
#

oh okay. Didn't quiet get you right

#

I'm multitasking rn

winged badger
#

If thr obstacle gets destroyed, is it the reason you dont have you emitter on clients?

#

Anything in the logs about misding actor connection?

#

RPCing a spawnemitter throug an actor in process of being destroyed doesnt usually work.

pallid mesa
#

does ondestroyed (or similar [don't have rn vs by hand])

#

get called on every end?

#

because might be a good place to put your vfx

arctic willow
#

that's a good idea, im trying the NetMulticast right now and if this doesn't work i try that.

#

thx to all of you

winged badger
#

You can also spawn an Actor with no collisions that does the effect on BeginPlay and destroys itself when its done

arctic willow
#

that should also work

pallid mesa
#

well, explosion actors are fine, and a common practice

#

since you can program there decals, sound and vfx

#

in a decoupled way

#

but have in mind the extra overhead

winged badger
#

Its fairly easy on bandwidth, barely more then a RPC

pallid mesa
#

which is almost inexistent for the advantages you 'll get

arctic willow
#

oh wow the NetMulticast worked this time

#

x)))

bitter oriole
#

Can someone enlighten me on the difference between a Replicated variable (component or actor type), and the component / actor itself having the bReplicates flag ? Like if a player pawn has a component, should both be set ? One or the other ?

arctic willow
#

thx for the Help guys ๐Ÿ˜„ gn8 and have fun watching E3

winged badger
#

Word of caution, if you send DestroyActor and SoawnEmitter at nearly the same time

#

It might work only sporadically

#

Depending on latency

#

Replicated variable fot UObject will only send the NETguid

#

bReplicates adds it to owning actor channel and allows it to replicate its variables

#

There is no need to separately replicate a variable holding a component regerence

#

But if you wanted to reference that component from another object

#

You would nedd a replicated variable

#

Attachments between actors, components, attached actors and the like replicate out of the box

#

Sorry for typos, large fingers + mobile

bitter oriole
#

Great ! That's actually really helpful. Thanks a lot.

dull stream
#

strange question but is there a way to simulate lag with dedicated server when you test in editor?

#

I have used clumsy (app to simulate network lag) for my packaged build... but i doubt that would work for ue4 in editor

pallid mesa
dull stream
#

whaaaat

#

this is awesome, thanks

late sundial
#

im getting a replicated time from game state to widget, it works but i feel like its expensive, not sure though. i wonder if theres better way to do this. i know that binding value in widget it "ticks" it, thats why thinking if this is the reason game gets a little stutterish.. any help would be great.

tired jasper
#

@strong breach got it working, had to disable physics on the client side and let the server handle it all! Works across steam!

thin stratus
#

@late sundial While bindings arent the best, they still wont hurt your performance that fast

#

So i assume the stutterish stuff is from something else

late sundial
#

hmm ok thanks for info

#

@thin stratus

twin vault
#

asked yesterday but,
Anyone know a technique to avoid jitter on listen server? on clients i can just interpolate between the client position and the server position, obviously if i do that on the server it will have the wrong location, i though about just interpolating the mesh, while keeping the actor on the correct place, but that would cause to the physics asset to be on the wrong place

winged badger
#

some context?

#

is CMC involved? WASD like input?

twin vault
#

I have an actor, when moving on server, clients can replicate the movement by interpolating between old and new position, giving a smooth movement, the oposite is not possible, as the server will recieve a position but may not be able to interpolate, as it would not be the real position of the player

#

custom movement component, WASD

winged badger
#

the ServerMove functions are inherited from an engine component tho?

twin vault
#

only UMovementComponent::SlideAlongSurface

winged badger
#

so you RPC your input to server yourself?

twin vault
#

i RPC whats necessary to simulate the move, (direction, speed, deltatime)

winged badger
#

my first thought when you posted was too many reliable RPCs flying around in combination with CMC

#

this doesn't fit the theory tho

twin vault
#

yeah iirc CMC also has jitter on listen

winged badger
#

its worse when someone makes a million reliable RPCs while ServerMove functions are all Unrealiable

strong breach
#

No way @tired jasper

#

Iโ€™m gonna try it when I get on my computer Iโ€™ll message you in a bit

brave moon
#

got a few questions about using listen servers in multiplayer game:

1)will there be a performance issues with 6-12 players?

2)Can hacking be prevented if game is on Steam, i mean is there any plugin or something?

3)Can game be pirated and played on steam if it's steam multiplayer game?

twin juniper
#

@brave moon hi, once you go beyond a few players, it's recommended to use dedicated servers. there's a good result from "dedicated server unreal" online.
if you want to prevent hacking, the best way is to have your server RPCs and calls made such that they only execute on the server. search "Authoritative server" for more info on this.
if you use steam DRM, it has simple file obfuscation, but if you want to have true piracy protection you'll need to create a login / authentication system for each user.
hope that helps!

brave moon
#

@twin juniper Thanks for your fast reply, i mean is there a difference between pirating a singleplayer steam game and multiplayer steam game, bcs my singleplayer steam game have been pirated in like 3-4 hours after release on steam

twin juniper
#

yep. so for multiplayer, you will enable a login system.

#

singleplayer has local content, so you can't prevent that unless you load the content from the cloud or force login for singleplayer play.

#

you can also use denuvo but it is expensive to implement and indie games don't use it.

brave moon
#

alright thanks mate

twin juniper
#

if you price your game low enough, people will pay for it despite the fact that it's pirated.

#

generally, low cost is like mobile economics. that's actually how i am price setting my own game.

#

people know that you put work into it and want to support you. you'll be surprised to know theres' a lot of good people out there.

brave moon
#

im planning about 6-7 dollar price

twin juniper
#

mine will be 99 cents in early access and maybe i will charge for in game cosmetics that don't affect gameplay. if people want to support further. never make someone give you their money.

#

after all, money itself is just paper.

#

no one likes being pushed around.

#

and you can actually see that only AAA titles charge like 19.99 and above.

brave moon
#

thank god i found this discord server

twin juniper
brave moon
#

u are right low price will keep game alive and prevent pirating

twin juniper
#

i made that when i was doign a price analysis fo rmy steam game.

#

i sampled many categories from 3-4-5 star games on steam set at 9.99 all the way to .99

#

you get MORE users and MORE money for .99

#

plus you feel good since you dont overcharge your users.

#

if you set your price point at a good number, then you won't even need to implement a login system if you don't want to.

#

because people will just click buy.

#

so just looking at that example, .99 generates about 30,000 users on average per year, and that translates into about 20,000 $ annuaully (steam -valve takes away about 30 percent of your money, and epic - unreal will take 5)

#

assuming your game has some thought into it: at least a halfway decent singleplayer campaign, nice UI, multiplayer if you can afford it (and if you want to go all the way dedicated servers.)

#

if your game has a the high enough quality to price it at a higher number - you should. because then people think you desreve it and will pay for it that way.

#

but just consider the options you have, and consider what makes people happy.

brave moon
#

prob u are right bcs i got only 500 players for that sp game i already finished

#

and price is like 9$

#

and i got like 55% overall, steam taxes, withdrawal taxes...

versed socket
#

@twin juniper Congratulations on those sales numbers! What year did you release it and do you feel like those sales are probably average compared to other indie games' sales on Steam?

#

I'm told that nowadays getting just 10k in Steam sales as an indie developer is hard.

twin juniper
#

oh no those arent my own numbers @versed socket i did a price analysis using a steam aggregator website i expect i can make about 30 from my game. i worked on it nonstop for almost a year now. planning on setting it about 99 centz

agile lotus
#

I think games should be priced higher

#

and you should release a torrent yourself

#

but thats my unpopular opinion

#

๐Ÿ˜›

#

if its my own title I encourage it

twin juniper
#

prazon are you still working on multiplayer?

agile lotus
#

Yeah I'm having an issue with timers causing movement correction issues though

twin juniper
#

ok well - if you release your game, then you shouldn't have to do that. piracy is not a good thing and should not be encouraged. what are you setting the price at anyways? you never told me

#

and you might try switching the timer to timeline to prevent issues - set timeline to replicated in settings

agile lotus
#

thats a decision I have to make with my 2 other directors I can't say for myself for sure but I'm pushing for 9.99 during EA

#

Thats a good idea

#

I'll try a timeline

tired jasper
#

anyone kow best way to setup multiplayer pawn movement via physics in blueprint? [listen server]

#

know the*

twin juniper
#

and execute it on server.

tired jasper
#

@twin juniper rolling pawn, principle the same?

twin juniper
#

or use the first one - and a combination of physics vel and angular velocity. ensuring to enable physics on the BP.

tired jasper
#

@twin juniper cheers!

agile lotus
#

Are OnComponentBeginOverlap events replicated by default

#

or should I be RPCing them

umbral adder
#

Hey i have 2 maps 1 Lobby and 2 game.

#

i dont want players to see my game session so how would i go about it?

meager spade
#

what you mean, not see your gamesession?

umbral adder
#

when in the game i dont want players to join

bitter oriole
#

So, don't start a multiplayer online session ?

umbral adder
#

i start in lobby map

#

then i go into game map but i dont want players to join when the match is starting

meager spade
#

then disable the session join (i am sure there is a value for that)

scarlet moat
#

Hi everybody, can somebody give me some advice? I'm trying to setup splitscreen in an fps but I'm struggling with the hud. Now I've seen 2 approaches to this, 1 is to duplicate the character blueprint and hud widgets for each player the other way,(which I can't get my head around) is the way wes bunn does it in the official ue4 splitscreen tutorial. I can get the correct health to show for each screen but I'm struggling with getting correct ammo and a couple of other things to show for the correct player. So which would you recommend.... 1 or 2?

winged badger
#

Your PlayerController owns and possesses the PlayerPawn, it also creates and owns you AHUD object

#

So, as long each player's HUD controls the character related widgets, you can easily pull context via GetOwningPlayer / GetOwningPlayerPawn

#

And get anything it needs from there

scarlet moat
#

@winged badger thank you. I'm not at the computer right now but I'll take a look tomorrow and see if i can make that work. Thanks again

analog heart
#

hi guys. i have a problem with connecting two PCs. I am following Tom Looman Multiplayer Game course

#

i can connect on the same pc opening two clients

#

but i tried between my laptop and my pc and i can't connect

#

i gave the game to a friend and it also didn't work. what may cause the problem

meager spade
#

ports not open?

#

firewall blocking it?

winged badger
#

are they on the same subnet?

meager spade
#

we can only guess based on the info given ๐Ÿ˜„

analog heart
#

laptop and pc yes

#

when i created host it didn't asked me for firewall. that might be the problem?

winged badger
#

you opening a map with ?listen parameter?

analog heart
#

yes @winged badger

#

open map?listen

#

should it appear the firewall request after i open the map?

winged badger
#

time to read the Output logs

#

they usually provide a hint, if not a straight answer

#

you're only interested in part after it opens a map with ?listen

analog heart
#

how can i read the ouputlog?

#

where can i find it?

winged badger
#

Window->OutputLog if in editor

#

most recent file in Saved/Logs folder

analog heart
#

the game is coocked

winged badger
#

that might be a problem if you built it for shipping

analog heart
#

i had to test it some how

#

so you guys have any ideea? ๐Ÿ˜ญ

winged badger
#

without the logs, debug info or the code, not really

meager spade
#

Zlo, need a bit of ermm design help ๐Ÿ˜„

analog heart
#

@winged badger the same log should be in editor as is in the coked game?

#

i rly need help with this. tomorrow i need to show it for my final grade

winged badger
#

why is it connecting to itself?

#

they are also way too many connection requests here

#

2 standalone games, started from PIE

#

get them connected

#

use

#

a shortcut with target

#

"<full path to your engine's UE4Editor.exe file>" "<full path to your projects .uproject file>" -game-log

#

"" stay inside the target, the <> are just there to make it more readable

analog heart
#

fk. sorry i wasn't here. i took a break cuz i rly needed one

#

@winged badger can you be more precise please? sorry for being so annoying

#

you want me to make shortcut to the packaged game?

winged badger
#

no

analog heart
#

to the one from the project? project\binaries\win64\project.exe

#

to this one?

winged badger
#

the UE4Editor.exe then .uproject

#

the one in Root folder with .uproject extension

analog heart
#

oh

winged badger
#

"D:\Unreal Engine IV\Epic Games\UE_4.18\Engine\Binaries\Win64\UE4Editor.exe" "F:\MyGame\MyGame.uproject" -game -log

#

is a working example of one

analog heart
#

hmmmm. why there is no shortcut tab =.="

twin juniper
#

@analog heart you can right click a file in explorer to create a shortcut to it. i do that often for my dedicated servers.

umbral adder
#

@analog heart setup port forwarding

#

i have successfully set it up and i can play with my friends over the internet

analog heart
#

i did it but nothing changed...

#

can we chat in private?

umbral adder
#

sure

verbal wave
#

I'm having a mario like lifting platform setup. static mesh components are created / deleted in runtime. locations are multicast set by server (for now). they are constantly moving up.

#

problem is client's character gets thrown underground when stepping on it

#

it might has something to do with CMC?

umbral adder
#

its a replication problem

#

@verbal wave

#

server tells client ohh the object it not there so pass through

#

first validate on server

#

then multicast

#

made a rpc ran by server -> multicast after

verbal wave
umbral adder
#

?

verbal wave
#

actors usually work alright

umbral adder
#

just make a actor and a static mesh lol

#

and whats the problem?

verbal wave
#

realtime static mesh components are handy and I wonder if there's a way to use it in MP

#

while making sure CMC responds with them correctly

umbral adder
#

what is CMC?

verbal wave
#

character movement component

umbral adder
#

wtf, what's the problem just make a actor that replicates with a static mesh

verbal wave
#

because my SM components are dynamically generated and I'd like to put them in one actor

umbral adder
#

ok

verbal wave
#

and it might prove useful when I try to do some fancy prediction in the future

umbral adder
#

you can make a baseclass and derive that

#

also u dont rely need a actor

verbal wave
#

reliable RPCs in one actor are ordered and I can do some fake physics stuff maybe just for example

copper portal
#

I need some help with a respawn system that wont work as well as displaying a win widget for everyone. PM for more info cuz I dont want to spam the chat with screenshots

scarlet moat
winged badger
#

that looks like it should work, you do not need to cast the PlayerController tho

#

GetControlledPawn is a function in AController, not your custom class

loud wolf
#

Does the UE4 ShooterGame example has a game server set up in Steam Game Servers? I kinda wonder how P2P works in OnlineSubsystemSteam.

#

It is because I'm running across a problem wherein I can't get the other users to join the host's session if the host is using a shared ip or behind a router network

scarlet moat
#

@winged badger i've tried that it varies ways and just get errors but to be fair i'm pretty much a novice and dont really understand the ins and outs of whats going on. i have one more issue that is doing my nut tho if you could help?

#

i'm trying to create a splash screen when a character takes damage but the best i can do is to get the widget to display in the screen corresponding to the value in the "get controller" in the thirdpersoncharacter blueprint. i have created a reference to the "damageEffectWidget" in the thirdpersoncontroller but i cant get it working correctly in the thirdpersoncharacter blueprint. this is what i have so far and have been trying numerous things for a couple of days now

scarlet moat
dull stream
#

I think i must be doing something wrong. if my input modifies the variables that are being used in my SavedMove class it results in a lot of stutter pertaining to my movement

#

idk if its a smoothing issue or what uhg. has anyone ever dealt with their own custom savedMove class?

slim holly
#

I wish there was a made-from-scratch replication tutorial

#

everything is based on engine default classes

dull stream
#

what do you need to know?

#

important thing to know is that replicated variables are set by the server, and the clients then get that update version set by the server

#

or at least I believe thats how it works.. Im still a bit new. I dont think clients can set the replicated variables, they dont have authority to do so.

#

or maybe im wrong lmfao, someone feel free to correct me on that

#

ahhhhhhhh im dying here. i found a debug visualizer to show network corrections and normal movement doesnt even have corrections. ๐Ÿ˜ so why does mine... am I being too strict lol

#

maybe i shouldnt even use SavedMove for what Im doing

#

no.. im sure i need to, but why arent there corrections for normal movement. bah, so much research

slim holly
#

iirc it's simulated move first, rpc to server, server move(multicast), client confirm

#

if you go directly to server first you get input latency equivalent of your ping

dull stream
#

hmm so maybe its not being properly simulated

slim holly
#

what I'm looking for is a checklist of security features you need to prevent cheating

#

without wasting too much bandwidth

dull stream
#

as far as movement goes, I think SavedMove is intended to prevent cheating. It saves movement and if the clients move is wrong it does correction. Or at least thats what Ive gathered, still trying to learn it. Character movement component is gnarly

slim holly
#

orly

#

๐Ÿ™ƒ

dull stream
#

haha

slim holly
#

but could it be as simple as generating spline from movement history and checking are the points close enough each other on server end?

#

and forcing rewind if it gets too far

dull stream
#

it probably does do something similar to that. The saved move class contains copies of position, velocity, acceleration, things like that, at certain points in time

#

so i imagine it takes those points and does a comparison like you are saying, and if its not close enough it does the client correction/rewind thing

#

not a spline literally but theres probably interpolation between points going on

#

"points" being the Saved moves

slim holly
#

I saw the system they had for Lawbreakers on one of their interview videos

#

it was literally numerically flagged DrawDebugSphere's

#

so, I guess

#

why I was imagining spline was to do the corrections towards the spline, instead of hard rewind

dull stream
#

ohh i see, thats interesting

slim holly
#

obviously it increases the bullshit-factor but you can't fight time

dull stream
#

what ensures that the spline isnt being modified by cheaters too?

#

#downtherabbithole

#

or would the spline only exist on the server

slim holly
#

yea, it constructs it from movement history

#

well, in my case since I do manual velocity calculations, it could probably work

#

I just input latency instead of Delta time and I get location as output

dull stream
#

ooo huh

slim holly
#

(it's a glorified projectile path calculation)

#

(dont tell anyone)

dull stream
#

lol

tired jasper
#

Does this work on pawn class or just character class?

prisma ore
#

Hmm .. not sure if i should ask here or in AI .. have a strange behavior with AI attacks where if i don't look at the AI, it won't fire at me

#

using engine 4.16.3

#

anyone ? ๐Ÿ˜ฆ

#

Is .... there ... anybody ... out there. Hello, hello, hello .. is there anybody out there ... just nod if you can hear me ... is there anyone home ? .... (hehehe)

copper portal
#

ask in ai

knotty frost
#

does anyone have any advice on how in the future, I can perform an action for relevant actors on a remote client (play an animation) but a different action if that actor is not relevant for a remote client (play a sound as a result of the animation)? the only real idea I have right now is to route through an intermediary thats always relevant like gamestate, check net relevancy there between the local and remote and decide accordingly

prisma ore
#

@knotty frost would you mind explaining "not relevant" for me ?

meager spade
#

not relevant means that it shouldn't be replicated anymore over the network

knotty frost
meager spade
#

well things shouldn't be replicated to it*

deft plaza
#

Could any of you help me with my problem?

#

Replication and RPCs have been kicking my ass this week

knotty frost
#

could you show your header definitions for those functions?

deft plaza
#

uh oh

#

im an idiot

#

wrong specifier

copper grove
#

hey can you guys please vote on this, its to add post process effects for splitscreen, right now you have to build a custom build in order for this to work
https://issues.unrealengine.com/issue/UE-57785
we are asking that they add it as a button in project or engine settings, so you can opt-in if needed

rapid hatch
#

Hey folks, I'm hoping I'm missing something obvious (new to multiplayer, using blueprints). I'm doing a little hobby VR/non-VR coop and would like to have the players get a different pawn depending on whether VR is present or not. I'm implementing this functionality in the game mode and have tried both the OnPostLogin event and overriding SpawnDefaultPawnFor. I do a switch on the output of GetHMDDeviceName and if no HMD is present I spawn and possess the appropriate pawn. Running locally the appropriate pawn is always selected. The problem is when the client connects to the server (which also has HMD) and spawns the wrong pawn

#

I did some debugging and saw that the client indeed sees 'Steam VR' so it thinks it's loading the right pawn. I also noticed using IsServer that the client prints 'true' as well. Pretty sure I am missing something fundamental

lavish dagger
#

Has anyone here used GameLift? I was curious if it was possible to remote into the server where you're running your game server instance on.

umbral adder
#

I give not used it but I am pretty sure you can

#

Have not'

rapid hatch
#

@lavish dagger No, you cannot remotely connect to the game server

lavish dagger
#

@rapid hatch So they just host and run your executable? I was curious if it is cost effective as compared to running and maintaining your own servers

rapid hatch
#

Depends on lseveral factors, but it can get expensive. For a handful of servers not too bad, but if you start talking fleets of hot/ready servers for matchmaking, etc then it starts to add up

lavish dagger
#

@rapid hatch thanks for your info!

rapid hatch
#

np!

tawny parcel
#

If I wanted to change default variables on the character blueprint from the dedicated server without any players connected, how would I cast to that?

meager spade
#

LogNet: Warning: UNetDriver::ProcessRemoteFunction: No owning connection for actor BP_Tazer_C_3. Function PlayEffect will not be processed.
LogNet: Warning: UNetDriver::ProcessRemoteFunction: No owning connection for actor BP_Tazer_C_3. Function PlayEffect will not be processed.

#

the actor is spawned on the server

bitter oriole
#

@meager spade Is there a question there ?

#

This happens if a non-authoritative object tries to call a server RPC

meager spade
#

yeah because it's weird as the object should be spawned on the server

bitter oriole
#

So the object does not exist on your remote client ?

#

Sounds like you have a BP_Tazer_C on your replicated non-owning client, and it calls PlayEffect

#

WHich is a server method

#

At least doing that would generate this warning ^

meager spade
#

might have to put a branch in there to only execute the spawn actor if i am authorityt

icy nacelle
#

Is there a shortcut way to replicate animations? Can I just mark all the variables as 'replicated'?

bitter oriole
#

@icy nacelle Depends a lot on what you're building here

icy nacelle
#

Apologies: An online game running on dedicated servers

bitter oriole
#

For animation, if you have a clean state machine that detects state changes and cleanly go into the next animation - you can only replicate the state

#

And it'll mostly just work

#

Like, running state, walking state, idle state - replicate just that flag, and let the client move to anim X, Y, Z

icy nacelle
#

Yeah, all those player movements are replicated just fine

#

I'm more having problems with things like action events

#

and also dumb stuff like /dance emotes

#

I assume because a characters movement component is replicated by default, the characters movement animations replicate without problem.

tawny parcel
icy nacelle
#

Thanks @tawny parcel I'll check through it ๐Ÿ˜ƒ

bitter oriole
#

The key concept is to replicate only the most high-level information

icy nacelle
#

Anyone else experience problems with the 'login redirect' page? cant even load this forum post aha

bitter oriole
#

Your anim BP should be network-independent, get its state from the character, and adapt

icy nacelle
#

I see

bitter oriole
#

Simple example - if you press jump and then jump again one second later while mid-air, there is a 99% chance the timing will be very different on a different machine, which is fine, but will result in a slightly different animation

#

You want the animation to look good more than you want it to look accurate

icy nacelle
#

Yeah, but how does the engine replicate the animations from client to client? Does every client have a version of other client's anim bp?

#

(I would totally read the post themainstark posted but it wont open)

#

Is forums.unrealengine down?

tawny parcel
#

Its working for me

icy nacelle
#

Super weird, it just says 'logging in...' on mine

tawny parcel
#

Clear cache perhaps? Try a diff browser?

icy nacelle
#

Yeah that works. Strange.

bitter oriole
#

@icy nacelle What I'm getting at here is that you don't want to replicate the animation

#

YOu want to replicate the state

#

And update the animation locally based on that

icy nacelle
#

When you say state, you mean the variables that are used in the transitions, right?

bitter oriole
#

More like all variables used to drive the animation.

#

Replicating the animation directly can't work because animation needs one update per video frame, always, constantly, without hiccups

#

Network replication will never achieve that - it's simply not possible

tawny parcel
#

You are mostly just turning a bool on and off, and that bool is replicated. In the situation of AnimMontages you also replicate the MontageSection choice.

icy nacelle
#

Okay so do I need to replicate the incoming variables or the ones being set? (Pictures to follow)

bitter oriole
#

So you replicate whether your character is walking, where it's aiming, whether it's running or equiping a weapon

#

And then in your anim BP, you get these values

#

When the "walking" boolean changes, you will use the walking anim or not

#

But if there is a huge network breakup for three seconds, you'll keep having clean animations

icy nacelle
#

I understand about replicating the animations directly is not what I need to do

#

I just am trying to find out what I need to replicate so the other clients can see the animations

bitter oriole
#

Well, 100% of the data that's driving the animation, so all of the stuff you have here as input to the anim BP

tawny parcel
#

Try and look at that link, I think it'll help! Even if its on your phone

icy nacelle
#

Okay, so even when things are set as 'replicated', they dont actually replicate. I assume I'll need to do a rep notify instead?

tawny parcel
#

Yeap

#

When using AnimMontages that is

icy nacelle
#

Correct me if I'm wrong, but isnt montage legacy now?

tawny parcel
#

Not sure on that one, I just have it working with AnimMontages

#

And locomotion in the animgraph

#

But for abilities I used animmontages

icy nacelle
#

I think we're on the same page here.

hazy herald
#

anyone know what could be causing a failure to create a session

dull stream
#

is it necessary to round vectors/floats that are replicated or sent through an RPC

#

in regards to movement related things, i keep getting client corrections, so im wondering if thats my issue

mystic field
#

What would be the best way to (server side) detect if a physics body of one client is overlapping with the character capsule of a different client? Eg, in Epic's Shinbi, the sword

winged badger
#

they both have a server version

#

which is always right, and if clients don't think so, then clients are in the wrong

mystic field
#

that's correct, and the approach i'm going for

winged badger
#

so you do an overlap on server and let the clients know what happened from there

#

during gameplay clients should only tell the server what input are they getting, nothing else

mystic field
#

yes indeed, what I'm wondering is more of how to actually set up this in blueprints

winged badger
#

if you are going from perspective of a sword

mystic field
#

i have a very rough has authority switch that handles RPCs and multicasts for basic attack swing, but i'm not sure how to server-sidedly check for collision between two objects

winged badger
#

OnActorBeginOverlap -> if Authority -> if OtherActor Cast to Pawn is PlayerControlled -> resolve collision -> RPC / replicate with OnRep the results

#

assuming you want the sword to only bash players

mystic field
#

should the OnActorBeginOverlap event be binded to a custom event on begin play?

winged badger
#

its an event that gets called when something Overlaps the Actor in which it is defined

#

it works out of the box

mystic field
#

Ah, would that mean that the sword itself is considered an actor?

#

well, the physics body of the sword

winged badger
#

you can also pull OnComponentBeginOverlap events for each component that has a body that can overlap

#

that depends

#

is it a separate blueprint ineriting from Actor?

#

then its an actor

#

if its just a mesh attached to your character's hand, its a component

#

and you can use the aforementioned OnComponentBeginOverlap(whatever your sword component is called)

#

works the same, and as long as your collision profiles are setup right, it works out of the box

mystic field
#

that makes a lot of sense actually, thanks!

#

in Epic's assets, it looks like it's just a mesh, although i am not sure how to create a blueprint for it

winged badger
#

you should really start with some basic tutorials

#

im happy to talk networking when you get stuck, but not to discuss the basics of UE at length

mystic field
#

absolutely, i'll check around for more info, still trying to work myself around the paragon assets

#

thanks for the help!

lean hornet
#

Whats the best way to kick a player out of a session i was running destroy session on selected player wich i followed trough with the official tutorial wich i found out isnt great and most of the time bugs out the server and client and forces them into a limbo state of not being able to find any sesseion at all or getting stuck at a current session.

so whats the best way to remove a player from a session ?

umbral adder
#

destory session is the best way mabye u dint destroy it correctly and thats why u wernt able to find

polar timber
#

Hi there

#

I have an issue with multiplayer on UE4. Currently im trying to host a session with my friend in the game we made but this time we want to be able to do it online. We managed to connect having one of our friend unlock his ports and having to directly pass in the ip as an argument to the command : "UE4Editor.exe "C:\Users\Desktop\Perforce\User\Game1\Game1.uproject" public IP -game
" And now we were wondering if it would be possible to host one without having to open command prompt and type in the line above. In sum, Is it possible to Host a session without having to explicitely type in an ip?

polar timber
#

Thank you! I've looked over the document unfortunately i couldn't find anything. In this case it says to build a dedicated server however i would like to try and avoid that. Would you think it is still feasible?

dull stream
#

oh, yeah i dunno if it works for listen servers

#

never tried

polar timber
#

Perhaps your recommendation is to go with a dedicated server?

dull stream
#

might still work, but if you wanted anyone to be able to host you'd have to have the user enter their IP in game

polar timber
#

I see

dull stream
#

and then open level with their IP as the variable?

#

maybe?

#

as the level name*

polar timber
#

We currently have an ui that allows to find other sessions in the game

#

however for some reason we can't find it when we're looking for it. It only works if we type in directly the ip

#

kinda as you said the user would need to manually type in the IP from their side of the client. I was wondering if there would be a way to avoid that

dull stream
#

uhhh i dunno

#

maybe

#

but i dont know how

#

you'd have to get your IP address somehow, but not sure how you would

polar timber
#

Alright i will look into that. Thank you for your advice!

dull stream
#

no problem

teal python
#

@polar timber if SteamVR Home is running, it will interfere with your ability to find sessions.

polar timber
#

SteamVR doesn't seem to be installed perhaps another program might be interfering?

#

Also we've forwarded our ports manually in this case.

teal python
#

Yeah. Steam itself can actually get into a bad state as well.

#

I would exit steam and restart it if youโ€™re using that for matchmaking.

#

Otherwise you can open the starting game level blueprint and drop in a Execute Console Command node.

#

Type โ€œopen <hostIP>โ€

polar timber
#

It works that way

#

we have tried to do it if we manually input a command

teal python
#

And when the game loads the map, the beginplay event will automatically type the console command for the user

#

That will work for you temporarily at least.

#

You should also ensure both of you are running standalone and the exact same code and blueprints.

#

Any changes can prevent successful matchmaking.

polar timber
#

We currently have a blueprint which brings up an UI and looks for available sessions ( it uses the find sessions node) and we'd like it to do the same thing as inputing that IP but without having to physically enter it through a terminal or a console.

#

Perhaps I'm misunderstanding the "find session" node?

tawny parcel
#

What is the command / blueprint node for a server to shutdown itself down?

keen halo
#

Hey,
So I have a replicated UObject representing a duration effect on a target.
It is applied when an ability hits a target.
Since I do not prefer to use Tick for the duration, I set a timer for the duration. This happens on the server only.

The problem I have is that if I select a new target in game - and it already has a duration effect applied, I can not access the time remaining since the timer exists only on server, and can not be replicated.

A solution I have that is not optimal is that I set another timer on the UObject that loop every 1 sec (for example). On each loop a replicated float variable, representing the current remaining time is set.
Clients can access that variable and get the approximate time remaining on the effect.
Although that can lead to that the client think it is 5.9 s remaining on the timer, when the server actually has 5 sec left.

The end of the effect will always trigger on the server so gameplay-wise it is not a problem. However the visual counter of the time remaining on the clients will not be synced. The effect might be applied when the client thinks it is for example 0.5 s left.

I could have the looping timer set to loop like every 0.1 s to eliminate this problem, but that seems like a bad choice network performance wise.

Any suggestions?

distant wave
#

i have a problem

#

again

#

i made my character move his head

#

and

#

it does replicate

#

i made it replicate

#

but it is jittery on client side

#

i followed exi's way of doing it and it is still jittery

umbral adder
#

camera jitter?

#

or head animation jitter?

distant wave
#

head animation jitter

#

also sorry for late reply @umbral adder

umbral adder
#

oaky

#

i am busy now ill answer later sry

icy nacelle
#

Can I spawn bullets on the server from the weapon actor class or do I have to pass it through a player controller?

winged badger
#

if weapon is attached to your character, which is possessed by PC

#

its ok

#

as long as the weapon's AttachedParent is in PC's chain its fine

#

if you're still not sure "No owning connection for" logs happen when its not fine ๐Ÿ˜ƒ

meager spade
#

if (IsLocallyControlled()) {

#

returns false

#

in PossesedBy

steady sun
slim holly
#

wild guess without reading; update rate is slower than tick

icy nacelle
#

Thanks Zlo

steady sun
#

@slim holly that's not it. Shouldn't even depend on update rate though~

#

thank you for reply though

icy nacelle
#

Cant figure out why this isn't spawning when fired by the client. Anything look out of place here?

winged badger
#

is it attached to your character? with name BP_Dynamite i'm guessing not

#

and if you need to send a Character reference through an RPC, better to put the ServerSpawnProjectile in it

icy nacelle
#

Nah its a class that is spawned and then attached to the character. when the character mouseclicks, it runs 'event fire weapon'

winged badger
#

less of a mess

icy nacelle
#

Do what?

winged badger
#

to move that function to Character, if it requires a character reference to work

icy nacelle
#

So you think I should spawn the projectile on the player class? Because I was thinking about doing this but wanted to keep it inside the dynamite actor

winged badger
#

if you can't access the player with GetOwner or GetAttachedParent

#

yes

#

i would in no case send a character reference via the RPC

icy nacelle
#

Really? I do it quite often. Why would it be a bad thing to reference the character through RPC?

winged badger
#

GetAttachParentActor

thin stratus
#

It's not bad to send something via an RPC

#

The question is, would you need to

#

Not fully knowing what's up, I asse you fire a weapon.

#

And you call an RPC

#

So yo uare owning the actor

winged badger
#

Parent is the same here, on server and client

#

no need to push a ref

thin stratus
#

If you want the Character that belongs to the weapon, either already set it when spawning

#

Or use the Owner

#

Usually, if you need something like a Character inside of the Weapon quite often, you simply create a character reference variable, set it to expose on spawn and set it on the SpawnActor node when spawning it as the server

#

If you don't spawn runtime, then have a function that you can call on the Server from within the Character

#

that sets the ref to self

icy nacelle
#

The only reason I'm pushing it to the server is so I can get the transform of the player though. I'm just not sure why this isn't working right now.

#

I assume it has something to do with '(if owning client)'

arctic willow
#

Im working on an multiplayer shooter and the weapon has no ammo, instead it has heat and if reached 100% the player can't shoot.
The first Player on the Listen Server does it correctly and the client doesn't spawn bullet's that get's replicated via the server.

So now the Problem. The second Player Pawn on the Server side does still shoot bullet's and it heat bar never reaches 100% because my boolean "isFiring" is not consistently true and if false the heat percent goes down.

In the picture you can see my implementation.

#

the firing boolean is only set to false if the player stops holding the fire button and funny enough the OnStopFire never get's called when the client stops firing. The only other location where firing is set to false is in the constructor.

#

The Server does spawn the weapon and replicates to the client.

scenic tangle
#

Is there a way to spawn hitboxes on server with physics enabled? e.g.

  • Instead of spawning a projectile (with mesh and all the other stuff), we spawn a hitbox that moves across the screen.

  • Instead of spawning a flame particle system (for flame thrower or fire), we spawn hitboxes that linger for a while (similar to wireframe mode in Cascade)

brittle slate
#

Hey all, Im tryin to figure out why my save game isnt being read when i start a dedicated server or when i join the server with a client

umbral adder
#

hey i am trying to achieve this anyone know how to setup the camera and stuff?

copper portal
#

It's just UI and a level with characters in them.

umbral adder
#

no, what about the camera

#

@copper portal

copper portal
#

It would be connected to the player

#

Make a custom player controller and make it so u can't move with it

#

That's how I would do it

umbral adder
#

the other player camera should also be centered

lean river
#

camera is not moving anywhere btw. it is fixed..
character modells are spawned correctly... and because client / game always spawn his player and his character first... that will be in the center in any case ๐Ÿ˜ƒ

umbral adder
#

anyone know why onsessionivitereceived is not being called?

#

with steam

#

anyone?

bitter oriole
#

@umbral adder Unimplemented IIRC

umbral adder
#

?

bitter oriole
#

It's not implemented

twin vault
#

mine works fine

#

hes using the plugin tho

#

let me check to make sure

bitter oriole
#

Fairly sure this callback is only defined and not actually implemented by UE4

twin vault
#

Sorry, im using OnInviteACCEPTED not received

bitter oriole
#

On Steam at least

twin vault
#

youre right

bitter oriole
#

On Steam, you'd accept the invite from Steam

#

Not from the game itself

#

I don't know if this is by design, or if Steam does offer an API to accept from ingame and you could implement it

twin vault
#

there are some steam games that u can accept ingame, dota and cs from memory

#

but yeah, not really necessary

#

@umbral adder what you want to do with that event? show a notification that the person was invited?

umbral adder
#

yes

#

make a widget

bitter oriole
#

Session plugin author confirms : "Not yet implemented by Epic, do not use this event yet"

#

That was in january 2016

#

@umbral adder if you want to do the world a service, implement it in the Steam online sub ๐Ÿ˜ƒ

#

It's definitely annoying that this doesn't exist because it's the only missing link for full-ingame friends management

twin vault
#

this and profile pictures IIRC

bitter oriole
#

Yes

#

That, too

#

Though that's more of a design thing, functionally it's not vital

twin vault
#

i remember i made a friends list for friends playing the game, then i linked steam dll directly, then i realized hardly two people would play it at the same time, and trashed it all

#

lol

bitter oriole
#

Ironically, that AdvancedSteamSessions exist is probably why Epic won't have the feature in-engine

umbral adder
#

IS THERE A WAY TO CALL THE FUNCTION?

bitter oriole
#

@umbral adder If you want that functionality you need to add it to the engine, check with the Steam API for a callback on receiving a session, and call the delegate yourself

#

That'd be inside the engine source

#

OnlineSubsystemSteam

umbral adder
#

ok

#

its not there in the engine source

#

steam_api.h

bitter oriole
#

@umbral adder You should be looking at OnlineSubsystemSteam.cpp

umbral adder
#

ok

bitter oriole
#

And then other files in the same folder, and the Steam API itself

#

That's not exactly easy work so make sure you're ready to spend a week or two on this

umbral adder
#

i dont see the function

bitter oriole
#

What function ?

umbral adder
#

invite received

#

oh sry

bitter oriole
#

Well yeah, it's not implemented

#

aka it doesn't exist

#

Technically it's a delegate, FOnInviteReceivedDelegate

#

It's defined in OnlineFriendsInterface.h

umbral adder
#

ok

bitter oriole
#

OnlineFriendsInterfaceSteam.h/cpp is probably where you'll need to call it

#

Just start with the Steam API so that you can see which methods exist to get a callback on invite

#

That's the extent of my knowledge here @umbral adder , again, this isn't easy, you're adding a feature to the engine that depends on another library

#

Good luck

umbral adder
#

๐Ÿ˜„

verbal wave
#

I feel there should be some macro to do the exact thing
called it predicted for the lack of a better word

final thicket
#

Does anyone know why 'Run as a dedicated server' causes everything to break?

#

In the editor options?

meager spade
#

what you mean "break"

tired jasper
#

break hit results?

deft plaza
#

Anyone have an idea what my cause this error

#

LogNet: Warning: UIpNetDriver::ProcessRemoteFunction: No owning connection for actor ValorCharacter_C_1. Function SERVER_OneOffBuff will not be processed.

meager spade
#

yep

#

@deft plaza calling a RPC on an object which has no owning connection

deft plaza
#

@meager spade a client is telling the server to multicast, why would it matter if theres an owning connection

deft plaza
#

How would I send an array from one client to another?

#

and have it replicate across the server

#

the array is a struct that is tagged replicated

pallid mesa
#

Is there any other way to replicate a sound cue so when I have people joining it will play on their end at the timeframe is playing on everyone else end? I have right now a replicated timestamp to know when the cue started playing. Works fine, but I was wondering if there was any other way

#

Its a long cue (story telling style)

meager spade
#

use a repnotify

#

might be the best wat

halcyon abyss
#

hey guys!

#

just wanted to ask somethin very quick

#

I'm trying to sync objects that rotate at a constant rate

#

im doing this in bp

#

i basically check the ping / 2 and add the rotation rate to that...

#

do you guys think there is a better way of doing this?

dull stream
#

replicate movement?

jolly berry
#

For syncing a firing of a gun on both clients/server do we generally use Multicast events or OnRep ones? Using CPP here.

For example, I fire on both the Owning Client and Server, and then I want simulated clients to also spawn the projectile. Do we multicast the projectile spawn and params?

winged badger
#

depends, its a suboptimal solution with something like an automatic weapon

#

if you fire 300 rounds per minute, you'd end up muticasting every shot

#

in that case, it would be better to just replicate EWeaponState::EWS_Firing

#

and let the clients simulate the weapon fire

jolly berry
#

gotcha

#

now one last question, if it's a moving projectile rather than something fast/hitscan

#

would u take the same approach of just letting the client use it's own aim vector to simulate the projectile spawns?

#

obviously Server will still dictate who was hit or not

winged badger
#

server will correct it in regular (and short) intervals

#

so yes, especially if the scope of the game is large

#

as in 8 or more players

jolly berry
#

that's only if I have the projectiles set to replicate then right? I figure it'

#

it's more efficient to have the spawn location replicated, but the projectile travel simulated

winged badger
#

you can go and simulate those as well

jolly berry
#

ye so the biggest thing is just getting the right spawn location over

winged badger
#

it really depends on how the result looks, and how much bandwidth can you afford to use

jolly berry
#

obviously it in theory should be small but with faster moving objects it could look wonky

#

yeah

#

I know previously when I did this on another game it was a multicasted event but the projectile was simulated completely only the event was casted

#

and there were times where a rocket could hit a falling object on my client but no impulse since it didn't on server

meager spade
#

waves

jolly berry
#

hi

winged badger
#

if its a replicated actor, then its a NetID, type, spawn location and impulse/velocity at very minimum

jolly berry
#

u talking about the projectile?

winged badger
#

yes

jolly berry
#

I didn't wanna replicate them, only the spawn location and then simulate

#

so basically guarantee they spawn with the right location/rotation

#

but then let the client do whatever it wants with it

#

assuming clients aren't screwing with the projectile it should be close enough to accurate as long as we got the right location/rotation from server

winged badger
#

i think simulating the entire actor will be just fine

#

as in, spawning it client side

jolly berry
#

even the spawn location?

#

gotcha

winged badger
#

obviously, for FPS requirements are much higher then for a top-down Twinstick shooter

jolly berry
#

have you ever played Smite?

#

or seen it

winged badger
#

seen it

jolly berry
#

I'm trying to somewhat emulate that type of environment in terms of skill casting

winged badger
#

generally, if your client's idea of its own location/rotation is too inaccurate, they wouldn't be able to hit anything

#

so there is an element of simulation involved, no matter what you do

jolly berry
#

yeah that's true

#

now that i think about it

#

uh, so would u fire that event using a multicast or OnRep

#

oh wait

#

nvm yeah i would just do a client event

#

have the server call a reliable client event

winged badger
#

if its a bow, sure, multicast is good

#

if its an automatic weapon, i'd just replicate the weapon state

jolly berry
#

gotcha

#

thanks!

winged badger
#

good part of the reason i'd multicast something like a bow or a spear is animation

#

you are likely to have a draw and release, so you can't just loop the thing

#

like you can with an SMG

jolly berry
#

Would anyone know why my Projectile Firing event is called on client and correctly spawns the projectile, but is invisible (or maybe not actually spawning).

#

it works perfectly fine on server

#

I see the projectiles spawn

#

I debugged and made sure it is being called on client, and the locations are being passed in

#

that's a multicast event

#

the handle

#

proj isn't null either

fossil spoke
#

Whats multicast?

#

Is your Actor set to Replicate?

#

You shouldnt need to Multicast the spawning of Actors

#

If the Actor is spawned on the Server, the Clients will also spawn it if its set to Replicate.

#

No need to Multicast it

jolly berry
#

nah the projectile isn't because its simulated

#

unless there's a way to just replicate the spawn of the projectile without the movement

#

since it's wasteful for movement replication on that

#

oh if I just replicate without replicating the movement component, is that an efficient way to do this?

#

for a projectile

#

either way still strange that the client's spawned projectile isn't loading

#

okay nvm i confirmed my multicast event isn't running on clients it seems

#

ah i've been misusing multicast delegate

#

what exactly is a multicast delegate compared to a NetMulticast function?

#

obviously the former is a function pointer, but what's does "multicast" in this use mean if it's not referring to net intrinsically?

#

is it literally just a function pointer that u can hook multiple calls up to?

#

and if that is what it means, then what does "multicast" mean in the net version?

#

cause normally u only use it on one function when doing NetMulticast

heady delta
#

what would be the most efficient way to update removed foliage instances to new connections? I was thinking of making a replicated array of instance indexes for removal, and replicating them on initial only, this sound right?

fossil spoke
#

Sounds fine.

heady delta
#

so this might be a potential problem... If removing an index during play re-orders the ISM array, then every index removed after the first will have a different index to an unmodified ISM array of a newly connected player, meaning a list of indexes would be incorrect

#

shiet

#

unless they are perfectly in order, and the re-ordering is not random at all

strong breach
#

Anyone know how i can override the multiplayer PlayerStarts
or how to fix the multiple spawning issue?

raven holly
#

Is player state on all players?

#

Or just owner

summer nova
#

@heady delta how many instanced meshes you have?

#

for some things i did i just recalculated the array every frame

#

sadly, unreal doesnt have a batch upload of instance mesh, so it can be slow

heady delta
#

@summer nova actually hit another barrier just now with HISM update times due to the amount of instances I have, trying to figure now how to break the HISM up into chunks ๐Ÿ˜…

summer nova
#

average of 2 miliseconds for 6.000 instanced mesh updates

#

faster on a built version

#

if you are going to use chunked HISM, arent you better just doing it manually with normal instances?

#

what is your use case?

heady delta
#

Wow that looks like some impressive stuff.. I'm doing procedural pine forest, with the ability for instances to be removed by impacts. Roughly 40k per instance x 3

summer nova
#

you could use a similar tecnique, except chunked

#

like, instead of having every tree, have it chunked on groups of 5000 trees. And dont touch them unless there is an update

#

i wanted to add some "batch" updates to the instanced mesh system, to be able to upload a fuckton of items at once

heady delta
#

That is definitely the best and probably the only way to do this, figuring out how to chunk the instances, there is actually very little info I can find available but I know others have run into this issue

summer nova
#

if you are having a lot of trees, i recomend you go into a data oriented approach. Basically have an array of tree data

#

no uobjects or actors

#

what you can actually do, is to use actors to "render" the close up trees

#

so you have a sytem with a bunch of pooled tree actors, and the trees near you are those actors

#

but the trees far dont have physics and are instanced mesh only

#

so essentially. you keep a data structure of tree data

#

the trees in medium distance are rendered through instanced mesh, tiled

#

and the trees in short range are actors with collision so you can mine/pick/whatever them

heady delta
#

that could be something I might look at but could get complicated with collision testing for stuff in the distance

summer nova
#

do you need collision testing at the distance?

heady delta
#

aye weapon system does queries

summer nova
#

you can do colision yourself

#

for weapons

#

you can write a ray to cylinder function and use your tree data array

#

bypassing physx completely

heady delta
#

that would work, I'd have to have a fast way to access the data, I'm so glad I bought this mini whiteboard ๐Ÿ˜„

summer nova
#

my recomendation is something similar to the hash grid i do in my simulation

#

works pretty well and its boundless

#

this thing but on 2d

#

becouse you probably dont need the 3rd dimension

#

or a classic quadtree

heady delta
#

.01 ms update

#

wow

summer nova
#

400 items

#

im only putting the spaceships into the grid

#

on my new simulation i run 40.000

#

but i had to change the algorithm so it multithreads well

heady delta
#

It looks pretty amazing, I might not be quite at the level since updates are pretty rare for my case, but I'll see what happens when I break the HISM up

summer nova
#

but that improves it. You can leave the grid saved and then you can read from it quite fast

#

you grid it all at the start, when you generate the trees

#

and then leave it there

#

the grid algorithm is hilariously trivial

#

you can look at the code

heady delta
#

yeah I can imagine this probably opens a lot more doors with intractability too since removing and adding is really prohibitive right now

summer nova
#

keep in mind im using an ECS there to get the entities of a type

#

but you would forget about the whole ECS stuff and just use a TreeArray

#

or similar

heady delta
#

but then I suppose I'd have to get all the transform data from the HISM to create the tree data

#

๐Ÿค”

summer nova
#

you could do that just fine

#

you can access individual instances data

#

but tree data is useful becouse it lets you give HP to the trees and all that stuff

heady delta
#

Hmm this actually might be a lot easier than I was thinking, I wonder then does that mean I could have proper culling on the foliage, since HISM is basically always drawn

summer nova
#

you can do culling manually if you want

#

but keep in mind the hit of updating instances

heady delta
#

yeah

summer nova
#

if you have the instances arranged by a grid

#

you can do a angle check

#

beetween camera and grid center

#

and if the angle > something, you dont render that tile

heady delta
#

yep just add some time in there incase someone wants to spin on the spot like a crazy man

#

I'ma dig through this and see if I can learn something, thanks a lot for that ๐Ÿ˜„

proper olive
#

oy vei..... is it not possible to use map type variables in multiplayer? I just saw a mouse-over that says Maps and Sets cannot be replicated, so that might explain why it works fine when testing alone as a server, but the engine crashes whenever I try to add a key to the map in multiplayer? :/ Any way to still utilize this, like if it only exists on server or something?

thin stratus
#

They can't replicate

#

You can still use them on one instance if wanted

#

Just not replicated

proper olive
#

so if I just keep it on the player state and save game, and always access it with a Server RPC, should be OK?

thin stratus
#

You can keep it whereever you want

proper olive
#

what about maps of strings to strings in multiplayer? I'm seeing a lot of issues w maps in general on the forums but any known issues there?

thin stratus
#

No idea

#

Maps aren't made for replication, that's all

#

Since that is the only "Multiplayer" part, I don't see why it wouldn't work

proper olive
#

wow that stopped the crashes!

#

woop woop ๐Ÿ˜„

#

maps are cool... was afraid I'd have to come up with a less convenient approach to storing quest states

#

it could be because I was storing the map on a struct, so as part of taking it off of client-side actors, I took it out of the struct... so maybe that was the only problem

glacial lotus
#

Why updating the HUD in a multiplayer game(New editor window, not dedicated server) doesn't want to update the HUD while it works perfectly in PIE?
It's a "local" HUD, the details about the weapon and a texture, so I assume it shoudln't be replicated. I'm missing something but not sure what.

thin stratus
#

Are you doing anything in terms of assume ClassA exists on the Client when ClassB accesses it?

#

Cause the timing needs to be proper

glacial lotus
#

I think I'm doing al lthe castings during On BeginPlay

thin stratus
#

Where

glacial lotus
#

in the player controller

thin stratus
#

Can you show what you do

glacial lotus
#

ok... I'll try . Because I have a lot of things here...

thin stratus
#

K, usually it's a problem of accessing classes on BeginPlay of another class

#

E.g. Accessing GameState in the PlayerController

#

Or whatever combination

glacial lotus
#

hmm

thin stratus
#

And then, in non-PIE you suddnely notice, that with a small delay, it's not working anymore

#

Cause replication isn't instant

#

(using a delay can solve the issue, but is the worst solution cause you can never know how long the delay could be)

glacial lotus
#

wtf? with a delay I got the hud working... but it's working on the other player window!!! Like I change my weapon but the other player's hud gets the updated info

thin stratus
#

Well, then you have some problems with your replication :P

glacial lotus
#

yep ๐Ÿ˜ƒ

#

well, no it works in the pure clients but it doesn't work in the client+server

#

now

glacial lotus
#

In a multiplayer game p2p, not dedicated, the client acting as server does like 2 passes, one for the client and one for the server or it's just the same pass?

fleet sluice
#

@meager spade Sorry for the late reply, but: yes, UWorks does "support" parties. The plugin allows access to Steam's lobby functionality, which isn't the same as the regular UE4 lobby term. With those lobbies, anything can be achieved, from server advertising, to matchmaking, parties etc.

meager spade
#

Okay cool i will be buying it tonight :)

#

@fleet sluice ^

proper olive
#

anyone know a way to Set Hidden in Game from server on a server-side actor w replication on and NOT replicate to other clients?

meager spade
#

Was going to inplement it myseld but people highly recommend uworks for saving time and the fact it has been in the works for a long time

fleet sluice
#

No rush, dude ^^ I'm here for any questions before you do (and after, obviously).

#

And thank you!

meager spade
#

It seems pretty solid and the fact its expoded to both c++ and blueprint is really useful as i use a mix of both (with GAS).

#

Exposed*

#

Sorry on mobile and keep mis-typing lol

fleet sluice
#

What do you mean by GAS? I'm not familiar with the acronym

proper olive
#

Game Abilities System

#

it's a C++ only (at least in order to set it up, then there are some BP nodes after that)

#

system for gameplay abilities (spells, whatever) all set up by Epic with prediction and everything, mostly for multiplayer

fleet sluice
#

Thanks!

proper olive
#

Still looking for help with setting hidden on actors on server-side only, for example, a blocking volume, or a quest indicator, which gets hidden when a player completes an objective, but only for that player (even tho the object is world/server-spawned and so Owner-No-See won't work)

#

this thread discusses it, but the fix doesn't seem to work any more:

wary willow
#

OwningClient it up

proper olive
#

it's a server-spawned actor attached to another player's pawn

#

:/

#

or a world-placed actor (blocking volume) owned by the server

winged badger
#

when your quest/objective is completed

#

do you at any point have a reference to both the actor you wish to hide locally and the PlayerCharacter / PlayerController of the player that completed the objective?

#

@proper olive

proper olive
#

yeah totally

#

I've been trying to like, reverse the disabling via a multicast with another switch has authority on it such a mess

winged badger
#

at that point, run on both server and client - if PlayerPawn IsLocallyControlled (PlayerController is LocalController) -> ObjectiveActor->SetHidden

#

it will pass the check only on the client that completed the objective

glacial lotus
#

for a multiplayer game, does it matter if the input events are in the character bp or should they be in the player controller?

winged badger
#

obviously, do not multicast from a PlayerController along the way ๐Ÿ˜„

proper olive
#

not sure I understand @winged badger

#

@glacial lotus If you want to change (repossess) different pawns, then put it in the controller. But if you'll always have the same pawn (like not transforming into a rabbit) then you can use the character

winged badger
#

APawn::IsLocallyControlled checks if the Pawn is possessed by a PlayerController that is also a local controller

proper olive
#

right

#

I'm using BP btw

winged badger
#

its available in BP

proper olive
#

but I know Is Locally Controlled

winged badger
#

so

glacial lotus
#

@proper olive Thanks

winged badger
#

if the Actor you wish to hide got a say, Function call with Pawn input

proper olive
#

like this?

winged badger
#

SetObjectiveCompletedFor(APawn* inPawn)

#

on every instance of it, on every client

glacial lotus
#

Also I have a BP that's updating the HUD. It works perfectly for all the clients but not for the server+client(not dedicated server). Any general advice?

winged badger
#

it could check if inPawn is LocallyControlled and hide itself if it is

proper olive
#

I can check if the objective is completed no problem

#

it's just how to set hidden in game only on server without it getting replicated to clients

winged badger
#

hidden in game is visual state

#

you set it only on the client that doesn't need to see it

#

not on server

proper olive
#

but it's the server that needs to not see it

#

and I want other clients to see it still

#

same happens with a blocking volume, even tho I have it running on authority only, when it's there on server side, other clients can walk through because movement is server side

#

when it's not there server side*

winged badger
#

so, ClientC completes the objective, and you want only the ListenServerHost not to see it?

proper olive
#

ListenServerHost completes the objective, and I want only ListenServerHost to not see it

#

but other Clients to still see it

winged badger
#

and if ClientC completes it?

proper olive
#

then ClientC doesn't see it

winged badger
#

but ListenServerHost does?

proper olive
#

if it didn't complete the objective yet

#

right now that works

#

Client C can do it, nobody else sees anything change

#

correct function

#

but if Server does it, it happens to all

winged badger
#

if it propagates yes

#

thing is

#

replicated Actors can execute their functions locally, on each client separately

#

without any networking involved, really

#

Tick() and BeginPlay() are a good example of that

#

they run on every copy of the Actor independetly

#

and in ClientC's world, the check for if Pawn IsLocallyControlled will be true only for ClientC's PlayerPawn

#

you should in no way replicate bHidden for this to wwork

twin juniper
#

Hi. I'm trying out replication for the first time and I'm currently creating a system that allows you to hold a button to open a door, everything seems to work fine until a non listenserver client tries to walk through the opened door, the collision seems to still be there and they awkwardly teleport through as if it is desynced
https://streamable.com/qqz0g

The weird thing is, the door seems to update its location properly on all the clients (and the server)

All of this was done in blueprints and I don't have any knowledge on C++, if that helps.

#

I cant find any reason as to why it desyncs like that

glacial lotus
#

I have 2 cameras (both replicated) in the character. In local I can swap them (normal thris person view or zoom). However in multiplayer the pure clients don't get the caemra change. Ideas?

twin juniper
#

@twin juniper did you make sure to move the entire door upwards?

#

because if you only moved a component, it might create an issue. you would have to move the entire object including collision meshes and components. make sure to set the components to replicated. i had an issue with my door where certain components created blocking unless i replicated all components.

twin juniper
#

@twin juniper yeah I noticed, I was moving only the mesh and that caused the issue. Moving the entire actor fixed it. Thanks a lot!

umbral adder
#

Are onlinebeacons dependent on subsytems? and platforms?

thin stratus
#

@umbral adder Yes and no. You can connect to beacons through LAN, but over the internet you also need a way of finding them, similar to normal sessions.

fleet sluice
#

Has anyone used the replication graph yet?

autumn dawn
#

Anyone got suggestions on videos for how to add multiplayer to a project?

#

Just started getting into Unreal this week.

twin juniper
#

@autumn dawn there's a great tut on the unreal epic games youtube channel for this purpose.

#

got my game started with that.

#

look up unreal multiplayer on youtube, first result on the unreal engine channel that pops up is the one. wes bunn did it. smart guy.

umbral adder
#

@thin stratus beacons need ip to connect if i am not mistaken. right? Also do u need port forwarding?

autumn dawn
umbral adder
#

thats broken and not outdated

#

@autumn dawn

#

but its a start

thin stratus
#

Gnah this shit tutorial

#

If it is the lobby one

autumn dawn
#

Oh...

twin juniper
#

yep twarner, it's the one i used.

#

i moved on since then though, most of my multiplayer code uses advanced sessions.

thin stratus
#

Dont start with it if it is the lobby one

twin juniper
#

lol

#

๐Ÿ˜›

umbral adder
#

it is the yt series on bp multiplayer

thin stratus
#

Teaches wrong things

umbral adder
#

btw, the tut is by the senior tech writer lol

#

why is he teaching mp lol

thin stratus
#

Idc who did it. If it is the lobby one it teaches a lot of wrong Things

umbral adder
#

LOT

autumn dawn
#

Which one do you guys suggest I should use instead?

twin juniper
#

warner there are also good cpp tutorials for multiplayer. you can find them on udemy.

umbral adder
#

..

#

he just started so bp would be just fine

#

cedric's compendium on networking is goof

thin stratus
#

Budd

#

They teach wrong Things

#

He learns it wrong from the start

#

How is that remotely okay?

umbral adder
#

who are u talking to?

twin juniper
#

you mean the cpp ones?

umbral adder
#

confused

twin juniper
#

well i started with wes' tut. i since re-wrote almost all the code. so yeah i know it's kind of dated. you're right.

umbral adder
#

bp docs are good

#

wiki's etc

thin stratus
#

:D i said multiple times that the lobby video tutorial on Youtube is bad to start with

#

Thats all

umbral adder
#

...

#

๐Ÿ˜„

#

are u on phone @thin stratus?

twin juniper
#

@autumn dawn you will want to keep in mind there are basically two types of multiplayer in unreal everyone uses. listen servers and dedicated servers. if you go with listen servers, you will basically just use create / join session and if you use dedicated servers, you spin up the server on a remote machine and then connect to it using exec console command: open:x.x.x.x node. you can do all this stuff in blueprints too so you can try that out.

autumn dawn
#

Stupid question. How would I go about doing the BP for it?

twin juniper
#

for listen servers?

umbral adder
#

take it easy and read docs and just google tuts and learn and follow

twin juniper
#

so you are creating a game, and you want someone to connect, right?

#

do you have a base game to start from first? like a structure?

autumn dawn
#

In the future yeah.

thin stratus
#

@umbral adder yes

autumn dawn
#

Not right now. Just trying to figure out how everything works with Bps.

twin juniper
#

i see.

#

matt w provided that to me earlier when tutoring someone else those are the basis links you can use to learn unreal

autumn dawn
#

Stupid question. Is it possible to make a complete project without "coding"?

twin juniper
#

yes you can use BP only

#

i did that for my game for almost a year

#

and it is advanced and fairly good.

#

problem - latency, native lag, advanced features

#

some functions native to unreal are not properly exposed to blueprints yet

#

and some functions you can have in CPP pre-written by others as code plugins, etc.

#

what kind of game are you looking to do?

autumn dawn
#

For a simple game I was thinking something like a FPS game

twin juniper
#

because there are templates on the unreal marketplace that can really help you get started - you can also look at pluralsight tutorials to build up a template idea and then build from it for your game. i used a pluralsight tutorial for my space game, and built up functionality for a year

#

FPS eh? ๐Ÿ˜ƒ

autumn dawn
#

Tried doing it in Unity and I didn't really like it, lol

twin juniper
#

ok i am going to DM you a great.. and i mean great.. link.

thin stratus
#

@autumn dawn Yes, but keep in mind that BPs is coding too

#

It follows almost the same OOP rules since it is a child of cpp

#

And as gothicserpent said, you can easily come across non exposed Features which require cpp or at least a plugin

#

Cause you are depending on what epic exposed to BPs

#

Multiplayer is missing quite a ton, which you might find sooner or later

#

Specially session stuff but there are plugins if needed

lost inlet
#

i still wouldn't recommend doing a complete project in BP because what you end up with is a bowl of spaghetti

fleet sluice
#

Wasn't that OnRep commit one of @thin stratus 's (very) recent requests?

thin stratus
#

@lost inlet Gnah, depends. I have a bigger project which is 95% BPs + some C++ where it was needed.
And everything is organized and commented. Now bowl there.

#

@fleet sluice Hm, not that I remember :x

lost inlet
#

a lot of beginners probably aren't going to do neat BPs with everything split into nice functions with comments

fleet sluice
#

I remember someone here definitely trying to override an OnRep function in BPs and even posted a screenshot of a "hack" of some sort to bypass that.

thin stratus
#

Oh yes

#

But that was something else or?

#

The PR just shows a specific on rep being virtual

#

I cried about OnReps not being overridable in BPs

fleet sluice
#

Yea. Don't BPs detect virtual as being overridable in children?

thin stratus
#

It's more about creating an OnRep in BPs

#

And the child BP can't override it

#

Which was possible in earlier versions

#

@lost inlet True, but would they create proper C++? :D

fleet sluice
#

Oh wait, sorry. This was just an IsActive function. Yea, my bad. Makes sense.

gusty raptor
#

hi, anyone knows a good tutorial on how to replicate vehicles?

bitter oriole
#

@gusty raptor The Udemy UE4 multiplayer course

gusty raptor
#

hhm thats pretty official,but ive no coins ๐Ÿ˜›

bitter oriole
#

@gusty raptor Well it's definitely a very great read, get it when it's at the $10 price

#

Since that's Udemy's real price

#

Includes source code for a basic MP vehicle

final thicket
#

Do you need to make any changes to a listen server to make it redey to become a dedicated server? Like any diffrent code any were?

summer nova
#

the ue4 c++ udemy courses are good

#

but remember how stupid shady udemy is, with their spam accounts, and their illegal pricing wich is 100% of the time at 95% discount to trick people

bitter oriole
#

@final thicket Depends on your game

final thicket
#

Oh how so?

bitter oriole
#

Well dedicated & listen are different things, listen server is on a regular player so it's open to hacks and it needs to render clean & smooth gameplay, dedicated server is secure on a server & doesn't have to render stuff, so it might run at 20fps and it would still be fine, etc

#

It's not about changing code, it's about the arhcitecture of your game