#multiplayer

1 messages Β· Page 76 of 1

open junco
#

How do you approach RPCs that need to return data?
I.e. I have a need to request some info from the server, which is needed to be known in real-time (therefore property isn't applicable), but since RPCs cannot return values, I'm not sure how to design the whole thing.

Current idea of implementation is this:

  • server RPC, which is called from the client (entry point of the logic)
  • client RPC, which receives the response from the server RPC
  • client event, which is triggered by the client RPC when it's called from the server (with the appropriate response)
prisma snow
open junco
prisma snow
open junco
#

So that the server doesn't give info the client about the target actor when it actually cannot interact with it (i.e. looking away or too far, or interactions are blocked, etc.)

prisma snow
open junco
#

Pretty much, yeah

prisma snow
#

Which game mechanic(s) do rely on this linetrace?

open junco
prisma snow
#

so that the server can "block" the interaction

#

but the linetrace itself can be local

#

the server can block the interaction doing a range check when the information is requested

#

although I'm not sure how this stuff is usually done, I'd perfer if somebody with more experience jumps and confirms how it can be done

leaden pecan
#

hello, can someone help me? Im trying to understand how can i spawn replicated actor with parameters from client side?

prisma snow
#

if the parameters are known only by the client, you could make a server RPC to send those parameters as a struct, and then have the server spawn the actor with such parameters

leaden pecan
prisma snow
leaden pecan
#

mb i am doing something wrong, but i tried different things and just want to know if there a good way of doing this

leaden pecan
leaden pecan
prisma snow
#

difficult to tell what's wrong without more debugging info, but I'd say the idea is correct, probably there's some small mistake

#

I'd debug the flow

thin stratus
#

You share the information via variable and simulate that stuff locally. The only thing you use the RPC for is the actual interaction key press

#

The server can still deny the interaction

#

And realtime is not a thing anyway with higher pings

#

So communicating the state of the interactable with variables is totally fine

#

And preferred

lime bone
#

hey guys πŸ™‚ Im a backend dev currently getting myself into multiplayer networking because Im a huge gamer myself and I want to develop things in this direction. Has any1 experience with replication via websockets? I want to create a nodejs websocket with data storage (not only streaming). What are the cons of using a websocket for replication? Are there any? Thx in advance! I wanted to get myself some opinions before deep diving into it. Maybe it isnt as awesome as I think πŸ˜„

thin stratus
#

Just to let you know that you might not get an answer for this question

lime bone
thin stratus
#

Not entirely sure if WebSockets have any downside

lime bone
quasi tide
#

Need to also consider the scaffolding required. Not just a matter of performance.

#

It's a trade-off, as everything is.

quick pelican
#

hello there

#

can anyone tell me which server is best for survival multiplayer game?

thin stratus
quick pelican
#

i mean services like EOS, AWS,Playfab

quasi tide
#

There is no "best" really.

#

EOS isn't even a server

quick pelican
#

yeah i know

thin stratus
#

Also depends on your Survival Game

#

For most survival games you don't need any of those, as players host their own Servers

#

If you want to host "official" servers on your own then you can still do that with AWS for example

#

But as already said, there is no "best".

quick pelican
#

okay

#

basically I'll make first multiplayer

#

to understand what it is

#

can you tell me the flow of Multiplayer game using AWS

thin stratus
#

There is no "flow"

#

You don't even need AWS or similar if you don't want to host servers yourself

#

Which I would also not suggest, cause it's damn expensive to do that

quasi tide
#

You're also asking an extremely broad question

quick pelican
#

TBH i really Don't know about Multiplayer work

thin stratus
#

Then it's probably best to learn that first before making a game and deciding on expensive topics

quick pelican
#

yeah

#

Anyway thank

#

for your helping

#

.

lime bone
# quick pelican yeah

you should start understanding networking and replication and testing it locally. You dont need an expensive cloud service like AWS etc before it works locally

quick pelican
#

Okay!

thin stratus
#

The second from the top should give you a good introduction

strange geode
#

getting this Warning for a server function that should change the scale of a character, what does it mean?

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

thin stratus
#

Server and Client RPCs require an owner

strange geode
#

but the thing is this is called every 2 seconds, sometimes it will work and sometimes it wont without me changing anything

thin stratus
eternal anchor
#

does this option work ?

summer zinc
#

I wonder if any of you has requirement of 'deterministic' movement in multiplayer mode, and therefore the good solution for it. For an example, if I throw a ball across a hall, deterministic networked-physics means the ball will move and rotate the same in all clients and server, and will stop at the same location too. Currently, the only way is for me to sync the object transform (and not using physics, and nudge/snap the objects). It seems pretty complicated. I used 'SmoothSync' plugin from marketplace and it does seem buggy - sometimes it works, sometimes it doesnt. I even tried my own multicast which transmit the object transform and the client will interpolate it.

#

The best so far is multicast manually (at your own chosen frequency). Object in server and client are spawned manually and not replicated. Both objects are marked for synchronization, and therefore the server will transmit this transform, and the client will receive accordingly - seems a bit too complicated.

eternal anchor
#

there is only one solution to it

#

fixed time step and custom movement based on it

graceful flame
thin stratus
round acorn
#

Just read all of that. My takeaway is: I'm glad I'm using GAS, and glad I'm using Ability Tasks with e.g. PlayMontageAndWait. Even though for my casual co-op RPG that may not be required.

#

I've so far only learned how to replicate stuff like blend spaces and animation graph states to the simulated proxies. But I know this more advanced stuff is coming when I start making advanced abilities that incorporate character movement.

river coral
#

Hey y’all, is there a command to show the current pktLag and net stats on screen?

Kinda like how you can show the fps on screen via a command

graceful flame
#

I believe you can get the ping from the player state then you can print string or add it to a widget or something.

#

When you use simulated lag it varies randomly between the ranges you've specified.

river coral
#

oof time to learn,
I just recently got client prediction movement and root animations working smoothly with pktLag=500 but I'm sure something like the bandwidth must be crazy unoptimized,
thanks for the info ❀️

strong vapor
#

[Question] Hey everyone, I'm lookin to break into using Azure or Gamelift to set up a dedicated server on a source build.. I've worked in a team that used this before but unfortunately wasn't one of the people uploading and managing it. But I have started setting it up before.. anyway my question is: anyone have a good idea of where to start with that? I got a little confused last time and work picked up so I fell off my learning regimen.

#

like maybe if there's a solid source build where there aren't a lot of hiccups.. maybe 4.27?

dark edge
#

Sure $100/hr

#

JK, I don't know shit about rollback but that's the order of magnitude you're talking about.

thin stratus
#

Also such posts should go onto the job board

#

@merry torrent

river coral
#

In UE terms, would Rollback be Server Rewind?

thin stratus
#

I saw a nice animation on Twitter a while ago that showed this

dark edge
thin stratus
#

Well okay. 0 vs 100 then it's a pretty good improvement

#

There are still some peeps working for 15

#

Escapes me but different countries I guess

upbeat basin
#

Would it be considered unnecessary to try to implement client prediction manually instead of using GAS?

upbeat basin
prisma snow
upbeat basin
#

I'm mostly thinking about playing/cancelling animations and changing states locally first for providing more checks for input combos for example

#

What other things does client prediction provides/means?

prisma snow
upbeat basin
#

I'm considering the tradeoff between the time to actually learn the GAS and trying to do that on my own

prisma snow
# upbeat basin What other things does client prediction provides/means?

depends on your game. Could be simple playing animations our could be simulating some part of the game (such as movement or physics or whatever) client-side and then doing reconciliation with the server, maybe with a rewind functionality or other ways for the server to check everything is okish

#

I'd learn GAS

#

once you learn it, you know it, and that will give you tools to do more stuff efficiently in the future

#

also it probably handles all you need (prediction, playing animations, etc)

#

it's quite flexible as well

#

I find it quite abstract to begin with, but the concepts seem clear and there is enough docs I think, as to have information and learn how to use it

#

you'll likely need C++ though

upbeat basin
#

I see, thanks for the opinions

thin stratus
#

@upbeat basin GAS does actually not offer THAT much prediction

#

Even the things it should predict it only manages half

#

We went ahead and added prediction for Cooldown for example manually

#

Same with Stacking GEs for Movement Modifiers

#

We had to ensure we aren't using stacking GEs at all and calculate that ourselves

#

Cause Stacking GEs isn't predicted

#

GAS pretty quickly falls apart if you need more then the GA Activation + GE/GC Adding to be predicted

#

Removal is not supported. Stacking is not supported. State is basically also not supported, cause there is no way to sync it out of the box.

#

We had to set up a custom AbilityTask to sync properties bound to the prediction key

twilit radish
#

This was definitely the disappointing part for me when I tried learning it. The prediction system offers some stuff but generally not a whole lot πŸ˜”

thin stratus
#

A lot of times you might not need more than Activation to be predicted, cause most abilities are throwaway ones where you start from scratch on the next activation

#

But then you touch Key Presses inside Abilities

#

And you notice that if the Client predicts ending the ability, it will force end the server

#

Which, with a bit of ping difference between that call and the Activate call, can result in the server ending the ability too early, not executing part of its code

#

It can get ugly really fast

#

And if you don't do that "force end server" stuff, you suddenly run into situations where the key press rpc is dropped and the server never ends the ability, so that's also not an option

plucky prawn
thin stratus
#

Yeah that's probably said by someone who hasn't actually dived into that

#

The only, I hope so at least, proper prediction in UE is CMC and the Plugin that is still untouched

#

And I have a hard time believing that that plugin will ever be utilized for the entire engine

#

Cause that would require big refactors for CMC and GAS

#

Given Fortnite is in active development at all times, that would be a big thing for them

#

But well

thin stratus
#

The Network Prediction Plugin

#

Sits in the Engine with some examples

#

Person who developed it left Epic

#

And despite some readme updates, nothing much happened iirc

upbeat basin
#

This makes me more aligned with sticking to manual vanilla solutions now, thanks for your examples as well

thin stratus
#

And since the Engine is basically impossible to update with that from a users perspective, we can only wait on Epic to pick it up

thin stratus
#

It's not bad and has some good debugging

#

Maybe that can kickstart you

twilit radish
thin stratus
#

Yeah but that's not shareable

#

Unless they accept a merge of that size

#

Cause it requires everyone to use a custom engine

twilit radish
#

Overhauls half the engine - PR gets rejected πŸ˜›

plucky prawn
thin stratus
#

At some point I will have to read through that plugin to see how far it is and what it exactly offers

#

I'm still sad that the debugging windows aren't a thing for other stuff

#

It shows each "move", what data it has on server and client, which ones were rejected, which ones were replayed. Where the client is ahead etc.

#

In a timeline like graph

#

Try debugging the CMC at the moment and you'll understand why that is a big deal

frank birch
thin stratus
#

I don't think Iris is relevant

#

As in

#

It doesn't have anything to do with the Prediction stuff

#

Prediction would be the Layer on top of Iris/"Legacy"

frank birch
#

Oh, ok. I thought iris was going to overhaul both layers.

#

Anyway, I know the guys from omen of sorrow and they managed to get ggpo inside unreal, so rollback and prediction stuff πŸ€”

thin stratus
#

Will it's a C++ library

#

That's more or less the simplest thing to get into UE from a Plugin Standpoint

#

Also iirc GGPO is not a solution for all sorts of games

#

I think they mainly offer that for fighting type games

#

Cause it's otherwise pretty expensive

#

Best bet is to run your own stuff in UE still I would assume

prisma snow
#

yeah

#

rollback for the entire game state (which afaik is what most fighting games do) is extremely complicated

#

often requires deterministic systems similar to lockstep

#

I guess you can rollback without determinism but then idk if there are better solutions

thin stratus
#

Pretty sure it needs determinism :D

frank birch
#

Just random until we guess the same number 🀣

#

I still remember an answer here of somebody trying to replicate every single physics object in their world, it was something along the way of "it's not impossible, one team once did it. They managed to replicate 9 objects, one of them is a ball and the other 8 are cars"

#

The only part of replication/prediction I still don't get is when the server stomps your variable if you have the wrong value (if ever) πŸ€”

#

Say I predict wrong

#

Is inside the regular replication code to stomp my variable? When?

#

In less abstract terms, in my silly replicated UI.
We are in a lobby picking a character, we can't pick the same one. When I pick, I locally predict the character isn't taken and show you in UI that you picked that character and tell the server that I want that character.
Say the server realizes that is not possible, since that character was taken a tick before (I predicted wrong)... How do I handle the """rollback"""
It has to be an rpc? Or the server just setting my "PickedChar" to none would replicate back to my client and stomp my choice?

thin stratus
#

If you do prediction, you usually work with Timestamps

grand kestrel
thin stratus
#

So that the Server can tell the Client which predicted Action was wrong

#

The RPC would contain all the required state data

#

E.g. your Character

#

But in all seriousness, predicting the selection of a hero is probably overdoing it

frank birch
thin stratus
#

The problem with this is that you'd need more than just the correction

#

Let's assume the client has a 1 second high ping

#

That's the RTT (Round Trip Time)

#

Let's say you select CharacterA, but the Server denies it.

#

The Correction would come back after 1 second

#

.5 to send the ServerRPC, .5 to send the Correction ClientRPC

#

If you select a different character in the mean time

#

Even if that was a valid selection, you'd be overridden

frank birch
#

Ohhhh, great point, many actions

thin stratus
#

So you'd need to keep track of all actions the client does predictively and put a timestamp on them

#

Which is what the CMC does with SavedMoves

#

When the correction comes in, you correct that timestamped state and "replay" all the actions that happened locally predicted since then

#

Everything older doesn't matter

#

That might not really apply to a Unit Selection in UI

#

Unless there was more that you did

#

Maybe the unit selection allowed you to select a skill tree

#

and to put points in

#

Would be really annoying if that was all flipped back to 1 second ago (even if that's a stupid example)

#

If you want this more in theory

#

Read this

#

It's movement related though

frank birch
#

Yep, I know the article, the 3 parts πŸ˜…

#

I did my homework πŸ˜…

#

My question, say we have the "bad" rollback that just reverts everything to 1 second ago, does the code need to fire an rpc from server to the misspredicted client or just setting the variables is enough for the client to know they misspredicted?

thin stratus
#

You usually send an RPC

#

variables are mostly not replicated at all in those setups

#

You'll notice that the CMC itself isn't even replicated

#

It would only be replicated for the RPCs if they wouldn't route them through the Character

#

Acceleration, Velocity, etc. is not replicated

#

They are replicating the Transform of the Character, but even that is intercepted for the predicting client

frank birch
#

What about notifying the other players of my choice? Replicated variable or multicast from server? ("Multicast from server" is redundant, I know)

thin stratus
#

You can mark the variable that represents your choice as replicated with a condition of SkipOwner

#

Then it will replicate for the Simulated Clients just fine

frank birch
#

Ohhhh πŸ€”πŸ€”πŸ€”

#

I never quite knew the usecase for that, thanks!

devout berry
#

Hi all,

Would you say there are certain multiplayer genres where shipping with a p2p client/server model is perfectly suitable even if the game is a huge success and grows? (In contrary to building a dedicated server model), If yes, any examples perhaps?

#

I am thinking something like Street Fighter (while having entirely different network challenges) does not use a dedicated server model, right?

thin stratus
#

p2p is not client/server

devout berry
#

listen server I meant, like one client being the server

thin stratus
#

All kinds of coop games fwiw

#

Generally games where no competitive scene exists

prisma snow
latent heart
#

Co-op games are fine with no dedis.

#

Like the Dead Island 2 coming out in a couple of weeks won't have one and it's fine.

prisma snow
#

And if the game is a success then you'll likely be building more infrastructure etc

#

so it will be fine either way

twilit radish
# devout berry Hi all, Would you say there are certain multiplayer genres where shipping with ...

It just really depends on the kind of game and especially what you can effort yeah. For online PvP games you really don't want listen servers as that's just going to be a mess because of for example cheaters and host advantage. But for example for co-op / PvE based games such as Deep Rock Galactic, Portal, Raft, The Forest to name some examples I really don't see why you would waste all the time and effort and cost on hosting dedicated servers your self, quite frankly I think you will end bankrupt in doing so because those kind of games usually do not have similar monetization schemes as big games like CS:GO, PUBG, Rocket League etc. all have. And yes I'm aware those aren't all made with Unreal but it's more about the "kind of game". Although in specific with survival games like Raft and The Forest you could publish dedicated server builds for people to host them selves. Some games do that πŸ˜„

devout berry
#

Thank you all for your opinions πŸ™‚
I suppose a 1 vs. 1 asymmetric multiplayer (not coop), is probably then also subject to cheating and host advantages etc. so it's probably safe to prepare for the worst early

forest bolt
#

Is the LoginUrl available/stored somewhere after pre login?

forest bolt
pale heart
#

Hi everyone I have a pb with UI and local multiplayer, I Have a split screen game and I create a widget for every players. The widget contains a combobox but it seems that only the one on the first player widget is selected the other display the color of inactive and the second player can't interact with it does someone had encouter the same pb ?

frank birch
karmic trellis
#

how can I import marketplace plugins to server launcher on ue5?

frank birch
#

my point being, in coop / not competitive games, cheating is less of a thing πŸ€·β€β™€οΈ
it's about the experience πŸ€·β€β™€οΈ

#

like cheating singleplayer with a trainer or something like that πŸ€·β€β™€οΈ

devout berry
#

It would be competitive, just only against one player and asymmetrical gameplay πŸ™‚

karmic trellis
#

I did a workin matchmaking system with microsoft playfab but I dont know how to start now coding for server, can somebody help me?

civic storm
#

If EOS voice chat only does 16 max, what's the next best option for more than 16 people for voice chat? I want to do positional/proximity voice chat to be specific

hollow bridge
#

Tip: I just found out the overriding multicast events is a bad idea( cause duplicate calls) avoid it

quasi tide
#

Did you call super?

hollow bridge
#

Yeah

quasi tide
#

Well - there ya' go.

#

You told it to be executed twice.

rancid marten
#

so I have certian files I would like to download from server and match up before the client launches into game. Where would I look for this type of knowledge in the engine?

civic storm
sterile plaza
#

I have some questions about using EQS.

Context
I want to spawn several units around the player's cursor, so I need to find locations that are empty. I have an EnvironmentQuery set to check in a donut around the context.
There's no object at the location, so I'm writing my own EQS context that uses PlayerController->GetHitResultUnderCursor() to provide the location for said donut.
I obviously want to spawn the units on the server, but the server isn't going to have cursor information.

Questions

  • Every example I've seen of EQS uses it in a behavior tree for AI to look for the player, or something similar and so it's constantly being run and used within a BT. I only need to do this when I want to spawn something, but the EQS result is async. Is the intended use that I would be running EQS to look for spawn points all the time and then when I want to spawn, I use whatever is currently valid? Or should I only be running it at the moment I want to spawn something and storing the spawn request in a queue or something until I get an EQS result?
  • How reasonable is it to have the local player run the query to find the N spawn locations and then send those to the server as part of the request, rather than having the server run the query? This feels like work the server should be doing, but it doesn't have the context from the player's cursor hit location.
#

Some of this feels like very basic concepts, but I can't find any useful examples of using EQS for something like this. I know EQS is often used for spawning, so I'm a bit befuddled at the lack of examples

river coral
#

I hope this is the right place to ask,
Is this the best way of replicating an anim montage?
(In-place/Root motion) are stutter free at high ping but was wondering of any best practices I may be missing.

sterile plaza
#

I haven't done montages in a while, but don't you want to play the montage on the server and replicate it?

river coral
#

yeah, thats what this does

sterile plaza
#

that's playing the montage when you press R

#

and then playing the montage on rep

#

it's not playing any montage on the server

river coral
#

oh the montage gets replicated to the server and all other clients "simulated proxies" but only gets played locally to the user "autonomous proxy"
At least that was the intention, feel free to correct me if I'm mistaken

sterile plaza
#

You're playing a montage on the instigating client.
You're sending an RPC to the server which flips a bool that replicates and in the onrep, you're playing the same montage on the clients.
At no point does the server do any montage stuff.

river coral
#

oh I see, is that the wrong way to do this?

sterile plaza
#

I think the ideal approach here is to locally predict the montage and play it locally, RPC the server.
Then the server plays the montage on your character which will get replicated to clients. No need to do any OnRep.
If you're using gameplay abilities, they would help you manage that prediction.

#

if you're not doing any of that, then this seems like a fine approach I suppose

#

I'm not super familiar with how root motion stuff works over the network, but it seems weird that you could control that locally.

#

if all you're doing with replication is OnRep, you can multicast RPC. would be cleaner

#

also servers don't get OnRep

#

you'd need to call that stuff manually on the server

river coral
#

I was using a multicast RPC at first but read on the UE docs that onRep saves bandwidth and should be used over RPCs if possible

sterile plaza
#

my concern with that approach though is it might feel unresponsive for the instigating client if your ping to the server is high

#

thus the local prediction

river coral
sterile plaza
#

I think if you're not going to do local prediction, your approach is probably the best you're going to get.

keen hound
#

why isn't this working?

#

I connect but my friends in the lobby dont

sterile plaza
#

I don't know.

#

are you listen server?

keen hound
sterile plaza
#

have you tested it with PlayAsClient?

#

I'm not familiar with that console command, but I'm guessing it doesn't work across the network.

keen hound
sterile plaza
frail barn
#

i need to get location under cursor for a client
how to do it correctly?

quasi tide
#

Client RPCs it to the Server

wheat rose
#

Hello! I currently have a blueprint to teleport someone who interacts with it to a specific location. However it only teleports the host of the session and nobody else. Could someone please help me figure this out im hardcore struggling with these blurprints

#

trying to make it so that the specific person who interacts teleports, others can interact and follow them

sterile plaza
frail barn
sterile plaza
#

the blueprint node with the same name

silent valley
twilit fable
#

Did you have experience with unreal engine Steamcore multiplayer setup which is non region locked ?

idle jay
#

guys, if i want to make a client control an actor, how do i make it not replicate to itself?

#

I mean, if im controlling a pawn, and i make it move on my client, and also send the information to the server

#

the server wants to re-adjust the same pawn

#

so i want to make the server not replicate the pawn to the client that is owning that particular pawn

#

should i use multicast and send the owner as well?

#

basically i clients to sync themselves instead of the server syncing everyonme

thin stratus
#

@idle jay That's honestly CPP territory

#

You could something similar to the Character

#

Or if you can just use the character

idle jay
#

why is it so difficult thouhg?

#

i dont want to use the default character but im also not very good at cpp

#

but we have a ton of options in BP as well, and it shouldnt be so difficult

kindred widget
#

Is the pawn possessed? You're using SimpleMoveTo or whatever?

#

If yes, you shouldn't need to do anything but call it on the owning client if I'm not mistaken. Movements should already be sent to server and replicated to others.

#

If you're doing AI related stuff where a player moves around an AI controlled pawn. Then you should instead just RPC the move order to server, and let server's AI controller handle it.

idle jay
#

im using a possessed pawn

thin stratus
#

I don't think pawns have much Network stuff by default

idle jay
#

but it doesnt replicate the movement

thin stratus
#

The standard MovementComponents don't have any prediction

kindred widget
#

Yeah, I was assuming character. CMC handles that for you. You'd need to do that all yourself, which is doable in BP, but will be dreadful performance wise.

thin stratus
#

I wouldn't say it's doable in BPs tbh

idle jay
#

cmc?

kindred widget
#

Character Movement Component

thin stratus
#

Character Movement Component

idle jay
#

im not using that

thin stratus
#

BP only is kinda f*cked if you aren't using the Character

#

Recreating that stuff in BPs for a Pawn is almost impossible I would say

idle jay
#

but we are talking about the simplest thing

#

we have 2 billion features in unreal but cant make a simple position sync with bp?

thin stratus
#

You are asking about replicating the Transform but skipping the update locally

idle jay
#

that's not server sided?

kindred widget
#

It's not that simple. You're missing the understanding of how most pawns are moved.

thin stratus
#

And this kind of movement is not simple.

kindred widget
#

You can do that in BP. But past doing a basic interpolation movement, it's going to be a disaster.

#

BP has skip owner settings on properties, you can locally do something, and RPC it to server, and let server replicate that to all non owning clients.

idle jay
#

yeah i was about to ask that

#

so that should be much easier since the basics are handled by the server

thin stratus
#

Turning off the replication of transform for the local client needs CPP. You can send an RPC all the time if you want but that's unperformaned as hell

idle jay
#

this kinda sucks, mytbe i need to learn cpp

thin stratus
#

Well yeah that kinda thing is a broken record here

#

Telling people that multiplayer most likely requires them to learn CPP cause BPs can't do all of the needed stuff

#

BPs were created as a design tool to script simple things. People starting overusing them to make full games. Singleplayer that might be okay but for multiplayer BPs are just missing 80 or so percent of the engine

idle jay
#

can i somehow make a code with bp and view it in c++?

thin stratus
#

There is some header viewer tool in I think 5.1

#

But can't tell how good that is

kindred widget
#

Honestly, even singleplayer games need at least a little minor C++. 😬 Coming from a control handling and UI perspective, that is just not really acceptable from a BP only standpoint.

idle jay
#

wonder what's gonna change in 5.2

#

I mean, they are going to add a new easier scripting method

#

afaik

thin stratus
#

You mean Verse

kindred widget
#

Verse isn't really going to be used to replace C++ though. And honestly using C++ in Unreal is super easy if you just learn some core basics to programming, follow the UPROPERTY/UFUNCTION and UCLASS rules, and learn the syntax.

Still a mountain, but not deathly impossible to get to a decent height on in a few months.

thin stratus
#

Which is used in the Fortnite exclusive Editor

#

This won't ship for normal UE for at least a while

#

We non-Fortnite peeps are stuck with C++ and BPs

#

And tbh, Verse doesn't look that nice anyway :<

idle jay
#

terrible news

#

just setting up visual studio for unreal makes me want to never use it again

twin juniper
#

Tim said Verse won't be available for UE for at least ~18 months so they can improve the syntax, fix bugs etc (from his twitter)

thin stratus
#

Long live Rider

idle jay
#

its unbeliveable how difficult

#

just setting up this thing is........

#

because just opening a file and modifying the code is too mainstream

azure hollow
#

I am testing steam multiplayer and it works fine when I create session/join in standalone. The issue is, when I package my game (to send it over to my friend for testing) I cannot create the session. Is there something I am missing? I can see that steam is connected tho
thankssss πŸ™‚

idle jay
#

can we open default UE blueprints with visual studio? TPScharater for example

meager socket
#

Question: what server can I attach or use that free with a limit or affordable to use with UE5?

Note: been trying to develop an online game, I am use to photon for unity, but I tried to setup a photon with ue5 but does not work and requires another plugin or something which I am lost on what that is.

Does anyone know what dedicated server works with UE5?

gritty nymph
#

alright so I'm trying to use GAS and for some reason the projectile isn't replicating :./

silent grotto
latent heart
#

Probably didn't install teh correct .net versions or something

idle jay
#

actually it worked properly this time

#

I dont know why, last time i tried installing it it seemed needlessly complicated

latent heart
#

The VS installer even comes with a UE package now.

idle jay
#

like, on the website there is a tutorial how to set it up and i talks about sidebars and other stuff which i dont give a flying fuck about

#

but for some reason they included that in the setup

#

but yeah, now I just installed it and it worked

#

so all i have to do not is tell chatgpt to make the game for me

#

then copy the code

silent grotto
#

hm sounds interesting. Like I said earlier I never followed any instructions, I just installed it and it worked. Kinda hard to imagine what could go wrong tbh, first VS i used was 2013 and then started using all newer versions - never had issues using their installer/updater. Sounds quite interesting to me. What exactly did not work out in your first attempt installing VS?

#

Just curious

idle jay
#

it kinda seemed like the way it supposed to work is

#

you follow the tutorial, set everything up, then load unreal and it opens by itself

#

which it does for me now, but back then

#

I followed the tutorial, opened unreal and nothing happened

#

so i figured i must have missed a step or something

#

but did not have time to troubleshoot the problem so i just left it as it is

#

and now i retried it and it worked for the first time even without the guide

#

magic

silent grotto
#

hm can you link the tutorial you were using?

idle jay
#

maybe it was not compatible with my UE version or something. Im sure I have downloaded the correct things because its literally just 3 clicks

silent grotto
#

this was my first guess, you using UE4 and trying to use VS22 but nvm

idle jay
#

originally i tried using vs17 with ue4

silent grotto
#

that should still work, i think mine opened with 2017 still even tho I had 19, but I think you can choose between those, at least for UE4

#

i think it does still support VS15, 17 and 19

#

but i might be wrong

idle jay
#

vendetta, can I open the TPSCharacter Blueprint with VS?

#

or any template file?

silent grotto
#

I am not familiar with "TPSCharacter" but you should not be able to open blueprint files like c++ files.

stoic lake
#

Can someone tell me why I'm getting this message?

idle jay
#

its a c++ file

stoic lake
latent heart
#

If that's fine, go with it.

silent grotto
stoic lake
latent heart
#

Warning? Reminding?

silent grotto
# idle jay i mean its a cpp blueprint

Blueprints, as far as I understand, are running on a virtual runtime environment, it is like a script language that gets compiled for performance gain before it is executed, unlike JS which only gets interpreted when its called and then executed. BP however get compiled before and they call their C++ equivalent with a little more overhead

idle jay
#

hmm, well, then the next question is

#

πŸ˜„

#

can I access the uncompiled version of the TPSCharacter somehow?:D

#

i actually just want to see how it's coded

latent heart
#

At runtime? No.

#

You can't "uncompile" packaged things either.

#

Surely you just need to create a new TP project?

#

Unless you're trying to reverse engineer somebody's else's code.

idle jay
#

well, its a template file

#

i just expected it to be accessible in some way

#

because the networking of the default character is quite okay

#

so i figured i could check out how it's done

silent grotto
#

well, you can think of the "uncompiled" version of blueprints as the project BP file, which is still accessable and editable in UE, the file in the shipped game folder however is not.

#

I think that explains it quite well

latent heart
#

Yeah. Just open the blueprint in your project.

#

It's all there.

silent grotto
#

like, access them or edit them? For the template file I mean

idle jay
#

let me see

silent grotto
#

wait, what is the template called? is it the TPScharacter you mentioned earlier or are we talking about a different file?

idle jay
#

its the TPSCharacter

silent grotto
#

Cause usually something that is build on top of the unreal templates is not reeeaaaly editable, except for the BP of course but most code is done in C++ and you need to download UE source code to view the cpp files, you can only view the .h files I think

silent grotto
#

i mean did you download this "TPSCharacter" or did you create it yourself?

#

Like I am just trying to understand what it is cause if you create a BP in Unreal its usually accessable and editable

thin stratus
#

@idle jay The general rule is: You can open and view almost every CPP class in form of a Header and CPP file.

Blueprints don't have CPP files. Those have no CPP code you can view. Only the parent classes or the components (if those are CPP) can be opened in VS

silent grotto
#

yeah, I was about to say, if the TPSCharacter is build on top of Character, aka it inherits from ACharacter then you need to download the UE source code to fully view it's c++ code.

thin stratus
#

Binary UE builds have source with it

#

Unless one disabled that option when downloading it

silent grotto
#

As far as I know, at least for UE4, all that is shipped is the header code.

#

even with that option enabled.

thin stratus
#

That would be new to me

silent grotto
#

Thats the reason I downloaded the source code

#

it was like this to me for UE 4.26

thin stratus
#

I only ever downloaded the Source from Git if I need to modify it or need additional stuff like Dedicated Servers

silent grotto
#

Actually, I might be mistaken - i think i downloaded the source code cause it was only viewable but not editable

thin stratus
#

You can view the code just fine with the launcher version

#

Yeah that sounds more correct

silent grotto
#

Yeah, then it was like that ^^

#

When talking about this, I used the CMC for making my own Pawn class. Its some kind of hoverboard and I want it to be replicated, like its movement etc.

#

I did movement control like this: Input is handled in a controller that is specific for all HoverBoardPawn classes, cause it is juse the base class for some childs. But the mechanic itself is implemented in the Pawn class which is then called by the controller. Idk if thats the smartest but I have heard it can be handy doing it this way

thin stratus
#

Hover physics and custom CMC gives me nightmares

silent grotto
#

Oh I just used the original CMC in a child Character

#

so all mechanics use the original CMC

#

but now I wonder, the way i did the control-mechanic-relation where to implement the replication

#

like do I need to create a server_execute and client_execute function in the Pawn/Character class? Or does the controller need to replicate the call of the Pawns function as well?

thin stratus
#

Yeah I went a bit further cause I need to drive on walls etc

silent grotto
#

yeah, I thought so to, thats why I started preparing a class diagram but its not done yet

#

I think this is enough to explain what I did

#

so, my question basicly is: Do I need to replicate the Character's function "MoveForward" or do I need to replicate this function's call from the PlayerController too? Like how would you replicate this movement function?

thin stratus
#

But if you are overriding the cmc

#

Why does that matter

#

The CMC performs the replication

#

The AddMovementInput call only happens on the client

#

You don't need to further replicate the input move

silent grotto
#

I was using AddForce instead of AddMovementInput, not sure if that makes a difference (need to look it up actually) but this for example was not being replicated

thin stratus
#

Wellll

#

Then you are probably also not getting any of the proper prediction

silent grotto
#

Yeah

thin stratus
#

You can modify the CMC to work with hovering and still use add movement input

#

Which is probably preferred

#

You just need to modify the CalcVelocity function and utilize the acceleration differently

#

Fwiw you can already get similar movement by just changing the acceleration value

silent grotto
#

Currently trying to understand how AddMovementInput works

#

Ok so its a function from pawn, that calls the pawnmovementcomponent function AddInputVector which then calls the Pawn class function "Internal_AddMovementInput"

idle jay
#

hmm

#

are chaos vehicles synchorised by default?

silent grotto
#

@thin stratus when using the AddMovementInput i reach much lower speeds using the same vector, why is that?

silent grotto
idle jay
#

yeah

#

i mean, i'll see it in 5 minutes

silent grotto
#

Well, since they are using chaos physics no. You can still replicate them but anything using any kind of physics should not be replicated. I tried it before and it is laggy and glitchy as hell. It does work but I don't think the result is what you want and (i think) there is no way to improve it.

idle jay
#

what do you mean any kind of physics should not be replicated, well then how are racing games made

#

πŸ˜„

#

just because it uses physics it can be replicated smartly

silent grotto
#

Well, physics like destructions or the chaos car vehicle are physics simulation. And that should not be replicated. Instead of doing a phys simulation they have written some simplified physics code that is easier to replicate. At least as far as I understood.

#

I think the problem is that the unreal physics simulation is way to accurate to replicate it all correctly in time. Idk if internet is to slow to achieve its replication on low ping or if the calculation itself is too expensive to be replicated among multiple players, but usually it is not done.

idle jay
#

well yeah obviously its not gonna look the same, thats why

#

well, usually games use some sort of rubberbanding

#

i think when it comes to a vehicle, you might not even have to simulate it on the remote client

#

just update its coordinates and velocities a couple times every frame

thin stratus
#

If you use force you won't be happy in the long run

silent grotto
#

Yeah, i mean in the end this is almost always whats done - replicating just position and rotation ( i guess). But then again the chaos vehicle requires you to turn "Simulate Physics" on to work properly.

thin stratus
#

Cause you lose the prediction

silent grotto
thin stratus
#

Formula One for example

idle jay
#

thats exactly what i want to do in unreal but for some reason its unreasonably compilated

silent grotto
#

It's not a simple thing in the first place tbh

thin stratus
#

Shouldn't VehicleMovementComponents have the option to just be client auth?

idle jay
#

its not a simple thing but IMO server auth stuff are more complicated, because then you have to display it to the client and that has to look acceptable..

thin stratus
#

Reminds me of the time where the coop campaign in F1 was a Rain Race for me, but dry for my teammate and the bots.

idle jay
#

i mean, having everyone else lag is much less annoying than when your own character does it

thin stratus
#

xD No it wasn't. I slipped away on softs

idle jay
silent grotto
idle jay
#

also in wreckfest beta we had server synchorised vehicles, but there was a bug and the server loaded a different map

#

so you controlled a vehicle that was driving on a different map than what you saw..

thin stratus
idle jay
#

okay i tested it and chaos vehicle do work in multiplayer

silent grotto
#

That is interesting. I did not think it was gonna look good but seems like I was wrong.

silent grotto
thin stratus
#

But they use the same game for years now

#

Just patching it

#

I still have the same bugs in 22 that I had in 19

silent grotto
#

Oh so they're not doing the FIFA move?

thin stratus
#

na they just update the physics model and add new car meshes

idle jay
silent grotto
#

that sounds actually nice. I need to get the latest F1 game then. I think all I have is 2012, 2014 and some reeeaaaly old gen game released before year 2000 ^^

silent grotto
idle jay
#

im checking if i can see if i can make it client controlled

thin stratus
#

The cars are barely drivable compared to the real ones if you take away assists

#

You spin more often randomly than anything else

#

If you want to drive proper cars, check out iRacing if you have the cash

#

That's where I had the most fun

silent grotto
#

I'll take a look on that later. But the thing about having no control about the car once assistance was removed is exactly what I remember from F1 2012 & 2014

idle jay
#

iracing is very good if you have a steering wheel

#

but the latest f1 game is horrible with a gamepad

#

actually, idk what they massed up but the 2019 one was quite okay

#

and the current one is undriveable

#

with a joystick

thin stratus
thin stratus
#

Sadly the older ones have no coop campaign

latent heart
#

Driving as a pair?

#

That sounds fun.

thin stratus
#

Yeah, you can be in the same team or different ones

#

It doesn't offer the same management stuff that MyTeam has, where you are the 11th team on the track. But you can do most of the R&D stuff. One of you two at least, unless you are in two different teams

silent grotto
#

Btw how does the CMC change pawn rotation and replicate it? It is not using AddMovementInput obviously :3

thin stratus
#

We usually pick some underdev'd teams, like Williams, to not just drive away

thin stratus
silent grotto
#

ControlRotation?

thin stratus
#

Yeah that's a Controller value

silent grotto
#

So it can be adjusted by a PC for example?

idle jay
#

the chaos vehicles are so broken ffs

#

i set my pawn to be the offroadcar and i start in the sportscar

silent grotto
#

why is it only adjustable by the controller

#

I mean it kinda makes sense but then there are some scenarios where it doesnt

thin stratus
#

Most peeps hook that up to mouse inputs

#

To control the camera

silent grotto
#

True

#

but in my case I also want the ground to effect the pawns rotation, and it makes no sense to do that from the controller. I dont think AddControl-AnyAxis is gonna make that easier :/

thin stratus
#

That's all the reason why I made my own

silent grotto
#

Does the AddMovementInput already some kind of gravity? Flying had no gravity before so I added it(made me stick to the ground but also fly off ramps and then land on the ground again) but now it seems like I don't need to add a custom gravity to stick to the ground when "hovering" down a ramp which is kinda strange

thin stratus
#

Ultimately, for the Ground you need to check the Floor Normal and interpolate the rotation from current to the one based on the normal

silent grotto
thin stratus
#

I can't suggest that :D That takes a long time to set up

silent grotto
#

uuuhh

thin stratus
#

Try to first set the CMC to not use the ControlRotation

#

And then control the rotation of the UpdatedComponent by hand

#

As long as you ensure that Server and Client do the same thing, it should be fine

#

In C++ CMC Child of course

silent grotto
tranquil yoke
#

If a variable is RepNotify and have a condition, SimulatedOnly, will that run on Server ? or only in Simulated Proxies ?

idle jay
#

is it possible to have something simulated on clients but not on the server?

tranquil yoke
#

what kind of simulations ?

idle jay
#

im asking it because of your question

tranquil yoke
#

To my understanding, the role of an actor, will determing where it will run, so server should not have simulatedRole for this actor, It was working correct in ue4, in ue5 it is causing me issues, Let me check the Role of Actor on Server.

thin stratus
#

Server has Authority usually

#

Also RepNotify, theoretically doesn't run on Server at all

#

It could be that it triggers on the Server because the Variable changed, because Blueprints just use a PropertyChangedNotifier for their OnReps

tranquil yoke
# thin stratus That should only run on Simulated Clients

I see Roles are correct, and the code is not suppose to run on Server, but it is running, on Server(Auth) and on other Client(Simulated).

I am doing this in Blueprints, so which means when property changes for a variable it will get execute on Server, Client (Autonomous), Client(Simulated), it used work correctly in UE4

thin stratus
#

Idk if there are any side effects of this being done in BPs. I only know that OnReps in BPs aren't actually OnReps. They call when the variable changes. If you set the condition to simulated only and you are changing it by hand on Autonomous and Server, then they might be calling it due to it being a PropertyChanged Notifiers

tranquil yoke
#

hmm, so this is how it suppose to run for BP, but it was not working correctly in UE4, not it is working in UE5, and everything is messed up.

so condition applied in BP will not do anything now ?

thin stratus
#

Cause you are def not causing the data to be replicated to the Autonomous Client

#

It's just the function itself that works differently in BPs

#

If you would only call SetVariable on the Server

#

Then the Autonomous Client should not call OnRep

#

The Server might though due to the OnRep being a OnVariableChanged function in BPs

tranquil yoke
thin stratus
#

That or you filter in the OnRep

#

HasAuthority

#

And IsLocallyControlled fwiw

tranquil yoke
#

yeah probably that too.

thin tulip
#

Within a NetSerialize(FArchive& Ar, UPackageMap* Package) function, is there any way to tell from the Archive or Package if you're on the server or client?

#

In my case there's two-way communication using my struct so I can't just assume IsSaving() is server and IsLoading() is client.

#

And I need to do different things in some cases depending on whether it's deserializing on a client or a server.

#

Aside from doing something like GEngine->GameInstance->GetNetMode() I suppose.

real ridge
#

hello guys I have one question I made bomb which will explode when it hit something but when it will hit a player i wanna take him damage I did it just same way like with shooting
but its seems like its not executing when I hit player it will just fly over him and not explode or take damage

#

any ideas what I did wrong?

sterile plaza
#

are you hitting those functions?

real ridge
#

seems like bomb damage not executing idk why

sterile plaza
#

does the overlap get hit?

#

also, you should do the overlap resolution only on the server

#

no need to do that on the client and RPC it

real ridge
#

it is detecting

#

i am hitting him

real ridge
sterile plaza
#

why though?

#

do it all on the server

real ridge
#

okay but thats not problem why its not working i need try it again

graceful flame
#

But it is the problem, who’s the owner of the bomb? A player or the server?

real ridge
#

I am sending owner here

graceful flame
#

Don’t spawn actors on client if they need to be used for gameplay logic.

#

The actor only exists on the client, so you’re trusting them not to cheat and drop more bombs than they have available.

sterile plaza
#

What you need to do when a player shoots:

  • call ServerShoot() //rpc with whatever information is necessary
  • server creates the bullet that's replicated to clients (if clients need to see it)
  • server detects collision and deletes bullet
  • server applies damage
graceful flame
#

If you spawn on server and replicate then you can use overlaps without rpc

#

Bomb is also a pawn? You can control it?

real ridge
graceful flame
#

Why not just actor?

sterile plaza
#

replace bullet with bomb and it's the same

real ridge
sterile plaza
#

it's not really

graceful flame
#

What? A pawn is a type of actor

sterile plaza
#

you should use actor, not pawn

graceful flame
#

But a pawn has additional overhead that lets you connect it to a controller and move it around manually.

sterile plaza
#

pawn is an actor that adds stuff so it can be controlled, that's it

#

none of this addresses it failing to detect overlaps, but that's not a networking issue

sterile plaza
#

gotta make sure they both have detect overlaps enabled, make sure they're generating overlaps on the right channel, etc

#

get rid of "BombSpawnClients"

#

you're not going to manually spawn any bombs on clients

real ridge
#

but I can use pawn if I want or?

sterile plaza
#

you're going to spawn it on the server and it's going to be a replicated actor and will automatically show up on clients

real ridge
#

okay

sterile plaza
#

you can, but there's no benefit

#

just use actor

real ridge
#

so like this

sterile plaza
#

yes

#

make sure your bomb actor is set to replicate

graceful flame
#

You kind of have to always be using the most optimized approach when working with multiplayer because the frame budget is less than single player games due to the network data. Every decision matters as they all contribute to frame time.

sterile plaza
#

that's on the player controller?

real ridge
sterile plaza
#

I find I'm generally more concerned with proper ownership than performance, at least when setting things up initially.

#

Nice.

real ridge
sterile plaza
#

that works too as you own your pawn and can call RPCs on it

#

are you seeing the bomb show up on clients?

#

if you're not already, I suggest testing with "play as client" to ensure things are RPC'ing and replicating appropriately and you're not accidentally cutting any corners accidentally

#

in standalone you can forget to RPC and it will still work

real ridge
#

now I am again try give damage

sterile plaza
#

are you hitting the overlap events?

real ridge
sterile plaza
#

awesome!

#

breakpoints are your friend

silent grotto
#

Welcome to the process of debugging :d

sterile plaza
#

networking is generally complicated enough that I always step through it to guarantee the code is doing what I expected

real ridge
#

its showing one actor is damage causer and also damaged thats propably problem

sterile plaza
#

?

#

that looks right to me

real ridge
#

i am not givin any damage because when I print damage causer and damaged actor both are same

#

ah not lol

#

I am blind

#

πŸ™‚

#

πŸ™‚

sterile plaza
#

step through it with breakpoints

#

I guess for that you would need to play as server with 2 clients

real ridge
#

lol thats weird I debugged it whole

#

and there is no mistake

#

all values are good πŸ˜„

#

ookay it cant cast to player

#

so it wont take damage

#

apply damage is failing

silent grotto
#

One advice before such a thing escalates into bigger problems.
You should be careful with casting. Casting itself is totally fine. But you should try to understand when you can use casting and when you should try to avoid it.
And I think in your case it might be handy to avoid it because you could easily apply this for other things, which you might want to do later.

real ridge
#

no idea why its not working

silent grotto
#

Try to use interfaces instead. That way you do not need to cast and you can easily apply your "take-damge"-function to other actors

#

But did you not say the cast failed?

real ridge
#

yea its on screen

silent grotto
#

Oh, I thought you made a custom one

#

Can you show where you're casting? Maybe I can help

real ridge
#

no no

silent grotto
#

other then that I honestly have no clue why it is not working ^^

silent grotto
real ridge
#

in bomb

#

bomb is spawned by player

#

by pressing spacebar

sterile plaza
#

I suggest you check to see if you're the server at the beginning of ActorBeginOverlap as you don't want to do anything on clients

#

and you don't need the RPC, just call do damage directly

sterile plaza
#

that would work, yeah

real ridge
#

working now

#

it wanted pass owner

#

to causer not self

#

i dont know why

#

bomb is actor too

#

do you know why?

sterile plaza
#

why does it want the bomb to be the damage causer?

real ridge
sterile plaza
#

I'm not intimiately familiar with that function, so I don't know what damage causer is supposed to be.

real ridge
#

before there was bomb

sterile plaza
#

comments say it should probably be your bomb

real ridge
#

do you think if I will try spawn there "illusion" of explosion it will draw on both ?

sterile plaza
#

depends on whether those are replicated or not

#

I don't know off the top of my head.

silent grotto
#

In my op particle should only be done per client

#

like the server can tell clients to spawn it but not spawn any emitter itself

real ridge
#

i should call multicast

#

after damage function

sterile plaza
#

yeah, there's generally some, "hey clients, there was a hit here, you should do client things"
like play effects, sounds, etc

real ridge
#

should draw like this or?

#

bcs its not πŸ˜„ heh

#

but when I use run it on owning client I see it atleast at my monitor

sterile plaza
#

RPC that to client

silent grotto
#

yo short question, because some people said replication can only be done in C++, what is the difference between doing replication using blueprint and C++ ?

sterile plaza
#

you can replicate in BP

silent grotto
#

Yea, thats what I thought as well, but is there anything regarding replication that blueprints can not do compared to c++?

#

Like is there something important that only c++ can do?

latent heart
#

Specialisations.

silent grotto
#

That means?

#

I am just talking about networking/replication btw

latent heart
#

If you have large or complex data that needs to be replicated in a certain way or needs extra code surrounding the replication (such as the fast array replication problem talked about in #programmer-hangout a short while ago), you can't do that in bp.

silent grotto
#

hm okay good to know. What about prediction. How is that done in BP or rather is it done automatically?

latent heart
#

Same way it's done in c++?

#

Depends on what you're predicting.

silent grotto
#

Or is prediction just "server executes it and sends it to clients" ? Like I am not very familiar with "prediction" tbh

#

I am very new to this entire networking stuff tbh

silent grotto
latent heart
#

I don't see why that'd be any different from cpp?

silent grotto
latent heart
#

Basically prediction is the client doing things it predicts will happen, without the sever telling it to. The server just corrects or ha the client rollback if something is wrong.

#

Complex things are just easier in c++ because bp is clunky.

silent grotto
#

Hm okay, well I understand this definition of "prediction" at least

latent heart
#

For movement, it might predict that an actor will continue moving in a given direction. The server is gonna send position and direction updates periodically anf the client corrects.

#

But there are limits. If that simple movement was a projectile running into a wall, it probably wouldn't predict explosions and deaths.

silent grotto
#

That makes sense, I guess

strong vapor
#

[Question] ok so I got my source build and dedicated server working. I can join the local host with Open 127.0.0.1
now... how do I do it the big boy way?
I gotta deploy this thing to an azure server or gamelift or somethin right? is one easier to grasp? should I play around with EOS first? and if so.. can I get my clients to connect to my server that's being run here at home with EOS?

latent heart
#

Use sessions.

#

You can use the null session interface for lan, I think.

strong vapor
#

ahh ok.. I've used sessions before with my listen server game

latent heart
#

Eos doesn't require cloud servers or whatever.

strong vapor
#

very nice to know

#

I'm workin my way up to cloud servers.. need to learn it for a job

#

and just for.. it being good to know lol

latent heart
#

They're basically just like regular servers you run at home, but the environment is a little different.

#

The server itself will be very similar.

strong vapor
#

would you recomend playfab over gamelift?

#

I feel like I saw more documentation and tutorials for playfab

latent heart
#

Can't say I've used either.

strong vapor
#

gotchya

#

well thanks for the advise either way!

dark edge
silent grotto
#

Btw I've got a quesion for you. I successfully replicated some actors movement. I can change the movement direction by rotating the actor, movementwise this works good, however it looks like the actor is only rotated for the client rotating but no other clients

strong vapor
#

still tinkerin.. might ask more questions in a bit

#

on my dedicated server.. this is firing the OnFailure pin everytime

#

is it because its asking for a player controller?

silent grotto
#

Does anyone know why this is not being replicated?

#

I mean it shows for the player firing this event but other players look unchanged even tho they have changed rotation...

idle jay
#

i've actually found a way to replicate something with client authority

#

in blueprints

#

but you are no going to like it

silent grotto
#

show? :o

meager spade
#

anyone seen issue when late joining causes dormant to all actors to remain undormant?

idle jay
#

needs further investigation, also its not gonna be very good but for my shitty game it could be good enough

#

its not gonna be the next valorant thats for sure

#

in terms of network performance

#

but my theory is: I replicate the root of the actor, which replicates its components, but turn off the replication for the component that i want to move, then make a function that sends transform updates to the server along with the player ID, basically an RPC, then the server receives this and calls a multicast function, which sends the data to all clients, along with the playerID, and on the client, just do a simple playerID check, if it doesnt match then update the position

#

or, somehow interpolate the position every frame so it doesnt just teleport and stop

#

and hope no-one ever finds out the way it works because then they'll run out from the room

grave lynx
#

Hello, do I need to multicast if I'm changind my character anim class with LinkAnimClassLayers?

meager spade
#

you should not multicast a state change @grave lynx

#

should be handled via a replicated property like ActiveLinkAnimClass

#

and the onrep will set it on the clients

grave lynx
#

I mean I don't have the character ref, I can only get the local on the onrep

silent grotto
#

@thin stratus do you have a clue why when changing the control rotation from palyercontroller it has no impact on the pawns rotation? I thought this is being replicated

sinful tree
thin stratus
#

And this is not replicated iirc

#

Like not in the traditional sense

#

The CMC sends that data packed along with the rest of the ServerMove stuff

silent grotto
meager spade
#

if you want the pawns rotation,best to use APawn::GetBaseAimRotation

#

on remote side

thin stratus
#

It's more about new movement

subtle peak
#

Hey I have an event to disable visibility on the character mesh while the player is scoping with a sniper. Of course I want this to only happen to the player who is scoping.
Now from the servers perspective, this works, but the client sees when the server disables visibility with this event. Why?

#

Its run from this

grave lynx
#

my bad I forgot to call the OnRep on server side

thin stratus
#

But there is more to this:

  1. An RPC for this is wrong. Visibility is a state and should be done via a variable.
  2. If the local Client presses the key for scoping, then you can just hide them with an RPC. If you first ServerRPC and the ClientRPC again, then it takes a full Round Trip Time to hide the meshes for a Client
subtle peak
#

Aha I see. Thank you!

split forge
#

Hey all, I'm trying to find resources to make a standalone multiplayer game for Meta Quest 2. but I'm not able to get anything solid. I'm fairly new to this. Using the Unreal engine. I do know about the Epic server and Steam party. But I'm not sure if those will work without a need for a pc connection. Thank you for any help n tips!! ..

thin stratus
#

You can code your game the same way, but the Subsystem that is responsible for Sessions would need to be the Oculus one

#

Which might have different features available than Steam

#

I'm not sure if Epic's EOS has Oculus as Auth Method

#

Or rather if that works for Oculus

#

But if you want to stick with just Oculus anyway, so no cross platform, the EOS is not relevant anyway

split forge
idle jay
#

guys remember my

#

shitty solution from earlier

#

turned out to be quite decent, im only sending the position + velocity 5 times a second without any interpolation so far

glossy owl
#

heya πŸ‘‹
I'm working on an open world multiplayer game on ue 4.27 (don't kill me pls πŸ₯² ) and initially wanted to use world composition and level streaming volumes to handle loading in and out sections of the world for performance reasons. This seemed to not work though as the server basically ignored all connected clients for the streaming , meaning that it'd unload sections even if another client is still in them, causing them to fall into the void.

Because of this I decided to make my own little level manager and it's working pretty alright (though I do want to make some changes to it still)
However after doing a first real-network tests, I've discovered that there's an issue with later joiners, where they wont stream in levels that were streamed in before they joined.
I tried fixing this by replicating the array of required levels down to the client and then letting the client load those levels in locally but this doesn't seem to do anything (I guess clients aren't allowed to load in levels in a multiplayer scenario?)

I've attached the level manager bp as well as a (slightly sped up) video. the bp is still very much in progress and I wanna make a proper queue system for loading in the chunks as well as reworking the collect required levels function.

Thanks in advance for any help or advice ^^
https://blueprintue.com/blueprint/4_57qeo-/

civic storm
#

Anyone know where I can find where the Lyra project actually does the networking? As in what folder inside the lyra c++ project has where they do login/sessions etc. Somehow I can't find it

civic storm
astral crater
#

Is this role-annotated print only something that happens in blueprint, or is it doable on the c++ side too somehow?

fathom aspen
#

Should be doable if you call the corresponding native function in cpp

#

Which is prolly Kismet's PrintString

flat pendant
#

Is it possible for a client to modify their connection URL between PreLogin and PostLogin? I want to validate some stuff in PreLogin to allow them into the server, then fetch data on PostLogin. But I don't want, for example their oauth token passed as an option, to be different in PreLogin and PostLogin.

fathom aspen
#

No, Options string is const, you are not meant to modify it

thin stratus
silent grotto
#

Hey, does anyone have a clue why my replicated movement looks smooth to other clients but a little jittery on my end?

#

Like the client moving is on his screen always jittering but for other clients it looks butter smooth :d

thin stratus
#

If that's still your own code then not sure

silent grotto
#

I just tried to replicate the CMC's AddImpulse - function

#

in BP

#

like this

latent heart
#

It's probably because the server is updating your pawn based on "old" input so you're moving forward locally, then the server is processing that and sending the signal back - by the time your client has already moved forward some more and so you snap back slightly.

silent grotto
#

Yeah I just realized that but good that you've mentioned it already.. Now I wonder how to fix this issue.. :/

quiet fjord
#

People, I have a problem. I'm doing a mechanic where I generate a particle that will detect if the actor that creates it has a carded target or not to be able to follow it, it turns out that when I create the actor of the particle with the run on server, I don't get the values ​​of the client but instead if I put the generation of the particle in multicast if it catches it why should it?

quiet fjord
#

no

silent grotto
# quiet fjord no

Huh okay, I was just wondering cause I have never ever heard this from a non-german "People, I have a problem" ^^

#

And I am not quite sure if I even understand your problem, but particles/emitter shouldn't be created by server nor should they be replicated (as far as I know). They should be client side only.

quiet fjord
#

show my code?

#

the general manager the particle is a component that I have anchored to my pawn

silent grotto
#

Sure, but keep in mind I am still kinda new to making multiplayer ready projects

sinful tree
#

It would help to see how you've coded it.

#

Right now by reading your description, it sounds like you're trying to access values from the client while running on the server.

quiet fjord
#

I currently play on clients since I have a dedicated server set up

quasi tide
silent grotto
quiet fjord
#

that's what i have

#

I only get the targeting variable on the server in my client, not therefore every time I am the client it does not refresh me

sterile plaza
#

you're creating the particle on the server?

quiet fjord
#

yes

#

the particle is replicated

#

If not, no copy would see it, the particle creates it for me, the problem is not that. The problem is that within that particle I am trying to read a variable from my pawn but only the one from the server reads the one from my client, not

sterile plaza
#

which variable?

quiet fjord
#

is targeting

sterile plaza
#

is targeting?

quiet fjord
#

yes

sterile plaza
#

is it replicated?

quiet fjord
#

of course

sterile plaza
#

can I see? :P

#

wait, in the construction script you don't have it?

#

I'm guessing it hasn't been replicated yet.

quiet fjord
#

wait i think i know why

#

one moment

#

it does not work

#

That way it works but of course it is more expensive for the creation of particles

#

I don't like to generate them from the multicast but here it does read my is targeting

#

that is the actor that contains the particle

sterile plaza
#

the actor is created on clients, but it's not seeing the replicated variable?

silent grotto
#

why do you spawn the particle on the server at all?

#

and why do you need to replicate particles?

quiet fjord
#

The problem is not the creation of the particle, it is that I want it to read my variable from my actor but it only reads me the one from the server

silent grotto
#

I thought things like that should not be replicated at any time.

#

I mean the client should then read the variable, get it to server and the server can then get it to the client? Idk what you are trying to do tbh xd

sterile plaza
#

it sounds like they're creating an actor on the server that is replicated and responsible for creating the particles

#

what if you check for your variable at beginplay or after?

quiet fjord
#

Ok if I have a problem it is generating 2 actors

silent grotto
sterile plaza
#

agreed, if you're creating particles on the server, don't do that

silent grotto
#

@quiet fjord what is happenind after this? πŸ”΄ #

quiet fjord
silent grotto
#

Also you are doing a cast and wondering about things not working correctly, have you checked if the cast fails? Maybe thats the problem. Idk.

quiet fjord
#

Now the problem is that it creates 2 objects instead of one

silent grotto
# quiet fjord

Is that a custom function? What does it do and why does it have 2 targets?

quiet fjord
#

if that is a personalized function where I indicate that if my pawn is in target I will go there what objective is it

#

same thing happens anyway can't read client variable

sterile plaza
#

what can't read a client variable?

#

only clients are going to be able to do that

quiet fjord
#

I'll pass you a screenshot of what it shows me for a moment

sterile plaza
#

I'm having a hard time figuring out what's going wrong as I'm not getting a clear pictures of where things live and what is getting called where

#

in your BP screenshots, if you could include the name of the class its in, that would be nice

quiet fjord
#

I give you a screenshot of a whole moment

#

that component is the one that is in charge of launching the ability that in turn that component is a child of the main pawn as it is in that image

#

then I call the function throw particle in a notify that is inside a montage so look

subtle peak
#

any reason why "BeginPlay" would not fire when an actor is spawned?

quiet fjord
#

and this event is the one that calls the run on server event where the particle is generated

#

that is my actor with the particle and the projectile component to give it movement

sterile plaza
#

why is the client requesting a particle be made on the server?

latent heart
#

He's being very particular about server authoritativeness!

devout crypt
#

@subtle peak maybe when you spawn that actor on hidden level?

quiet fjord
#

already solved

#

I already have it solved

#

it was a notify and rpc problem

#

Guys, for those who want to solve it, it is very simple, it turns out that the notify already acts as an rpc run on server, therefore it is not necessary to put another run on server event, simply call it from the rpc of the client that belongs to it and it is solved.

#

Do you want all the players to see it when you turn the page?

#

If that is the case, you should register the page number when you advance it and that variable must be replicated. When you make a change of pages, you have to do an rpc event that is run on server where there is, you do the page set with that, you should have it.

#

Also another option but I am not the user is to do it by using rpc multicast but I do not recommend it for this case

thin stratus
#

Did you read the Network Compendium that is pinned to this channel?

#

Something like that Integer should be a Replicated Variable, and not changed by a Multicast

subtle peak
#

Hey is it possible to change host of a listen server during runtime? So if the host quits another gets assigned host?

thin stratus
subtle peak
thin stratus
#

Nope, Sessions have nothing to do with that

subtle peak
mellow stag
#

Im running a dedicated server and it is lagging but task manager it's barely using any resources

prisma snow
mellow stag
#

how would I change how many threads?

meager spade
#

you can not really

#

its designed to run on that single thread

#

i would profile and see what your bottleneck is

topaz carbon
#

Does anyone know of any good tutorials for setting up dedicated servers within an oculus quest application

thin stratus
#

I highly doubt you'll find a tutorial for that

#

The closest thing I can tell you is that Unreal Tournament has code that starts a dedicated server on the users pc

#

You can try to find that in its repo on GitHub and see if that works for you

idle jay
#

can I host a game without using steam or epic, if i have the pots open?

#

ports'

#

so with direct ip connect, will players be able to join, even without any subsystem?

broken grail
#

Hi all,
i have some trouble packaging my game. I did all steps in https://docs.unrealengine.com/4.27/en-US/InteractiveExperiences/Networking/HowTo/DedicatedServers/

But when i start packaging it aborts with: Server targets are not currently supported from this engine distribution.
The non server target is working. I am using unreal engine 5.1 and Visual Studio 17.5.4

Is this a bug or what could be the issue?

How to set up and package a dedicated server for your project.

silent grotto
covert igloo
#

what do you guys think would have less of an impact on server bandwith.

sending a struct with a few floats, a float curve, and an enum to the server.
or sending a name variable as an ID so the server can look these values up in a data table.

silent grotto
#

I dont think that would make a huge difference tbh, databases are fast, like really fast. And sending such little information is no big deal even with bad internet. The float curve would probably be the biggest data typ of all these 3, unless you add more than a hundred values to the enum...

#

And even that is just a generated curve, its so it calculates the values based on the bezier tangents so not a big deal

#

I'd rather think about what makes more sense for your software design. If you have a database already then sure use the database if information is stored already its no big deal to continue using it. But if its just for this purpose it might be little overkill, depends on what you do. But thats just my opinion.

#

I don't think there is a clear right or wrong.

covert igloo
#

well im building a complex damage system. and given shrapnel, shotguns. and the possibility of sending some of these as an array.
im concerned that i might end up sending alot in bursts. and i cant find a list that tells me the weight of each variable type.

i am already booking all these items into a data table. and i could very easily send IDs and look them up server side.

kindred widget
#

Name will be sent by string. I think it's 8 ot 12 bytes usually? Can't remember offhand. By the time you get a few floats, you're already the same size as that. Plus all of the other stuff.

covert igloo
#

im leaning towards IDs. but i wasnt sure if names where heavy when i needs to send them in large burst in heated situations

covert igloo
silent grotto
#

A weighht list? You mean the size of each datatype in bytes? Well if you're senden these keep in mind they go through the OSI layers so they will be a little huger anyway cause of additional (needed) headers. But again, they are not really big, a float takes up only a few bytes.

kindred widget
#

Would test to be sure. But I doubt a single ID is going to be more than the rest of the data you were thinking of sending.

silent grotto
kindred widget
#

UnlessYouUseAReallyStupidlyLongNameForYourFNamesIDontThingThatllMatterMuch

covert igloo
#

Perfect. because i was hoping on IDs. because i find them really easy to work with. i already have data tables set up, and that makes my job alot easier.
so ill probably go with that

silent grotto
#

Here a list from https://www.w3schools.com/cpp/cpp_data_types.asp about the basic datatype sizes. Keep in mind that a string is just a char array, and a curve probably stores n vectors(2,3 or 4 dimensional vectors, so 2, 3 or 4 floats).

silent grotto
covert igloo
silent grotto
#

just search for datatype size and then the language you want cause some languages have different default sizes and/or datatype names

covert igloo
# silent grotto I mean the string will obviously be the smalles since you are sending less data ...

yeh i didnt think it would. but it will sheild me against bloat. because my advanced iteration sends the damages as a single struct.
and my complex damage iteration sends a bigger struct as an Array. to which size can grow pretty quickly. and i always consider worse case such as a shotgun or shrapnel sending like 20+ 100+ events at once. and if i can send a single ID. that can make all events act as if i sent a single count of data in a single event

kindred widget
#

I always liked doing those things as seeds. You can get a lot more out of a seed reconstructing a shotgun than sending 8-20 different already calculated events.

silent grotto
# covert igloo yeh i didnt think it would. but it will sheild me against bloat. because my adva...

Keep in mind that you are trading bandwidth for computational power, so the less data you send the more the server has to process. That might not be a problem, but it all depends on scale. If you have 100000 clients sending data every second then it might be smart to trade bandwith for computational power but then the server needs to be a little more powerful (maybe). If thats not the case you can do it the otherway around and dont need to buy such a powerful server. It depends on the usecase I'd say.

covert igloo
# silent grotto Keep in mind that you are trading bandwidth for computational power, so the less...

yeh. thats why im trying to be carful at this stage of development. as im building batch of health systems for my game. but i would also like to sell variants of them.
and i want to make sure that when some one uses this code reasonably. that it doesn't kill their performance.

me personally im plaining on a game that might alow 2-4 player coop.
i couldn't imagine anyone attempting to use my most complex damage and health system and expect it to work for 100+ player battle royal when its 100% server authority. now. it might and probably could honestly. but thats not the expected goal

#

thank you guys by the way. this was really helpful

pearl bear
#

When developing a multiplayer game, do you create a network budget as in the graphic? If you are creating it, how do you determine this budget? I want to monitor some metrics to be sure of the network performance of my game, but I wonder which metrics I monitor will be as optimized as I expect.

winged badger
#

you start with dedicated vs. listen server and number of players

pearl bear
#

Listen server and 4 player max

winged badger
#

if you don't do something really crazy you should be fine, even if you do blueprints only

pearl bear
#

Does it make sense to set something like a limit of data sent per second on average?

winged badger
#

usually you'll find yourself relaxing default settings there

#

as they are made to work on 56k dial up connection

pearl bear
#

I have 4 player and around 10 AI

winged badger
#

leave everything on default and you probably shouldn't worry about network performance at this point

#

especially if you're using c++

pearl bear
#

Nice, I am glad to hear that

winged badger
#

as blueprint optimization tools for network is few and far between

#

one consideration with listen servers

#

if your target FPS is 60 on an average gaming CPU

#

your listen server host will eat some of those 16,7ms doing NetBroadcastTick (you'll see it in profiler)

#

so your budget is lower there, but with 4 players and c++ you should be able to keep it under 2ms

pearl bear
#

2ms, I will keep that in my mind

rose egret
#

how to profile dedicated server ? I mostly need stats data

peak fossil
#

Hey how are you guys handling the projectile movement components "lag" on clients? I have a ball that has a projectile movement component and the ball is very jittery when it moves trough the air. I've found interpolation, predict projectile path, upping the simulation steps, increasing the precision on the the replicated movement of the component. That's quiet a lot and I don't really know where to start...

thin stratus
#

Second step would be calling the Interp function of it on tick iirc.

I actually never did that but rather set the Velocity of the Actor to be the one of the Component

#

Or other way round to be more precise