#multiplayer

1 messages ยท Page 78 of 1

fossil spoke
#

Are you using C++?

red musk
#

Yes

fossil spoke
#

Then look into Fast Arrays.

#

You will likely want to setup a light weight struct that you use to replicate some sort of ID or sync data to Clients this way

fluid summit
#

Not sure if GameplayAbilitySystem already has a built-in solution for this, you may wanna check @red musk

#

last documentation I read about it said no, but it was from 2019*

fossil spoke
#

You maybe able to use PredictionKeys to help. But GAS itself does not deal with this.

#

You will likely find more effective solutions in the Mass system.

#

Or a custom one of your own.

#

Niagara may even be a better alternative.

fluid summit
#

Another more wild alternative would be to make your own ECS framework. but that probably will be a very time consuming task

hollow eagle
#

That doesn't really help with prediction. Fast replication or processing of entities can't overcome network latency.
The general solution is to spawn a projectile on the client for prediction purposes while waiting for a server response. When you ask the server for a response you send along an id (prediction key in GAS terminology, as DevilsD said) which the server assigns to its "authoritative" version of the projectile. The server's projectile's initial spawn position may also need to be offset based on client latency.
When the client receives the server's version of that projectile, it can then interpolate its local version to the server's version (which it correlates based on the prediction key).
This assumes that the projectiles aren't so fast as to make interpolating towards the server's result completely pointless (for example, simulating actual bullet speed would make interpolation pretty much useless).

sterile plaza
#

I've shipped games that do similar things. So it's not entirely wrong. But I think some of the other suggestions are worth looking into.

astral crater
#

Is a TSubclassOf<> parameter valid for an RPC? Rider didn't show any UHT complaints but I haven't actually tried yet.
The reason I have doubts is because the value could refer to a blueprint class which I feel could act funky due to minute differences between the client and server versions of the theoretical blueprint. Would it work fine regardless? Let me know if I'm being paranoid.

#

If it is not valid what is the proper way to communicate something like that?
My use case is to get the server to tell the client to spawn an actor of a specific type (not replicated). The only other thing I have come up with is to maintain a hardcoded map of some key to class instances that can be looked up on the client, which I'd rather avoid.

red musk
hollow eagle
#

Assuming you do literally nothing else to optimize network traffic, sure. The interpolation is to handle moving towards the server-authoritative position in case the client mispredicted something. After that it's less likely for a misprediction so you could probably get away with either having a very low network tick rate for the projectile, or not using an actor at all and using a single RPC to "confirm" the server's position a single time. The single confirmation is probably good enough if the projectile is fast.

#

Or, if the projectile is so fast that you can't really get away with the roundtrip to the server, then you just accept that the client will sometimes mispredict. See "blood shots" in basically any competitive shooter - there's no solution to them.

#

If your projectile hits a target faster than the roundtrip time for the server to correct the client then you cannot physically correct a misprediction.

red musk
#

Thank you!

red musk
# hollow eagle Assuming you do literally nothing else to optimize network traffic, sure. The in...

One more question (thanks for your patience); a replicated actor by default doesn't do client side simulation and correction right; that's a unique element of the CMC. Does the projectile movement component do anything to that degree? I.e. any chance I can simply just lower the net tick rate and call it good with out of the box projectile stuff. My understanding was that no, PMC doesn't do client correction/interpolation from server authority, but figured I'd double check my assumption

proven kayak
astral crater
#

That's the feeling I'm getting. The blueprint editor doesn't have any issue with a replicated event having a class as an input, which gives me a good sense that it should be okay to do. Just trying to make sure I'm not doing anything hacky.

sterile plaza
#

IF you're using different versions of the game, then you run into all sorts of problems. You should assume they're on the same version and types are identical.

boreal wadi
#

Any clear reasons why animations work fine when playing netmode client but in standalone everyone is TPosing ?

boreal wadi
# boreal wadi Any clear reasons why animations work fine when playing netmode client but in st...

This seems to be a lyra specific problem, If you dont set their invisible skeleton to "Always Tick Pose & Refresh Bones" animation standalone wont work. This is actually a problem though. Since playing as standalone is essentially the server then does that mean that the server will have all players in a tpose? How would server side hits work if thats the case since the players animation move things like hit boxes or physics assets that are being traced again?

winged badger
#

not all games need that

#

some are fine with the capsule collision on character

boreal wadi
#

True. But in my case its needed. since i have limb damage multipliers

gray orchid
#

does anyone know how to make one widget appear for all users, im trying to make a chat room for me and my friends cause I got bored but the main issue im running into is that the users all have separate chat boxes so they dont see the messages. would anyone know how to fix it?

marble gazelle
queen escarp
#

Hey guys im trying to spawn a floating damage text to players when dealing/dealt damage but im having problem finding referense to the target player.... or the editor is... any tips ?

#

anyone ?:/

elfin echo
#

Or use is valid player controller before the widget creation

queen escarp
#

@elfin echo but it is a dedicated server ?

#

i tried changing to a valid player but i was unable to :/

elfin echo
#

On server only gameplay logic, no visuals, no widgets, no effects

queen escarp
#

aye but im creating it on the client arent i ๐Ÿ˜ฎ ?

elfin echo
queen escarp
#

oh so the error is from the server not from a client

#

so if im creating in a multicast i need to check if "server" so it dont spawn on that one

#

i c

queen escarp
#

oh ok but its not spawning for the palyer neither

#

but the error breakes it ?

elfin echo
queen escarp
#

ah ok

flint hollow
#

i want to read up on how server instancing works but i dont know the terminology.
"server instance" is a lobby that takes x users
if more clients are connected than the lobby can hold, it opens up a new instance.

i dont want to create this specifically. I just want to know what the parts are called so i can study the topic.

elfin echo
flint hollow
#

yeah ok

#

lets see

flint hollow
#

im gonna study master/matchmaking server(backend) either way

#

thank

ruby rock
#

hi all

I've noticed when playing as a client in an MP environment, sometimes when debugging I get a view as "Simulating" and sometimes "Client-Simulating" - what do these mean? Looking online there doesnt seem to be a good explanation - so hoping someone here knows?

elfin echo
elfin echo
flint hollow
#

i guess i could just as well ask what its called when WoW movies players into separate layers to balance teh numbers active network agents

#

i suppose the differences lies in persistence server vs needing players to exist. which perhaps is the same thing.

flint hollow
mortal tusk
#

hello im kinda new to writing my own code (Without following tutorials) can someone tell me how to get the FUniqueNetID from a friend?
im trying to get a statistic (like a level) from a friend

meager spade
#

*Friend->GetUniqueNetIdRef()

#

sorry

#

*Friend->GetUserId();

mortal tusk
#

omg its working

#

thanks

flint hollow
#

im reading this article that basically answrs my question and takes me further than that in describing multiplayer game architecture

dark edge
#

Without a hard loading screen it'll be very difficult

flint hollow
#

at that point when i wrote that, i didnt know what i wrote.

dark edge
#

If anyone has any ideas on how to join a server without a hard load (wow or elden ring style) I'm all ears but idk of it being done in Unreal

faint eagle
#

what could be the reason for gamemode to spawn default APlayerController instead of a custom which is set in the gamemode properties for a spectator after seamless travel?

upd: i've checked the logs and I can see that after seamless travel a correct PC spawns for client, but soon after it seems that it is being replaced ๐Ÿค”

[2023.04.21-10.47.47:533][630]LogWorld: StartLoadingDestination to: /Game/Levels/MyLevel
[2023.04.21-10.47.47:535][630]LogWorldPartition: New Streaming Source: BP_MyPlayerController_C_0 -> Position: X=800.000 Y=550.000 Z=204600.000

[2023.04.21-10.47.59:360][632]LogNetTraffic:       Sent RPC: BP_MyPlayerController_C /Game/Levels/MyLevel.MyLevel:PersistentLevel.BP_MyPlayerController_C_0::ServerNotifyLoadedWorld [33.4 bytes]

[2023.04.21-10.48.02:620][ 65]LogWorldPartition: New Streaming Source: PlayerController_0 -> Position: X=7433.895 Y=18731.148 Z=1261.895
short whale
#

Can I setup my UPoseableMeshComponent to be automatically synced from Server to Clients, replicating all bone movements?

ivory bear
#

Trying to understand "Find Sessions" (blueprints) and the documentation simply says "Searches for advertised sessions with the default online subsystem"
What is the "default online subsystem"?

frank birch
#

I need some advanced explaining, why is that for sprinting the "correct" way is replicating a Boolean instead of replicating a new value for the max speed?
https://www.youtube.com/watch?v=RtQRMcupJs0&ab_channel=ReidsChannel

Support the channel through donations. Crypto accepted!
PayPal: https://paypal.me/reidschannel?locale.x=en_US
Patreon: https://www.patreon.com/reidschannel
Bitcoin: 1JFwWHr4X6uAeoZadukzqKjzFBj3Qjy7Sk
Ethereum: 0x2B2Bc108F1Cc0fF899959dEF3226637787d8C3dE
Dogecoin: DNQ33YnhpWoTBokBNVkZP5ub8KTLkpyjpv

Join our community discord!
Discord: https://dis...

โ–ถ Play video
#

Is the point that by replicating a Boolean in that bitflag manner we somehow store the change in the prediction/correction chain?

frank birch
grand kestrel
#

This isn't something we can answer in a short message. Google client side prediction

#

There are in-depth explanations out there

#
frank birch
#

I understand the basics of prediction and replication, what I am not sure is the setting the flag in that bitmask ties in to the CMC replication or why is it better than just setting the variable for speed in the client and firing an rpc in the server to do the same

#

by setting the flag there we make sure that we land inside a predicted/replicated frame? ๐Ÿค”

#

that's why we set the bitflag instead of just creating another replicated bool?

#

so setting the bitflag is a "saved move"? ๐Ÿค”

chrome bay
#

Anything that governs the movement parameters must be part of the saved move stuff

#

If it's not, you can't replay moves properly

#

Anything that dramatically changes movement parameters should also qualify as an "important" move

#

Whether two moves can be combined also relies on this

#

CMC shouldn't rely on external properties or RPCs, otherwise you break it's determinism

#

The affects of this aren't obvious until you're in a "real" game where packets are dropped, clients misspredict etc.

frank birch
#

ok, then I am on the right track, We use those bitflags since those are replicated as a "saved move stuff"
if we were to create another replicated bool into our CMC it wouldn't be inside the saved move

chrome bay
#

You can end up in an endless state of receiving corrections

#

Pretty much yeah

frank birch
#

I will try to digest the info from everything and try to make a smaaaall explanation

#

thanks to both โค๏ธ

quiet fjord
#

Guys, does anyone know how to replicate a component that I have extracted from a database? I am setting up a system that has an id; I extract a component from a database that is a skill; then I use it with some interfaces to execute code on the server, but this component only exists in the client that has it, how can it be replicated to the server?

sterile plaza
#

what do you mean by "extract a component from a database"?

#

The only way clients can send information to the server is by calling RPC functions on actors they own (their controller, pawn, player state, etc).

dark edge
#

the state of Sprinting needs to be incorporated into the CMC's move / prediction system

dark edge
#

so client can just tell the server the ID or the class of the component

quiet fjord
#

I am setting up a skill component from 0 and all my skills have an identifier in the database where there is a field containing the class of the skill

#

then my user passes him an id of the ability that he wants to execute, it will look for it in the database and it will become a component of the ability that is the class of the ability but of course that only happens to me in my character on the server I get none

#

Here I extract what ability I want to execute and I save it in a variable, then I execute an interface if that variable has it in the client, it works perfectly for me. but when I run the code on the server it gives me an error

#

solved ๐Ÿ™‚

#

it already works on my server

#

it was easy actually

sterile plaza
#

how on earth is there no, "that was easy" emoji?

icy jetty
#

Because that almost never happens here

dry pebble
sterile plaza
tired magnet
#

Delgoodie's CMC tutorial series is the most awesome and concise (yet detailed) dev guide I have ever seen.

#

He also has a discord which you could join.

#

You can find it from his YouTube videos.

frank birch
#

I am watching now and it seems very well thought out, thanks โค๏ธ

quick oar
#

What plug-in would you guys recommend for multi-player in UE5. I have previous experience using photon and normcore with unity, but never tried multi-player in unreal. Also, can it be done in a blueprint project, or would I need to have a c++ project.

graceful flame
# quick oar What plug-in would you guys recommend for multi-player in UE5. I have previous e...

I don't know of a plugin that does multiplayer, it's more like all of stuff that needs to replicate should be setup to replicate as efficiently as possible and to only update when necessary. There's also concepts such as authority and ownership which have to be learned so that the flow of logic is properly understood. It's a mix of blueprint and c++. You can try going 100% blueprint but you might find that one day you'll want to extend some of the classes or create a new parent class with some c++ in it which all of your characters in your game need for example.

sterile plaza
quick oar
#

I see. Yes, I've used those for local, I was just wondering if I NEED a plugin that handles a server, I guess then, so I can connect people outside my house! xD

sterile plaza
#

If you want to use a cloud server like Playfab, then you would need to integrate that. But if you're just doing dedicated server with clients that connect to it (or listen server), then you simply run the game/server.

quick oar
#

And make my PC the server?

sterile plaza
#

?

#

If you run either a dedicated server or run a listen server on your machine, then it is a server for your game.

quick oar
#

I mean, lets say I build the exe. I want to connect in the game with my friend from, lets say, Australia, but I'm in Antarctica.

sterile plaza
#

make sure the proper ports are open and connect via IP

quick oar
#

Ah! I see... Ok, thank you! I'll try that. ๐Ÿ™‚

sterile plaza
#

there might be details I'm missing, but that's the general way you do it

quick oar
#

I've heard steam can also be used to do the server part?

sterile plaza
#

I'm sure there are approximately 17,000 youtube videos of various qualities walking you through setting this up.

quick oar
#

Quantity is not always quality, unfortunately...

sterile plaza
#

I haven't personally integrated steam stuff. I don't believe steam hosts the servers themselves.

#

Running servers costs money. You can host them yourself, let players host their own servers.

quick oar
#

Hmm, that's alright, I'll try the earlier suggestion. Thank you!

sterile plaza
#

What kind of game are you making?

quick oar
#

Hmm, I suppose it falls under category of a simulation.

sterile plaza
#

How many players? How long is a session?

quick oar
#

Of a town, where I'm hoping people can join as their own characters.

#

Around 10, I guess.

sterile plaza
#

persistent world across sessions?

quick oar
#

Session is more like an MMO or minecraft one. You connect to see others in your world, and you save progress and disconnect.

#

yes.

sterile plaza
#

sounds like you probably want one person to run a dedicated server (if you want it to be available 24/7)

#

if not, they could run as listen server

quick oar
#

That's what I was thinking. An old PC perhaps.

#

Well, a spare. not "old" old

#

xD

#

I haven't dug deep into UE5 yet, I've been using UE4 for ages. Have you got experienc with multiplayer in UE5?

#

I know graphically there is quite improvement, is it easier to handle these things now? I mean, it was already pretty easy with local setup in UE4, but I was wondering if there are extra features you'd suggest?

sterile plaza
#

I don't know that I've seen a lot of changes from 4 to 5 in the things I work on, including writing network code. Doesn't mean there aren't things though.

#

For me, 4 to 5 was mostly a different editor UI. :/

quick oar
#

Oh... I guess it was more graphics focused.

#

It's all I saw heavily advertised anyways. Oh, and a new input system.

sterile plaza
#

lots of cool new features and tools and editors and some systems rewritten

keen hound
#

why isn't this working with steam?

sterile plaza
#

Since it came out I've mostly been working on networked gameplay systems and not much changes with that.

keen hound
#

when I test on the same pc it works

#

but when my friend tests it it doesnt work

keen surge
grand kestrel
frank birch
#

Hello ๐Ÿ˜…

#

I think the two links explain the whole point pretty well

#

I added some explanation in case you know the theory but didn't manage to link it to the practice

#

But maybe the links are enough ๐Ÿ˜…

#

(also, my way of writing/explaining is pretty conversational which might not be the desired tone) ๐Ÿ˜ฌ

grand kestrel
#

I also cleaned the readme up a bit, I had a few headers #'d wrong, reordered a couple too

#

Didn't like how the description for Sprint was "Well, it makes you sprint", it is obvious but I could have still been a little more informative, now its "It makes you sprint by changing your movement properties when activated." -- I was probably just in a hurry there and had other priorities

#

@frank birch Give that a read and let me know if its clear or not

#

Btw for me to accept a PR it would have to be indistinguishable from how I write (or how I code), this is for readability and consistency

#

When I write this stuff I'm thinking about how I can deliver the necessary information without making it a chore to get through (nothing beyond the necessary information)

thin stratus
#

Last thing I pinged you on was the Timestamp reset

#

Or not?

grand kestrel
thin stratus
#

Ah. I was missing context haha

grand kestrel
#

Instead I added a FAQ to the readme

thin stratus
#

Makes sense

flint hollow
#

are p2p solutions wildly different in UE compared to dedicated server instances?

thin stratus
#

UE has no P2P. Only ListenServer and DedicatedServer

flint hollow
#

yeah i ment listenserver vs dedicated.
i guess my question is if the job from listenserver can be applied if moving on to dedicated server solutions

grand kestrel
#

Epic very much believe in client-server models

#

Listen isn't p2p but fair ๐Ÿ˜„

#

Most systems are compatible with both but you do need to build it with both in mind

flint hollow
#

fair

thin stratus
#

@flint hollow This can't be answered in detail but in theory nothing stops you from it

flint hollow
#

also fair

#

i have no intention of adding my CC to AWS anytime soon ๐Ÿ˜„

thin stratus
#

If you support both then you might need to write extra code in some situations

flint hollow
#

and not for proof of concept

grand kestrel
#

I build my stuff for both because its a very minimal amount of extra work that rarely requires much, mostly just need to make sure to test with both

flint hollow
#

mmmhm

#

the actual work to be done is unknown at this point. im mostly doing the puzzle of the broad picuture. pfc vs more intended visions.

thin stratus
#

Ah in that regard. I mean code wise it's not too much different. You should be able to write your actual project post poc with dedicated server just fine. It's just some smaller parts where you need to keep in mind that the server is not also a client

flint hollow
#

ah yes yes

#

i was going deeper into dedicated host structures and i just cant motivate paying for it

thin stratus
#

An example are things like a Multicast that spawns an explosion vfx doesn't need to spawn it on a dedicated server

flint hollow
#

oh right

thin stratus
flint hollow
#

yeah those details i expect to learn about in the actual phase for making the network... work.

thin stratus
#

Hosting should probably also be done on linux

#

Cause most of the providers are more expensive on windows

flint hollow
#

mmhm.

#

linux runs the world

#

and one | to bind them all

queen escarp
#

@elfin echo hi man i got the error to dissapear when checking if not on dedicated server but it dosent display on the clients either got any ideas why

flint hollow
#

what are the cpu/memory or general hw requirements for a dedicated server

#

i cant seem to find it anywhere

kindred widget
flint hollow
#

i assume in its least complex implementation it has some baseline functionality

kindred widget
#

Some games only need a server that ticks 10 times a second, and updates very light data. You could run it on a tablet basically. While others require 120fps updates for 20+ players

flint hollow
#

I got this from unrealcontainers

flint hollow
#

or is it purely a handson research process

kindred widget
#

Maybe if you could get your hands on some statistics you could get a rather vague approximation.

flint hollow
#

what are the statistics in this case?

kindred widget
#

I'd start with trying to find the servers used by the games closest to your target. You might be able to get an idea from what.

flint hollow
#

good idea

kindred widget
#

But even that is iffy. Implementations matter a lot. Bad programming can lead to memory bloat or extra server CPU use. And whether the games you check have that issue or not is another factor.

flint hollow
#

yup

#

all in all, i can approxivague some ideas but i will learn most of it hands on, unlocking all the knowledge tiers.

kindred widget
#

Mostly. In general the only real correct answer in the end that has any merit is.. Profile it. ๐Ÿ˜ฆ annoying, but true.

flint hollow
#

its just that i have my own 1000/1000 connection and plenty of hardware

#

i got some nice older small desktop stations that run silent and solid

#

even have a surplus desktop with XEON/ECC

#

which would run silent without GPU

#

only thing im lacking is a a public IP range

thin stratus
#

I cannot, at all, suggest a paid Dedicated Server setup unless you:

  1. Are 100% certain you have players to support it
  2. Have a monetization model to actually support this in the long run
  3. Shit bricks of gold that you can throw at it in the first few months that you are fine with never recovering
  4. Have a bigger development team
#

Smaller studios and single dev should stay away from paid DediServer hosting.
Make a game that is ListenServer or allows users to host the DediServer.
And yes I'm aware that removes all competitive game ideas.

#

If you are fne with all of this then yeah, develop your game, setup the automation to at least simplify the upload to the paid instances. And when the game is alpha/beta, do tests with players and monitor the server usages

stoic matrix
#

i saw that i should not use components for perfomance in multiplay, should i dissolve components for future?

#

11: Minimize the amount of components with replicated variables (Multiplayer)

Unreal engine networking works by gathering what objects are nearby the player, and then it checks them for changed properties. The cost of checking the changed properties depends mostly on the number of objects, and not on the amount of them. It is much faster to have PlayerCharacter with 100 replicated properties, instead of having Player Character + 9 components, and 10 replicated properties each. This goes against good architecture, but there is no good way around it until PushModel networking is stable (unreal 4.25 and forward)

thin stratus
#

until PushModel networking is stable (unreal 4.25 and forward)

#

:P we are at almost 5.2. C++ and PushModel would be a good start

#

Also that is a very generic explanation. Your game might never reach problems by having replicated variables in your comps

stoic matrix
#

thank you eXi!!

flint hollow
#

@thin stratus all those points are very good and i feel more comfortably forced to explore listen servers. im not making an mmo but i do have coop focus. which would suffice with steam stuff.

thin stratus
# flint hollow <@94211915902889984> all those points are very good and i feel more comfortably ...

It's relatively easy to answer I guess:

  • Does your Game have Competitive features (such as Ranked Matches) and should never allow cheating? -> Dedicated Server (hosted by you)
  • Does your Game have any form of progression (e.g. MMO like) that should not be cheated? -> Dedicated Server (hosted by you)
  • Does your Game profit from players hosting their own Servers that stay active while they don't play (e.g. a Survival Game where players want to leave over night but still have their crops grow) -> Dedicated Server (hosted by player)

Most other situations probably don't need a Dedicated Server

prisma snow
thin stratus
#

Don't we all

flint hollow
#

tremendous help so far!

prisma snow
thin stratus
#

That's basically what we did on The Ascent

flint hollow
#

i do not care about cheating for as long as nobody is paying for the experience.

flint hollow
#

my game structure is straight forward.
co-op roguelike
Permanent homebase (public lobby) with a door that leads to adventure
Adventure is session with friends only or alone
Progression is tracked and linked to the user.

grand kestrel
#

I wanted competitive features but I'm going to launch without them, if the game is wildly successful then it'll come back on my radar for a future release

#

And if I wanted to make a competitive game, I'd do the same thing, make a non-competitive game to start building a franchise from which to spawn it

flint hollow
#

Thats the call i have to make. If do not make something that reaches various points of interest, there is no idea to invest in infrastructure.

grand kestrel
#

@thin stratus Just on the topic of the PredictedMovement, I've never really been particularly involved with public repos despite having a few of my own, how am I meant to handle issues like this?

#

Do I just tell them to ask on Slackers and close it

thin stratus
#

No, I would ask them what Engine Version they use and what the errors are.

#

:P You'll have to support it a bit if you post it public

grand kestrel
#

Fair enough

#

I don't think there will be an issue with that example project so it'll be user error, wasn't sure if thats part of it or not

thin stratus
#

I usually handle that by simply ensuring the user didn't alter the project files

#

And to get all info required

#

Also helps having it there in case someone else runs into that issue

grand kestrel
thin stratus
#

If it's a common issue you can add it to the FAQ :P

grand kestrel
#

Fair

frank birch
#

And I really love the tidbit about RPCs in actors Vs components ๐Ÿฆพ

grand kestrel
#

It came up at one point so made sense to add it

#

I think I meant to write replication in this context but I'll look at it later

humble cove
#

when running the network stuff. whats best setting here to choose to simulate the players rubbish ping? id think "client" but i want to make sure lol

flint hollow
#

Is it very complex to have gameplay replicate over a listen service solution and have statistics and progression logic run on a dedicated service?

#

Like craft results and logic be handled in the dedicated service

pine reef
#

The expect behavior is:
Left mouse button pressed spawn actor and start rotating according to mouse position
Left mouse button released stop rotating actor

Current behavior:
Left mouse button pressed spawn actor and start rotating according to mouse position (But only on server, on client it spawns but doesn't rotate)
Left mouse button released stop rotating actor(But only on server)

low helm
flint hollow
#

Perhaps not more complex than addressing different externals and sorting the async like anything else

low helm
#

Each player would have to continually send the location of their mouse over the network

#

Preferably as a location coming from the mouse cursor hit result

#

There's also a question as to whether or not the created frog will be replicated to clients before the multicast arrives, in which case the reference to the frog would fail

#

Also you cannot send controllers in multicast events

#

Also, you probably want the local client to not have to wait for the server to set the value

#

Also, you should specify which object this code is running on cuz that matters too

pine reef
#

ohh, ok a bunch of changes.. I'll try again

low helm
#

Try this. The owner of the frog will set a timer, within this timer he determines the location of his mouse, sets the rotation of the frog, and sends an event to the server on his controller which has a reference to the frog and the location of where it should be facing. This event on the server controller will set a replicated variable on the replicated frog which will be an on rep variable. Other clients use the on rep event to look at rotation of the location

twilit radish
# flint hollow Like craft results and logic be handled in the dedicated service

What do you mean with "progression logic" though? Statistics are definitely possible. Plenty of listen server style games and even single player games collect statistics for their game. That's just a matter of either finding a service that allows you to do this or creating something of your own and sending over some requests with data ๐Ÿ˜›

flint hollow
#

Yeh i kinda realized it in formulating my question

#

As it usually goes.

flint hollow
#

It doesn't matter I'll find out the hard way

tardy fossil
#

is there a way for a client to move their controlling pawn locally? I made my own custom component to handle movement and im trying to implement client side prediction, but as a client i can't call SetActorLocation

raw thunder
#

Hello everyone, I am making an Interaction System and would like to know how do you protect key spaming? Is this something I need to take care of? Right now I have On Pressed and On Release events RPC'd every time the client use the key.

#

It is a server RPC with no parameters

round acorn
#

So I know "get player character" is bad. I am running into an initialization delay here. The widget attempts to create itself before the Player State Character is ready and this always returns a "None" unless I add a delay. Should I use an event dispatcher or something similar?

thin stratus
#

Your best bet is as usual some C++. Basically a callback in the PlayerController in OnRep_PlayerState and OnRep_Pawn (and if ListenServer then also in the Server functions) that you can bind to in the Widget.

round acorn
#

With a little bool logic to only do whichever one hits first?

thin stratus
#

Well they are for two different cases

#

One is for Pawn, the other for PlayerState

#

depends on what you need in your Widget

low helm
#

Also, If I remember correctly, the character movement component has two booleans that you can set to true, something about allowing client authoritative movement and ignoring location corrections

#

Try setting those to true and you should be able to perform client authoritative movement

mortal tusk
#

hello i was wondering on how can i retrieve my friends UniqueNetId's to a blueprint since TArray<TSharedRef<const FUniqueNetId>> can't be used for return type on the function

#

what does tshared ref is for? is it necessary?

hollow eagle
#

yes it is necessary, no removing it wouldn't give you access to FUniqueNetId in blueprint

mortal tusk
#

so how do i access it then?

hollow eagle
#

you can't access it directly from blueprint

#

you can either wrap it in a struct that is accessible from blueprint, or you can do whatever you need from C++.

earnest jackal
#

When is it best to use NetMulticast versus Server? Is the former good for things that are tricky to replicate?
For example, right now i'm trying to figure out what to do with a function that makes characters go ragdoll when they take too much damage and die. ragdolls are one of the things that various sources say not to replicate

hollow eagle
#

The question doesn't make sense. One can't be used over the other.

mild lynx
#

Is Blueprint, I'm trying to make a Projectile Play a 2D "Hit Impact" sound when it hits a player. I can do this just fine, but the issue is that I only want this sound to play for the person who shot. I am using Listen Server, and have issues with clients getting the sound to play twice, even when "run on owning client" and a Switch Authority node to try and get it to only play on Client. This code runs on the Projectile though, so I'm not sure if it knows the owning client of the projectile since it is created on the server.

Any help would be Appreciated as I am a bit stumped.

keen surge
dreamy vault
#

Yeah sounds like it could be an ownership problem, if it's spawned on the server then the client would be the owner. You can try setting the client as the owner before playing the sound.

#

So I'm doing some research for a client who are interested in creating a (very simple) cross-platform multiplayer game for iOS and Android. We've been trying to figure out the best solution before we start diving in to development, and have been looking at either EOS (via the Redpoint plugin) or something like Photon Engine. Can anyone give any recommendations on this?

From what I've found so far it seems that things like Google authentication is going to be a bit of a pain, would using a platform like Photon be easier to set up? Or does it come with its own difficulties? Obviously we'd need to justify the cost if we went with something like that.

Note that I've worked on multiplayer projects before using both EOS and Steam, but only for PC, so cross-platform is new to me ๐Ÿ™‚

dreamy scarab
#

Would any know why after moving project to 5.1.1 from 5.0.3 not migrating but complete rebuild.

When client is walking animation looks in slow motion from other clients and server but not from players pov all exactly the same settings I had in 5.0.3

winged badger
#

EOS works via EOSAppUser, so it should work for iOS/Android

#

I didnt make a full cross platform implementation yet, but it has no oroblem connecting PIE instance to packaged steam

dreamy vault
#

I may just have to bite the bullet and jump into it but figured some other people may have done similar projects and could give recommendations

winged badger
#

It has per platform auth code too

dreamy vault
winged badger
#

If you go EOS, i definitely recommend redpoint

#

it seems to be getting more love of the two

#

I think that code is EOS, which redpoint it built ontop of

dreamy vault
#

Yeah redpoint seems to be the general recommendation for this stuff, and we'd prefer not to pay for something like Photon if possible (I'm not even sure if Photon integration is any easier anyway)

winged badger
#

Unlike EOS/RedpointEOS, which caused fair amount of headaches

#

Redpoint Matchmaking just
.... worked

keen hound
#

Is this correct for a random mesh system?

winged badger
#

Not quite, not stateful

dreamy vault
winged badger
#

Go fof a variable with onrep

dreamy vault
#

Just expecting the setup to be a little painful, even the Redpoint documentation has this warning ๐Ÿ˜…

winged badger
#

Anyone joining later or out of relevant range wouldnt get that Mesh change

earnest jackal
#

I am interested in rehosting; I'd like it so that, if my server player suddenly disconnects, someone else is picked to be the new host, everything transfers over, and the game continues with minimal disruption.
Broadly speaking, how difficult is this, and where would i start?

winged badger
#

Documentation is a little dodgy

winged badger
#

You need to transfer entire levels state, along with any ai and other server side logic before server dcs

keen hound
earnest jackal
#

well, "minimal" is not specific about how much disruption there should be ๐Ÿ˜› Whatevere will be, will be

winged badger
#

Then youd have to pick someone else to host a new session, load that data, and connect everyone else to new host

#

Connecting snd liading phase unavoidable here

earnest jackal
#

could i maybe just send a serialised copy of the gamestate to everyone once a minute or so, that they can use to load from in that event?

winged badger
#

And you font have unreal networking to help ftom the moment original server dced, you have to use backend service

#

Its not just gamestate

#

As for where youd start

earnest jackal
#

cant clients save a list of each others IPs and attempt reconnecting to them? I would like to avoid needing a third party computer, if at all possible

winged badger
#

Is system rhst can save and restore state of the game from mid play

#

You can use party system below the hood

#

If leader dcs someone else gets autopromoted, snd that is your new host

earnest jackal
#

party system is a thing that natively exists?

winged badger
#

In OSS

#

And can exist separately from session

earnest jackal
#

what is OSS ?

winged badger
#

Iirc every major platform (like steam) supports it

#

Online subsystem

earnest jackal
#

ohh i see, alright, thank you

winged badger
#

Also, you cant do much of this from bp

earnest jackal
#

i hate blueprints so thats fine, all code ๐Ÿ˜„

winged badger
#

Basically you want to save your game in a POD

earnest jackal
#

pod?

winged badger
#

Thar you csn set as PartyData

#

Plain ol data

#

Serialize into TArray<uint8>

earnest jackal
#

alright, this is lots to think about for now, thank you

#

going out, i will ponder it on the train

winged badger
#

No

#

Set var on server

#

And let it replicate, no multicast

#

Onrep calls setmesg on component

keen hound
#

I'm sorry for being confused, but do you mean mesh_body or the events?

winged badger
#

You call server event

#

It carries your meshbody as playload

#

Server assigns that value into meshbody variable (replicated, rep notify)

#

Then onrep_meshbody sets thd mesh on bodymesh component

keen hound
#

this is what I did, it's working for the client but not the server

#

@winged badger what did I do wrong?

thin stratus
keen hound
thin stratus
#

Is "BodyMesh" a component? If so then that's also wrong

thin stratus
#

That variable should be the Mesh

#

Not the Component

keen hound
#

how would I set the skeletal mesh?

thin stratus
#

In the RepNotify/OnRep function that your variable comes with

keen hound
#

I mean how would I set the component

thin stratus
#

If you have more than one MeshComponent, then you either need multiple Mesh variables, one for each Component

#

Actually, there is no either

#

You gotta have one per Mesh

hollow swallow
#

is it possible to change who the host is?

#

so if the host leaves, it makes another client the host

thin stratus
#

Why is that question coming up so often lately

hollow swallow
#

xD

thin stratus
#

There is no Host Migration in UE

hollow swallow
#

rogey

thin stratus
#

There is a plugin on the Marketplace that says that it adds Host migration

#

But it's terrible

#

It's not actually migrating anything

kindred widget
#

Depending on size of game, if you don't mind a loading screen it's semi possible. But anything large scale is going to be a reeeeally huge headache. And it's already going to be one of those. ๐Ÿ˜„

keen hound
#

would these work?

thin stratus
#

If you only have one Component then you only need one Function and one Variable

hollow swallow
#

yeah ill just go with dedicated servers once i get up to it then

#

i dont need anymore headaches xD

thin stratus
# kindred widget Depending on size of game, if you don't mind a loading screen it's semi possible...

Yeah, you'd need to somehow catch the point where the Host leaves/crashes/disconnects. Ensure that all Clients always know the full state of the game (even stuff they shouldn't know about). Save that all to the disk, leave the match. Let someone host again, restore the state from Disk, and somehow also ensure that in that one frame you also communicated who will be the next host so the rest can connect again

winged badger
#

i feel like i wrote host migration instructions 15 minutes ago

kindred widget
#

Yeah. And all of the data validation to make sure the new host actually has correct data. ๐Ÿ˜ฌ

keen hound
hollow swallow
thin stratus
hollow swallow
#

๐Ÿ˜‚

winged badger
#

definitely not

thin stratus
# keen hound

Yeah that's fine, now you need to go into your OnRep function and set the Mesh of the Component

winged badger
#

anything that is generic enough to be a plugin is shit for your game

thin stratus
#

Even if I could make it work for "every" game, I would rather spend my time staring at drying paint or so

thin stratus
#

No

#

In the OnRep function of your Variable

#

If you mark a variable as RepNotify (which your MeshBody 1 is) it auto generates an OnRep function

#

Which is being called when your Variable is set

#

You should however ensure you aren't renaming your variable after that

winged badger
#

plugin would have to literally save every single difference between the packaged level and current level, since it has no way to determine what is important, or what can be restored from other data

thin stratus
#

Otherwise you'll have to unset and reset it to Rep Notify

thin stratus
#

user as in dev

winged badger
#

it could use integrated SaveGame archive, but even that is... ugh

thin stratus
#

also @keen hound since you are struggling with the basics, please read the Network Compendium

#

3rd pinned message in this channel

thin stratus
#

it's a remnant from CoD fwiw

hollow swallow
#

yeah not needed. but it is a nice to have

thin stratus
#

If you have player hosted games, it's usually not a thing that a player just quits.
Most games that have Listen Servers have periodical saving etc.

#

If you have anything more competitive, you use Dedicated Servers anyway

winged badger
#

or you if just have enough budget

thin stratus
#

CoD did competitive gameplay with player hosted servers

thin stratus
winged badger
#

im glad i didn't write anti cheat code for that

kindred widget
#

That sounds like a living nightmare.

prisma snow
#

things that keep you awake at night

thin stratus
#

Or close to having a heardattach

#

50/50 chance

#

Spoiler, it was air

prisma snow
prisma snow
civic seal
#

Hey there guys, I got a problem with server travel that has to do with netmode checks. It seems that when transitioning to a new map, the client begins to consider itself the server as if it's standalone. I assume it has to do with the transition map.

The issue with this is that some actors have logic that differs between server and client, and clients start trying to perform serverside logic on these actors which leads to a crash since the data needed for this is lacking.

#

Any clue if there's a condition I can check to prevent this?

#

this authority switch seems to happen before the map changes, which results in serverside logic executing on actors which were just simulated before then

dusky yoke
#

How can I make an AI have a random scale in a range, and replicate it properly? Struggling to replicate random values.

#

It's an AI, and the AI already exists on the server along with all it's information, right? So I should maybe just Multicast the information, but that's giving me inconsistent server/client random values too

graceful flame
#

Then maybe on a repnotify you can use set world scale

sterile plaza
#

It does look like you're randomly setting it on the client and then trying to send it to the server?

The way I like to think about a server/client model is that the server does EVERYTHING. It creates everything, it controls everything, it moves everything, it shoots everything, destroys everything, etc.
But then you obviously want your clients to be able to see/hear this. So you replicate what they need to see: actors, attacks, hit reacts, music, etc. Some of this doesn't actually need to happen on the server, like player face effects, that's fine.
And then you probably want your clients doing something and controlling something, so you send their instructions back to the server to be processed, simulated, and then replicated back down so you can see it.

This isn't the completely solution, but it's a better basis for starting than, "do stuff on the client and then do some stuff on the server." Assume everything is on (and only on) the server unless there's a reason for it to not be.

subtle raptor
#

i have a question, my enhanced inputs work perfectly on the editor but when i test on my development build as a multiplayer client, the inputs dont work, do you know why?

sterile plaza
#

What consumes the input?

subtle raptor
#

My Character

kindred widget
#

First guess is something related to setting your contexts on a wrong event.

subtle raptor
#

im setting my context in the begin play, filtering by only locally controlled pawn

sterile plaza
#

your character directly? not the controller? is it at least filtered through input actions and not listening to button presses directly?

#

ah

kindred widget
#

You should do contexts in the controller, not the pawn.

sterile plaza
#

There are a number of best practices you could adopt that will simplify your life in this area.

subtle raptor
sterile plaza
#

bind the inputs in the controller, not the character (only player controllers need to bind inputs, not AI controllers, which will save you some work)

#

no need to check context in that situation I don't think... unless you support local multiplayer

#

are you using C++ or BP or both?

subtle raptor
#

both

#

the more strange is what the inputs works on editor but not in the package, im using a dedicated server local

kindred widget
mild lynx
#

Is there a reason when I Call an event from Server to Owning Client, it runs twice?
Doing this from a projectile Event Hit, which has the Owner and Instigator properly set up.

subtle raptor
kindred widget
#

You have contexts added to the enhancedinputsubsystem in the beginplay of your player controller. The pawn is possessed, and you're not getting inputs in a built game but are in editor?

subtle raptor
#

im adding the input context in the begin play of the character, filtering for only localcontrolled paw, in the editor works but dont work on my package build

sterile plaza
# kindred widget What do you mean by binding inputs in the controller and not the character?

Understanding the division of responsibilities between controllers and pawns (characters in this case) has subtleties, but is invaluable.

The pawn is responsible for managing itself. Doing things, maintaining state. But it's not responsible for decisions making. The controller is responsible to figuring out what to do and then telling the pawn to do it. Thus an AI controller runs its AI to decide what to do and a player controller listens to input to decide what to do.

subtle raptor
#

and in the editor dont work when i execute the command open myip:myport and connect to my dedicated server

sterile plaza
#
    virtual void SetupInputComponent();```

I override this to bind inputs in my player controllers.
kindred widget
subtle raptor
#

i'm trying to resolve it now

sterile plaza
#
if (UEnhancedInputComponent* EnhancedInputComponent = CastChecked<UEnhancedInputComponent>(InputComponent))
{
    // UInputAction* is a property that I set in blueprint
    // void SetTeamTo1Completed(); handles the input
    EnhancedInputComponent->BindAction(SetSpawnTeamTo1, ETriggerEvent::Completed, this, &AMyPlayerController::SetTeamTo1Completed);
}```
subtle raptor
#

basically the input doesn't work when i connect to the dedicated server using a command

sterile plaza
#

I would switch input binding from your character to your controller, then worry about how it networks

#

in SetupInputComponent()?

#

on your PC?

kindred widget
# sterile plaza Understanding the division of responsibilities between controllers and pawns (ch...

That's a lot of words for not answering the question. You absolutely should never put controls related to a specific pawn in a controller. The controller exists to house the InputStack which is an array of InputComponents. These delegate input to any actor, possessed pawn included. Putting them in the controller undermines this entire system and forces your controller to care about the pawn in question. Is the pawn a ship, or a character, or a vehicle, or a plane? Why would the controller need to care about this? It never should, and putting code related to the pawn in the controller goes against that and just causes extra boilerplate coding.

sterile plaza
#

I always go back and forth on how much best practice I should give to equip people vs simply debugging the current problem. :/

#

eh

#

I had thoughts, but decided I should refamiliarize myself with things first. It's been a while since I've been responsible for managing input.

#

And I have only barely used the new input system, so I don't know the intricacies of that.

kindred widget
#

It's not about the new input system. The old one worked the same way. The only thing that Enhanced Input does is extend the component itself.

sterile plaza
#

You should probably pay more attention to what Authaer is saying than me, Gabriel.

subtle raptor
#

but why dont work when i connect to dedicated server? and work perfectly in single player

sterile plaza
#

Would have to see where you're binding things.

kindred widget
#

Are your context mappings still in the beginplay of the character?

subtle raptor
kindred widget
#

The issue you're facing is that Beginplay runs before the client knows the pawn is possessed. This is why I said you should move your context mappings to the controller.

sterile plaza
#

Ah, I see what you're saying @kindred widget . Yes, binding inputs directly in code and not through data is not ideal. You don't want to see what else in my hobby project is hacked together until it becomes a higher priority.

I find my hobby projects often get tangled up in doing things at the scale I would do them at work and then I get bored. Trying to go faster and only design things to be as robust as I need the, while hopefully avoiding TOO much massive rewrites down the road. It's always a balancing act.

hollow eagle
#

Move it to SetupPlayerInput or whatever the pawn method is called, it doesn't need to be in the controller.

kindred widget
#

Yeah, that would be a better place.

hollow eagle
#

This is why there's a specific method for setting up player input

#

sorry, it's SetupPlayerInputComponent

sterile plaza
#

Pawn.h

    /** Allows a Pawn to set up custom input bindings. Called upon possession by a PlayerController, using the InputComponent created by CreatePlayerInputComponent(). */
    virtual void SetupPlayerInputComponent(UInputComponent* PlayerInputComponent) { /* No bindings by default.*/ }
kindred widget
#

Actually going to move mine there now. I hacked mine together in the controller. Lyra throws theirs from data assets.

sterile plaza
#

I don't think I knew this existed before.

hollow eagle
#

given that it's been in every template and sample project since the engine came out, I'm not sure how. You probably just forgot.

sterile plaza
#

I'm at a studio that switched to UE halfway through a project and none of us had used UE before, so we were scrambling to figure things out live. Lots of misunderstanding about how UE wants things to be done from back them. Also not something I've focused on much at work.

#

but forgetting is also a very reasonable theory

kindred widget
#

I might actually want to extend my project's character to call a BIE from that.

#

Actually. @hollow eagle You know if there's a client version of that for a controller leaving the pawn?

hollow eagle
#

it shouldn't be necessary

sterile plaza
#

Unfortunately, this bit of knowledge won't help with my current project as there are no player possessed pawns.

hollow eagle
#

input components don't stick around afaik

kindred widget
#

Was more thinking about adding and removing pawn specific context mappings.

sterile plaza
#

looks like the input component is destroyed on unpossess

thin stratus
#

Yeah but the mapping doesn't live in the ic

kindred widget
#

Yeah.

thin stratus
#

So if you add mappings in your pawn you gotta remove them again

#

At least if they are pawn specific

kindred widget
#

I mean I don't really care I don't think. I was already planning on just blobbing all of them in at once.

#

But might be nice to learn to handle them specifically.

thin stratus
#

That's fine too if there are no pawn specific ones

#

You could just override the event that inits the input stuff

#

And maybe the one that destroys it

#

Not sure if they are virtual

subtle raptor
#

Even waiting a few seconds afther the character spawned and possesed, the inputs dont working ๐Ÿ˜ฆ

sterile plaza
#

is this in beginplay still?

#

move it out of beginplay

#

there is a dedicated function for this

#

override that

subtle raptor
#

ok

kindred widget
#

Blah. That all looks like server code. ๐Ÿ˜ฆ I wonder if I could reliably catch that by just binding delegates to the pawn and input component's destroyed events in SetupPlayerInputComponent

#

Actually how does that even work on a client? Is the InputComponent replicated? O.o

#

It's not.. UnPossessed is client side then?

#

No.. It's server side. How in the shit does a client normally destroy the input component then?

sterile plaza
#

I am also curious, but this is distracting me from my own stuff. Keep me updated.

hollow eagle
#

input components are client side

#

I'm not sure why you think anything is happening related to input on the server

kindred widget
#

Unpossessed calls DestroyPlayerInputComponent

subtle raptor
#

this is running on my client side, and work perfectly in single player and with dedicated server only on the editor, but dont work if i connect to any dedicated server, super strange

thin stratus
#

Should also be called client side

kindred widget
#

Hmm.. I'm not seeing anything killing this on the client anywhere. Need tests.

sterile plaza
subtle raptor
#

yes

kindred widget
#

Lol. It doesn't destroy the input component on the client. ๐Ÿ˜‚

winged badger
#

and what are the action/axis mappings after that runs?

#

as long as it pops it from input stack thats fine @kindred widget

kindred widget
#

All but one of these prints are in a single frame and are from a pawn the client either is possessing or did possess. The NoValid component print is the server's Pawn.

#

It's just funny that the server kills the component but the client doesn't.

#

What led here was looking for a reliable event on clients to remove pawn specific context mappings. And realizing that the clients never actually remove their input components.

summer tide
#

Any idea what can cause this?

hollow eagle
#

Lots of things. You'll need to correlate that with server logs to know what.

rich locust
#

are RepNotify events are also being called from the server as well right now ? It was being called only by the client before.

#

Is this not the case anymore

pallid mesa
#

it depends, C++ only client, BPs client and server, except for arrays

rich locust
#

it was not like that before though

#

iirc

pallid mesa
#

it was

rich locust
#

ooh, maybe I was confused because of C++

#

thank you for quick clarification

boreal wadi
#

Iโ€™m using these in Lyra and for some reason the server is updating them but the client isnโ€™t getting the updated value. The only differences for me is Iโ€™m using a RepNotify instead of just replicated in order to fire off a delegate in the UI to update ammo. Another is my actor is dormant until fired. What is confusing is that all of the other rep notifies are working fine.

Basically what is happening is both the client and server start with 10 bullets and client runs firing logic locally then server runs it, subtracts the bullet and flushes net dormancy. Next time client fires it should in theory get the updated value of 9 but it doesnโ€™t it stays at 10.

Another weird thing is even with net dormancy turned off it is still not receiving the rep notify so Iโ€™m lost

Gameplay Tag Stack Container โ€“ The Games Dev https://www.thegames.dev/?p=109

fossil spoke
#

It literally provides you functions for such things.

#

PreReplicatedRemove
PostReplicatedAdd
PostReplicatedChange

#

These are your "RepNotify" functions for a FastArray.

#

If you want the UI to understand when these happen, you may need to expose a delegate for each of them on the FastArray itself.

#

Which external systems can bind to

boreal wadi
#

I changed it to rep notify after replicated wasnโ€™t working.

fossil spoke
#

Did you follow the guide correctly? I would double check everything.

#

This is a pretty simple usage of a Fast Array.

boreal wadi
#

Youโ€™d be surprised at how much in unreal I have no idea about lol. The code looks 1-1 with whatโ€™s in Lyra.

#

Iโ€™ll give it another look and will try out binding to those functions

abstract pike
#

@fathom aspen I had a look but couldn't find what I was after. Does it say somewhere in your compendium what happens to replicated actors when a client travels away from a level? I'm a bit naive when it comes to world changes so I'm trying to check whether the server will continue to try and replicate actors to the client even if it has changed level.

mild lynx
#

Is there a way to have an Event on Begin Play be for the client only? Even when using a Run on Owning Client event, it still affects other players clients.
My example is refreshing the Health Bar in the player UI. It will refresh everybody's. This is an issue when 2 players die close to one another, when the other spawns in, it updates the UI of the person who is dead and still awaiting respawn.

dreamy vault
mild lynx
whole axle
#

Hello, anyone is having or has had problems with the replication of the projectile in the FirstPersonCharacter? I new in the multiplayer so, i really dont know what i have to do

hollow swallow
#

im running that on the character that gets killed, it destroys them before respawning, but it seems to remove the widgets for all my clients. is that only because im playing as all of them through the editor? trying to stop widgets from doubling up on respawn, but too many to find all the references haha

mild lynx
#

The issue just being that I believe Begin Play runs on all clients. I had the Update Health Widget Values set up to a Run on Owning Client Event from the same connection there, but it didn't change anything.

#

I'm just curious to know the best alternative to trigger this code on something like a respawn where the client needs to get their HUD updated.

dark edge
#

Branch on Is Locally Controlled

dawn burrow
#

hi i looking for a map travel fix my player keeps booting player 2 when teleport to other map i tried few codes but this fail always

open junco
#

Been looking into RPCs + Delegate functions
Is that correct, that I can send a delegate as an argument to an RPC, and have the other side (client or server) callback on that delegate?

chrome bay
#

no

#

Delegates have no network functionality. I doubt sending one as an RPC parameter will even compile

open junco
#

I see
How can I implement a callback from that RPC to the same client then?

chrome bay
#

You can't - you need to call a Client RPC

#

And perhaps send an ID to the server which it sends back, so you can identify the call

fathom aspen
#

The replicated version on clients will be destroyed on map leave, and will be instantiated again on map join

abstract pike
fathom aspen
#

There is UGameInstance::ReturnToMainMenu()

hollow swallow
#

does the remove all widget node affect every player?

#

im trying to only call it on one client but it removes the others too :/

abstract pike
# fathom aspen There is `UGameInstance::ReturnToMainMenu()`

I'm struggling to find a concrete answer since it's all tutorials popping up in search but is that just a predefined widget that goes in a generic level or can it be like a full level as your "main menu"? We need to render 3d stuff as part of the "menu" so if it's widget only that won't work.

#

Nevermind!
I found it in the source comment. Back to default map. That's wonderful news.

graceful viper
#

Is mp support basically the same in 4 compared to 5 (downgrading versions)

prisma snow
thin stratus
frank birch
#

Learning a lot on character saved moves and I have a question:
Say the character runs into a trigger that is supposed to launch them (i.e. a spring)...
Can I trigger on both ends (autรณnomos and authority) a launch character? Or do I need to somehow make it a saved move? Do I need to launch character on fully simulated proxies or do I let the server launch them?

thin stratus
#

Cause both are supposed to step on it the same timestamp anyway

#

And launch velocity should already be stored in the SavedMove

#

And if not then a rollback will walk over the launchpad again anyway

frank birch
#

โค๏ธ

graceful viper
#

Alright thanks

hollow swallow
#

Just trying to do a simple sprinting function. Works for the client (although a bit jittery) but wont run for listen server. Any idea why?

hollow swallow
#

Tried a few different ways, same results

frank birch
#

Oh boi, you are in for a world of realization

#

I was a lowly chump like you half a week ago

#

The short answer, you can't alter any variable that affects the character movement component outside a saved move

#

The long answer... Lemme Google it

#

Start from the FAQ and then dive into the rabbithole

#

@hollow swallow

subtle peak
#

Any good resources on how to create good multiplayer compatible shooter AI? The ones i'm finding are not great..

subtle peak
hollow swallow
#

i found the issue, i had a running backwards bool that kept overriding the speed when not running backwards... doh!

drifting crag
#

Is there a practical way to disable character movement replication for a non-local character from client temporarily?

Example: Client player A hits NPC B, causing knockback. The knockback movement should happen on client immediately, regardless of server response (we can trust the client due to a non-competitive game), and server will catch up after receiving info of the hit. But because client has no authority over NPC B, the knockback movement gets corrected until the server sends info back.

My impression is that ServerAcceptClientAuthoritativePosition and IgnoreClientMovementErrorChecks both seem to be intended to be used on server side or in advance(?), and am not sure what the correct solution here would be. Any info appreciated! :)

drifting crag
hollow swallow
#

Actually I missed that event destroyed triggers on all, maybe that's why

drifting crag
mild lynx
#

Thanks for the help

frank birch
#

@hollow swallow & @subtle peak
nobody read what I wrote? ๐Ÿฅฒ
No matter how you trigger your rpcs, you can't change the max walk speed in an rpc and have your network not break ๐Ÿฅฒ
Network is hard, if you are not the reading kind, watch the video version on how to extend the CMC correctly https://www.youtube.com/playlist?list=PLXJlkahwiwPmeABEhjwIALvxRSZkzoQpk

hollow swallow
frank birch
#

you wont get far in multiplayer without c++ ๐Ÿฅฒ
sad but true

#

(don't take my word for it, listen to the network gods ๐Ÿ‘€ )

hollow swallow
#

i mean, ive got a lot done already, and im always the host in my group of friends that will play. so rip to them ๐Ÿ˜…

drifting crag
#

Yeah, C++ is definitely the correct way to go, but depending on what kind of game you're making you can definitely at least get away with blueprint shenanigans, if perfect replication isn't mandatory.

...now, if you're making a pvp shooter or something of that sort, uh. good luck with that without c++ :P

frank birch
#

yeah, if it is coop then you might aswell go client authoritative ๐Ÿค”
it should be simpler but I am not sure how to implement that, I am diving into server auth ๐Ÿ˜…

drifting crag
#

yeah, i'm currently in the process of trying to figure out how to get client auth to collaborate, and most things work pretty cleanly :) but there are some odd cases, like applying movement to a non-locally authoritative NPC

am probably gonna have to dive into proper server auth at some point for another game, but gonna enjoy this while i have it.

mild lynx
#

Is there a way to set "WantsToCrouch" in blueprint? I'd like to use this for crouch since I heard it's already properly replicated across multiplayer.

frank birch
#

i my brain there has always been a "crouch" and "uncrouch" in the character blueprint that you can use ๐Ÿค”

mild lynx
#

Oh yeah, I see that. I assumed that was an incorrect method, but I was wrong. That worked just fine

graceful viper
#

For multiplayer games I can just let people host listen servers right? Or would I need to create servers for them

hollow swallow
#

pvp rpg ๐Ÿ˜› ill get there without it

hollow swallow
#

On a side note. Do I need the source build to make a dedicated server or can you do it from inside the epic launcher build now?

frank birch
#

last time I checked, you needed a source build to package a dedicated server, but it might have changed from 4 to 5?

hollow swallow
#

Think I might jump into that rabbit hole tomorrow ๐Ÿ˜…

broken grail
#

I created a working multiplayer testgame with listen server and clients. Now i want to transfer data from the player (like player name) through the next map (next map after lobby). For this i was thinking of using the game instance. Each character has a struct with its data (right now only the name). on joining the session the game instance struct (similar to the player character struct is filled) and then i want to transfer that data to the player character.
Is this the right way to doing it?
I figured out that client and host has their own data. The host has both player in the struct array (for each player a struct). the client has null.
I could really need some help to work this out.

sterile plaza
# broken grail I created a working multiplayer testgame with listen server and clients. Now i w...

I recently did this.
Look into Seamless Travel. A small number of actors persist. Player state is probably the best place for your use case. I found that seamless travel is disabled by default in PIE and I had to enable it every time I ran with a console command. AND it's not terribly stable and PIE crashes about half the time after I do such a travel. But it worked. If you figure out how to do it without the instability, let me know.

I overwrote this function to copy what I needed.

    virtual void CopyProperties(APlayerState* PlayerState);```

https://docs.unrealengine.com/5.0/en-US/travelling-in-multiplayer-in-unreal-engine/

An overview of how travelling works in multiplayer.

queen escarp
#

erhm my sourceCode folder is 180 gig dose that sound an alarm for ppl x) ?

broken grail
#

Thanks. I fixed my approach and can now access my data via the server. now i just need to find the correct player and put the data into the character ๐Ÿ™‚

frank birch
#

I found a very interesting animated explanation of rollback netcode (not unreal specific, just the rollback concept in general)
Leaving it here for anybody that wants to understand the concept or rollback netcode
https://bymuno.com/post/rollback

ruby lodge
#

How can i make that morph targets also work when in standalone mode? I think it got something to do with multiplayer because i set the project up in a way that the player gets spawned in gamemode. Idk if anyone knows the youtuber Kekdot but basically with his vid

#

and i got the entire ui from my character bp to the player controller bp

#

everything is working besides that basically

cosmic yoke
#

hello, how reliable child actor components are for replication?

#

or should i kill it with fire?

sterile plaza
#

actor components? good for replication

dark edge
sterile plaza
#

child actor components?

cosmic yoke
#

yes, to spawn actors inside a blueprint

frank birch
#

You can spawn actors without them being childactor components ๐Ÿ˜ฐ

cosmic yoke
#

i know, just asking out of curiosity

dark edge
#

you're much better off just spawning actors

#

I wish you could nest actors though, that'd be great for editor time

broken grail
#

I have a widget component but i can only seeing it on each player. i would like to be visible for both.
I marked it green. there should be the name of the other player. or have id do it via a widget on the hud?

dark edge
broken grail
#

On begin play i do that.
And on the widget i bind the character name to the text.

dark edge
#

just do that stuff locally everywhere

#

also widgets aren't replicated

#

If what you care about is the widget knowing what character it's on:

Begin Play -> get widget component -> get widget -> tell it to care about self

That's it

broken grail
broken grail
dark edge
#

Just do this on begin play everywhere

#

btw widgets don't replicate so CharacterReference being replicated is doing nothing

broken grail
broken grail
# dark edge repnotify

maybe i understand it wrong. My UpdateName function is not updating the name directly. its more update data. that data i get from my game instance. so on begin play (transition form lobby to map) i move the stored data from the game instance into my character (right now only the name). if i would change the name on the character while playing i could used repnotify to call all other the changes. i am very new to networking so i could also be very wrong.

dark edge
dawn burrow
#

i got same prob

#

my 2nd player drops when travel maps

dark edge
#

Client can change whatever they want on their end but the only things that affect the server state of the game are all done by the server

#

Security comes into play when you make the client -> server RPC call.
Instead of client telling server they got XP or killed the deer, client should tell server they want to attack

hollow mango
#

I got a quick question, i want to make a round based multiplayer 1v1 match, with magical items. Is lyra the way to go, or should i only use the regular mutiplayer of UE5?

#

Im asking because the lyra documentation seems very poor, and its huge

dark edge
#

Rock paper scissors is round based

#

so is Counter Strike

#

depends on where you are on the spectrum between them

hollow mango
#

it supposed to be a third person 1v1 match in a 3d environment

#

With different kind ob abilities

dark edge
#

You still haven't said anything about the pacing of the game or if it's turn based or real time or slow paced or super twitchy

hollow mango
#

Its like elimination, with the expception that if one of those 2 players dies, the next round will begin.
Its realtime and very interactive, they fight in a environment and cast spells to try kill each other.

#

So basically they fight, until one of them die, and then the next round starts, whoever wins 2 of the 3 games is the winner.
You can think of a gladiatorfight, but instead of gladiators, you have wizards

dark edge
#

You still haven't said if it's turn based, realtime, fast paced (needs a lot of prediction), or slow

hollow mango
#

it is realtime, and it is turnbased, not turnbased like pokemon, turnbased like a boxmatch, The only way players will be able to damage each other is through projectiles (no hitscan)

royal wren
hollow swallow
#

what is the easiest solution to store player name / stats / items on a database or something so all players keep their stuff no matter what server theyre on? havent touched c++ yet and this is probably going to be a bit out of my depth but want to get onto it and start learning. if anyone has any good tutorials to follow or recommended ways to do it would be great

astral crater
#

I have an actor that is loaded in as part of the level and has a Server RPC.
I would like for this Server RPC to be called from any client, but I have come to find that since the actor is loaded by default, it has no owner, and thus any attempt to make the RPC from a client is dropped. I don't want this actor to "belong" to anybody, since I want all clients to be able to call the RPC. Is this even possible, or do I need to come up with a different scheme for this?

astral crater
hollow swallow
hollow swallow
#

yeah think im out of my depth here ๐Ÿ˜…

rotund badger
#

if you want a simpler solution, could always look into SQLITE 3

sterile plaza
#

evening

gaunt crown
#

Hey guys quick question, Iโ€™m creating a third person shooter game. But require a system for lag compensation on line tracing for weapons to be cheat free as Iโ€™d rather not deal with client to server line trace. Any popular/well known lag compensation plugins / systems or c++ packs that I can integrate into my blueprint game for the line tracing system? Cheers guys.

#

As most published games have some sort of lag compensation system for doing shooter games. Trying to get the core of the game set up to be replicated correctly and no client reliability for these main components

sterile plaza
#

Iโ€™d rather not deal with client to server line trace
what do you mean by this?

gaunt crown
#

doing client trace in general without any lag compensation for multiplayer shooter game use is looking for problems with fairness.

#

Prime example. ARK old_man_yells_at_unreal

chrome bay
#

Lag compensation is to make shooting feel better, it's not for anti-cheat

#

I wrote the lag comp and verification for HLL. The gist of it is pretty simple:

2) When a player hits something, rewind that players capsule position by the shooters RTT (ping * 2)
3) With a tolerance, redo the entire line trace from original shot origin->client impact position.
4) If the trace passes near to or hits the capsule, accept the hit.```
#

You also don't need to move the players for rewinding. Doing that is pointless, you can approximate the capsule for the server-side trace with a point-line intersection test

#

We had travel time so the replay was more complex, but for hitscan it should be easy

#

The anti-cheating part comes in many forms. You need to make sure the client isn't sending hits too fast, isn't sending hits for shots they never fired, isn't shooting through walls etc.

#

The lag compensation in theory hides the latency so players don't have to "lead" shots to account for it, ideally lead should be the same regardless of ping.

queen escarp
#

hey guys this is a serious question my scoursecode folder is 180 Gig of that normal ?

chrome bay
#

Sadly yes

queen escarp
#

holy moly

#

then i know i dont gave duplicates or something atleast

chrome bay
#

Obvs when you build it won't be anything like that large, but all those extra build products from a source build and symbols make it massive

queen escarp
#

aye the builds are on another drive

#

so i get that it was more if i did something wrong and now ih ave 10x sourcecodes etc something

#

but i guess its worth it .P

queen escarp
#

Do i have to Remove the packaged build each time or can i just rebuild and it will overwrite the existing one ?

chrome bay
#

It'll overwrite

queen escarp
#

ah coolio

#

but i would always have to rebuild both server /client each time riught ?

plush wave
#

Can you run RPCs on an actor you own?

gaunt crown
#

There is plugins on Marketplace IIRC on this, I may have to look into.

chrome bay
queen escarp
#

how do i turn of my "dedicated server" :/ ?

chrome bay
gaunt crown
#

Thanks to fortnite. And I am aware that fortnite is based off C++ for most things.

chrome bay
#

Multiplayer in BP is everything but powerful or efficient

#

You have maybe 5% of the available tools for multiplayer in BP, not to mention that things like rep notifies don't even work properly

#

We use BP as a scripting tool only. Core logic belongs in code where it can be properly debugged etc. Also you don't really have the chance to not ship code to clients when it lives in BPs

#

BP is a great tool but it's not the right fit for everything

gaunt crown
#

Thatโ€™s surprising, and upsetting to hear that rep notifyโ€™s are still buggy sounding. Very saddening

chrome bay
#

Only in BP, in C++ they work just fine

#

BP rep notifies are a nasty hack

gaunt crown
#

I wonder why theyโ€™re still broken.

#

Itโ€™s crazy. IN UE5 Especially. Itโ€™s a powerful engine core

chrome bay
#

They aren't properly implemented. What they really are is a callback whenever the property value changes. The problem is that's any change from anywhere, not neccesarily a replication update.

#

So you change a property on a client, the rep notify fires sweeney_activate

gaunt crown
#

The more you know.

chrome bay
#

Change a property on the Server.. the RepNotify fires on the Server tableflip

gaunt crown
#

My goal is making a blueprinted TINY shooter game.

#

Iโ€™m wanting to use all my blueprinting knowledge of several years to finally make a game.

chrome bay
#

You can do what I described above in BP I'm fairly sure, just wouldn't be particularly optimal

#

Some stuff is easier to build in native code

gaunt crown
#

Not something like 30v30 games or something. More of like 5v5

#

For sure.

chrome bay
#

We did 50v50 before all the fortnite stuff came so I have experienced raw pain

gaunt crown
#

People who try to pull off battle Royale games in pure blueprint is bound to have forever issues, lag especially.

chrome bay
#

BP just isn't the ideal platform for inherently complex systems, it's ultimately an outrageously powerful scripting tool

gaunt crown
#

And all those kits online of survival game kits. Building, stats, weapons, inventories. My lord. Itโ€™s a mess of spaghetti that is all over the place. You cannot keep up and not only that. Itโ€™s just visually hard on the brain lmao.

chrome bay
#

And you can do great stuff with it, but once you get started in CPP it's like you're Keanu and you've been given the Kung Fu floppy disc treatment

gaunt crown
#

Love your take on it. Haha

#

I have never tried C++.

chrome bay
#

Going way off topic now but BP makes it much easier to dig into C++, especially with all the template projects from Epic - you can slowly pull things apart and see what's what.

#

If you've spent lots of time in BP, you're already halfway there

gaunt crown
#

Nice. Yeah well I definitely have. I just donโ€™t feel like Iโ€™ll get it and learn it easily without months of practice and watching videos lol. But that was the same with blueprinting! I started blueprinting and picked it up within months and now making my own projects from scratch.

#

Years later.

#

C++ just seems to be way hard. Just thinking about it and seeing it, instead of being visual nodes. I thought Iโ€™d have no hope

chrome bay
#

Just takes patience and time. I started out in BP with no programming experience in like 2014, now I'm a senior. Granted though I had the opportunity to focus on it and nothing else for a lot of that time, so I was fortunate.

gaunt crown
#

Well weโ€™ve started out in the similar situation. No knowledge / experience, jumped into BP, now itโ€™s time for me to move into C++. Not to mention, itโ€™s so much cleaner having base blueprints with all the core code you write in them and not in graphs.

chrome bay
#

Just start out simple (i.e, not multiplayer) - convert some of your simpler BP's to code, and keep going from there

gaunt crown
#

Exactly. Would love to keep a clean base blueprint to expand upon.

#

Iโ€™ll try to find some good courses.

kindred widget
#

@gaunt crown
Will give you a small anti-headache starter package.
โ€ขTurn off reinstancing for livecoding.
โ€ขLeave livecoding on.
โ€ขGet used to reopening the editor after changes to C++ files.
โ€ขIgnore the Error List in VS, focus only on compile outputs.
โ€ขYes vanilla VS is slow and clunky and intellisense rarely works.

hollow swallow
#

trying to think of a way for players to keep all their stats between servers. databases are looking pretty confusing, is there a way to use save files and only retrieve certain info from them?

chrome bay
#

A backend data base is the only way to do that properly

#

If you store it client side players could send anything

hollow swallow
#

im not toooooo fussed about that, preferably not, but i cant see myself actually releasing the game, more to share with friends as a hobby, and none of them would be capable of editing the data haha

#

all the backend data base are either really expensive, or seem really complicated. Are there any really straight forward simple tutorials on it?

chrome bay
#

Unlikely tbh, backend management is a whole career

#

You might be able to use some service offered by the online platform you're using

#

Steam has a very very primitive per-user stats system

#

Unreal doesn't expose it very well though

hollow swallow
#

yeah im currently using steam at the moment

#

have you got the name of that system by chance? and im guessing its going to be quite limited?

#

so far im trying to learn 50 careers to make this game ๐Ÿ˜…

chrome bay
#

Just google Steam Stats

#

Steam users can have per-game stats (ints and floats) tied to their account, which you can lookup

#

It's far from a flawless system but it gets the job done

hollow swallow
#

rogey cheers

fathom aspen
#

What's would be the way of lying to the engine that my object has a dynamic net guid without replicating the object? Think

#

Basically I want my multicast RPC to create the missing object on client without the engine ranting over me

#
/**
 *    Associates a net guid directly with an object
 *  This function is only called on clients with dynamic guids
 */
void FNetGUIDCache::RegisterNetGUID_Client( const FNetworkGUID& NetGUID, const UObject* Object )
{
    check( !IsNetGUIDAuthority() );            // Only clients should be here
    check( !Object || IsValid(Object) );
    check( !NetGUID.IsDefault() );
    check( NetGUID.IsDynamic() );    // Clients should only assign dynamic guids through here (static guids go through RegisterNetGUIDFromPath_Client)

Sadly last check fails, since the object is only created on the server and is not replicated

#

Well I completely forgot that IsNameStableForNetworking exists, so overriding it might do the trick

#

But my other question now would be: How safe is it to create a replicated component at runtime and fire a reliable multicast on it? Is there a race condition here? Is the multicast guaranteed to reliably fire on clients?

chrome bay
#

IIRC, the order is undefined (or at least inconsistent between reliable vs unreliable)

#

Unreliables + Properties go into the same buffer, reliables have their own

#

So in times of packet loss, you could maybe drop it? Not sure..

fathom aspen
#

Yeah I would expect unreliables to go the path of replicated properties and to get the effect of the multicast by the time the actor component get spawned. But still I have seen times where that wasn't the case, and making the multicast reliable will only guarantee it to be there by the time the actor component spawns on client (prolly due to the retry mechanism)

ebon zealot
#

I have a replicated UObject with a TArray of UObjects that should also be replicated but in the OnRep the array is just filled with nulls instead of the object values, if I have a replicated property of the UObject alone it replicates fine
why's that

fathom aspen
#

Only if Iris was around
In iris they enhanced this behavior, such that it's safe to call a multicast as soon as BeginPlay fires on an actor/actorcomponent

ebon zealot
#

My understanding of replicating uobjects is also quite limited since I can't find good documentation on them

fathom aspen
#

OnRep doesn't fire after all the entries are valid

#

On array I mean

#

That's just not how it works

ebon zealot
#

I see

fathom aspen
#

First time array replicates it sends the size

#

So you will see entries but all null

ebon zealot
#

alright that makes alot of sense

#

so OnRep is called multiple times for the different stages of array replication?

fathom aspen
#

Right

ebon zealot
#

what are these stages?

#

it sends the size then it calls for every element one by one or does it call after all elements are sent?

fathom aspen
#

Every time an element replicates

ebon zealot
#

I see

fathom aspen
#

I mean if it can combine two elements in the same packet

#

Then you would get replication callback with two elements that are valid

#

So it's not strictly calling the OnRep by the size of the array

ebon zealot
#

yeah makes sense

graceful viper
#

@thin stratus (question from our last convo a few weeks ago) do you need a third party relay server for ue5?

ebon zealot
#

is doing this enough to guarantee UObject replication? other than this my UObjects have IsSupportedForNetworking() returning true and other functions overriden for RPCs

#

this eventually gets called with an Actor's ReplicateSubobjects

fathom aspen
#

Yeah should be enough

#

Just in case you forgot something Jambax has an article on that

#

Goes by the name "Replicating Objects: Building a flexible inventory system"

fathom aspen
#

Oh so close

#

Missed the U prefix

ebon zealot
#

lmao

chrome bay
#

tbf it's easier to use the subobject list now

ebon zealot
#

how would one do that?

ebon zealot
#

I've had too many problems so I'm thinking of refactoring it all to use structs

graceful viper
#

Like if I make a multiplayer game will listen servers just work off the bat

ebon zealot
chrome bay
#

You need something, unless you want to just use join via IP

ebon zealot
#

hm

#

hopefully this new system works for me

chrome bay
#

Also runtime spawned replicated subobjects should use the actor as the outer

ebon zealot
#

been painful getting this to work lmao

chrome bay
#

Otherwise problems

ebon zealot
#

yeah that's already the case

#

does the UObject need to have IsSupportedForNetworking and all that?

chrome bay
#

yea

distant turret
#

Hi guys for implementing multiplayer the engine must be a source build?

ebon zealot
latent heart
distant turret
latent heart
#

Ah for that I don't know.

distant turret
#

It does work but cant get the text variables somehow. To set local currency text

rotund cosmos
#

Hi. Can I somehow specify a game mode to use when opening a map? (in c++)

thin stratus
#

In general you pass that along as an option

#

?game=shortcode

#

shortcode being something you set up on your Project settings under maps and modes

quasi tide
#

If you port forward and then share that info with your friends, they can join you without using a relay server

graceful viper
thin stratus
#

No

quasi tide
#

Port forwarding is something you do on your router/modem

thin stratus
#

Relay servers or Master Servers are hosted outside and aren't relevant to Unreal at all

#

You either need to code that yourself or use a provider like Steam for it

#

Out of the box UE only provides direct IP Connection or LAN. And LAN might not work if your Router doesn't like you using the broadcast IP iirc

prisma snow
#

one of our programmers is working into adapting Valve's source code for multiplayer and sockets, to get around the NAT issues

#

it is a very cool library

rose egret
#

is it possible to use VoiceChat in NullSubsystem without having session ?
i remember voice chat needs session otherwise it wont work , but im using NullSubSys and connect by direct IP

thin stratus
#

Otherwise it won't send the voice packages

rose egret
#

4 years ago I faked that s*** by editing NSS, I cant do that for a simple project anymore

#

I just need a easy fast way

thin stratus
#

You don't need to edit though. You should only need to call addnamedsession manually

rose egret
#

I feel like they added this function recently

#

๐Ÿค”

#

there was not such thing at that time, most of them were private ๐Ÿค”

ebon zealot
#

my data asset isn't replicating properly for some reason

#

it's a subobject to a replicated uobject

#

i think I know why actually hold on

winged badger
#

your data asset shouldn't be replicating, it should have static data packaged with the client build

nimble haven
#

Hey everybody, I'm a student in Scotland and working on a project researching the indie dev industry. I'm wondering what tools people use to bring multiplayer to their games? Basically a friend has developed a project to bring MMO-scale hosting to indie dev with a few lines of code. Is this something you would find useful/interesting? Would really appreciate people's thoughts/feedback ๐Ÿ™‚

chrome bay
#

Basically a friend has developed a project to bring MMO-scale hosting to indie dev with a few lines of code
Already I am skeptical

icy jetty
#

Scam alert ๐Ÿšจ ๐Ÿ˜€

nimble haven
chrome bay
#

Just that MMO's are bafflingly complex to build - and Unreal generally isn't an MMO-oriented engine.

#

Not that people don't do it, but they're pretty few and far between

#

I've no idea if there are even any moderately successful ones, but depends on your definition of MMO

nimble haven
#

yes - very true! basically my friend wrote his university computer science thesis on how to solve this for indie developer's. and trying to figure out if it is something indie developers actually want to be solved...

chrome bay
#

IMO, I doubt it

#

If you're going to invest in an MMO at all, you'll invest in your own tech

#

And only enormous companies have the capacity to deal with it

#

A backend is one thing, actually making an MMO is another

#

Indies don't have the resources

nimble haven
#

because of the need for content/assets etc as well?

#

all of this is super helpful thank you ๐Ÿ™‚

chrome bay
#

Also the general complexity

nimble haven
#

yeah well i guess the idea it least is to create an open source tool off the back of the thesis that handles all of the complexity for indie dev's, but i suppose it's more a question of whether building an MMO style game goes against what indie devs actually want

chrome bay
#

First step tbh would be finding an indie who actually wants to make one and asking them

hollow eagle
#

The complexity of MMOs is not hosting, that's only a very small part of it. That's why you're going to get pretty much nothing but skepticism around it - it doesn't solve a problem that "indies" have when building MMOs.

queen escarp
#

really replicating from client to server/client(listenserver) bugged ๐Ÿ˜ฎ ?

dark edge
nimble haven
dark edge
#

Oh like a chat room

#

I suppose that counts

#

the connections aren't the problem, the game logic that doesn't need a supercomputer to run is

#

Hundreds of thousands of people playing Chess is not the same as them playing For Honor

nimble haven
#

Yes of course. The thesis is effectively around how you distribute that compute load in an effective way that doesn't require a supercomputer as you say.

graceful viper
dark edge
#

and also, not really the engines domain.

graceful viper
#

Wdym by bespoke

prisma snow
dark edge
#

WoW will have a very different system from New World or EVE or Destiny

graceful viper
#

Hmm

#

Is it difficult to implement your own relay system?

dark edge
#

If you have to ask, probably impossible.

prisma snow
#

I'd not done it myself

#

I think it is not trivial

dark edge
#

I mean not impossible, but very impractical

#

You aren't going to make an MMO from your basement by yourself.

#

Big teams spend hundreds of millions of dollars on MMOs that fail instantly.

#

Something like ROTMG, sure

#

but you'd have to be pretty damn good at backend stuff

graceful viper
#

Yeah I thought so

#

Alright thanks

dark edge
#

It'd look more like a webapp than a game

sterile plaza
#

Providing MMO solutions for indie devs feels like going to someone who's working on a kit car in their garage and telling them you can make building an aircraft carrier easier.

frank birch
#

Help, still trying to wrap my head arround extending the CMC
I see that when we use bitflags from the saved move, we are super happy because those are always replicated from saved move to saved move. Yay.
Now... when we need to replicate extra values (or we don't want to use the bitflags) we have a FCharacterMoveResponseDataContainer that replicates the other variables but I have no idea how it works ๐Ÿ˜…
Researching unreal says that it's the aknowledgeing package for a move and that it copies the FClientAdjustment and some extra stuff โ„ข๏ธ
I don't unterstand how the FClientAdjustment becomes the FCharacterMoveResponseDataContainer but let's say I belive in my heart of hearts that I will get my corrections inside this data container... the example for stamina (https://github.com/Vaei/PredictedMovement/blob/main/Source/PredictedMovement/Public/Stamina/StaminaMovement.h) only implements the "filling" part of the data container: FStaminaMoveResponseDataContainer::ServerFillResponseData
Where/How does the correction data gets applied to the client? ๐Ÿค”

#

(there are variables inside the FSavedMove_Character to represent the variables inside the correction Data Container but I thought the SavedMove wasn't replicated ๐Ÿค” How/Where do we get the Correction Data?)

#

Self Answering, I think it comes in the UCharacterMovementComponent::ClientHandleMoveResponse ๐Ÿค” ๐Ÿ‘€

#

yeeeep, that's it ๐Ÿฆพ

#

thanks for coming to my ted talk

frank birch
#

@grand kestrel sorry to ping you, I have reached the bottom of the rabbit hole I dug in and I am at a loss ๐Ÿ˜ฌ
Analyzing the stamina movement I understand how the UCharacterMovementComponent::ClientHandleMoveResponse realizes there has been a missprediction and corrects it (I even understood the comment about having to override the entire client handle instead of just the adjust client position) buuuut....
In none of your SavedMovement you implement FSavedMove_Character::PrepMoveFor, you only implement FSavedMove_Character::SetMoveFor.
If I understood correctly (and I might not have) I think that FSavedMove never travels through the network and is only used locally to re-predict the movement (replay) when the server corrects. Without the PrepMoveFor, saving with SetMoveFor is useless.... right?

cc @thin stratus. If I am getting banned for pinging network gods, let's ping everyone at once ๐Ÿ˜ฌ

grand kestrel
#

I don't think you're going to get banned for trying to learn so long as it's not inconsiderate (which it's not) ๐Ÿคฃ

This is something we discussed in detail at an earlier point, it would just end up being sent twice and out of sync if we put it there, its already being sent through FStaminaMoveResponseDataContainer::ServerFillResponseData

#

@frank birch

frank birch
#

But when I correct I get one correction from the past (that fixes my wrongness in that frame) and from there onwards I reapply my locally saved moves...
Don't I need to reapply my saved moves for replaying them?

#

or do I assume my saved moves have wrong values and don't bother?

hollow eagle
# nimble haven Yes of course. The thesis is effectively around how you distribute that compute ...

Unless the idea is something like spatialos (which isn't just hosting - it's a full tech stack that handles transitioning players across multiple servers to create a "seamless" world) then it's also competing with stuff like GameLift and PlayFab. They may be "big" but that doesn't mean they don't cater to indies, and it means you'd have to be able to explain why such a service is different or better. So far it sounds like "just" another server autoscaling service which there are a number of already.

frank birch
#

In regard to why PrepMoveFor and SetMoveFor shouldn't set stamina, Exi said:

Cause let's say the server corrects it to 5 and your move still has the old value of 50. Your saved moves will continue sprinting longer and cause another correction
Cause instead of running out of stamina you will probably have enough to keep sprinting and then send a new server move with a location that the server can't reach
The boolean also comes from the server. Doesn't sound right to override it with the saved move
And for saving it into the saved move, the InitialPosition function should be enough

But what if the correction is for something else? Say a small bump into a server authoritative object that performs a small correction on my speed. Shouldn't I replay my stamina correctly? ๐Ÿค”

grand kestrel
hollow eagle
#

I'm not saying they're good, or suggesting them in any way.

#

Just using them as an example of something that isn't just auto-scaling.

grand kestrel
#

Yeah just mentioning since it came up ๐Ÿ˜„

#

I always warn any indies away from them, if dedi server hosting is too expensive then they're wayyy too expensive

frank birch
#

then... putting my stamina in the SavedMove at all is silly ๐Ÿคฃ

#

only the "wants to" goes there and we good

#

I feel like I've leveled up, thanks again โค๏ธ

grand kestrel
#

I'll add to FAQ

#

I knew that info was there but its a pain to look for, makes sense to have it available on the readme

#

Getting to be a pretty complex FAQ, usually FAQs tend to be simpler questions ๐Ÿ˜„

frank birch
#

complex topics, complex faqs ๐Ÿ˜…

grand kestrel
frank birch
#

โค๏ธ

#

when we get to meet, I owe you and exi a beer ๐Ÿป

grand kestrel
#

I rarely meet anyone, living in NZ ๐Ÿคฃ Trying to move to Spain in ~18 months tho, or whenever they finalize their new digital nomad visa

#

But sure ๐Ÿ™‚

#

I do want to try to actually ever attend a GDC

frank birch
grand kestrel
#

It costs thousands to fly to/from US from NZ - flying anywhere other than Aus costs tons when you're so isolated (and small and therefore lack competition amongst airlines). Getting off-topic now

ebon zealot
#

is there a way for my ReplicatedUsing to only call once the entire object is fully recieved?

#

or is that what it already does

#

I know it doesn't do that for arrays just want to be sure for objects that contain arrays

chrome bay
#

It's not - since a reference TO an object is replicated independently of the object itself

#

That OnRep will only fire when that object pointer value changes, it won't fire when that objects' internal properties change

ebon zealot
#

i see

#

what's a good way to do this then?

chrome bay
#

Don't rely on it, it's impossible

ebon zealot
#

or is checking every property if they are proper a good idea

#

hm

#

how'd games generally do it then? I'm sure it's a common issue

#

I need my server data to be previewed in UI