#multiplayer

1 messages ยท Page 684 of 1

steep wolf
#

I need to get the "view direction" of the remote players

kindred widget
#

GetBaseAimRotation on the Pawn usually.

steep wolf
#

thanks!

#

hmm. I seem to have the server not replicating that properly. i see some movement, which is great, but it's not identical as the autonomous proxy

kindred widget
#

Depends on your setup. That's usually useful for characters. AI or first person. It's maybe less useful on some third person setups.

steep wolf
#

I have a third person character whose base animations I adjusted to use the pawn controller aim direction to do some bone deformation, but from what I see, only the pitch component of the FRotator is being applied instead of pitch + yaw

kindred widget
#

Ah. Yeah. You'll have some issues with that. GetBaseAimRotation uses the character's Capsule's Yaw to determine it's Yaw. It's already replicated through movement so there isn't a need to replicate it again so they determine it from that. Less useful if your camera looks a different direction than your Pawn. ๐Ÿ˜„

#

It's a virtual function though. You could add your own uint16/uint8 yaw replication and override it.

steep wolf
#

oh. great!

kindred widget
#

FRotator has some functions that make compressing Float axis to uint8 and uint16 very easy.

steep wolf
#

great. it works! thanks!!

tawny bane
#

Hi! I have some code that spawns a bunch of actors when the game starts, I set the event that spawns them to Execute on Server, but the actors it spawns dont appear on the client

#

I was told that Execute on Server automatically replicates it to the clients, idk if it does

verbal tendon
tawny bane
#

I tried multicast but then it didnt appear on the server

verbal tendon
#

You're not giving enough information to trouble shoot your issue. There are many reasons why that could be happening

tawny bane
#

wait

#

sorry

#

ok

#

I just tried multicast

#

it sort of worked

verbal tendon
#

Trying things, and things "sort of working" isn't helpful.

tawny bane
#

there is stuff on both screens, but their position isnt synced

verbal tendon
#

Throwing nodes at the problem doesnt help you

#

you need to understand the basics of what you're dealing with

tawny bane
#

sorry, let me back up

#

I have some code, it randomly spawns actors in a world. It is connected to a event, the event is a Multicast event. When it executes, the clients screen and the servers screen have the actors in different locations.

verbal tendon
#

Well are the actors supposed to be replicated/in sync?

tawny bane
#

yes

verbal tendon
#

Then you cant spawn them in a multicast

#

You're going to need to spend time understanding the basic Multiplayer concepts or you're going to keep running into similar issues

#

If you want something replicated, you can only spawn it on the server

#

UE's networking handles the replication aspect to all clients for you

tawny bane
#

so change it to Execute on Server?

#

I am very new to ue, pretty sure you can tell. sorry if this is basic stuff

verbal tendon
#

Yes, which is why I'm advising you go get a grasp of the basics instead of trying to solve this one thing

#

If you need something that spawns at gamestart on the server

#

this means you dont need an "Execute on Server" event

#

you just need to run that logic on the server

#

because otherwise based on where you place it, you risk executing it multiple times

#

once from server and once from the owning client, replicated to server if it's executed on an owning client actor

#

The multiplayer solution for each solution depends on what you need to do

#

if you're new to UE I would -very- highly recommend starting with exploring in singleplayer

#

and later adding multiplayer to your learning curve

tawny bane
#

the single player is complete

verbal tendon
#

Are you trying to turn your existing singleplayer game into a multiplayer game?

tawny bane
#

yeah

verbal tendon
#

Scrap that, start fresh ๐Ÿ™‚

tawny bane
#

the game is meant to be both

#

like scrap mechanic

#

or minecraft

#

I want singleplayer and multiplayer

verbal tendon
#

Since you're just learning multiplayer, I would suggest making a new project where you do that

#

instread of trying to transform your exisitng SP game into am MP one

tawny bane
#

the single player game is super simple, it isnt much work to turn it multiplayer, I just dont know how to do it

#

the main game is literally picking up and placing objects

verbal tendon
#

As you're learning multiplayer you're going to make mistakes

tawny bane
#

yep

verbal tendon
#

it's more prudent to do so on a clean slate and then once you're comfortable with it

#

return to your SP game and turn it MP

#

But that's your choice at the end

tawny bane
#

alright

verbal tendon
#

Generally speaking, anything replicated: spawn on server, modify on server, dont touch on clients

tawny bane
#

how do I make sure it spawns on the server and server only?

#

the actor that spawns it all is on the level

#

that the client and server have

verbal tendon
#

You can have your GameMode::BeginPlay

#

gamemode only exists on the server

#

There's an "IsServer" check that you can do otherwise

#

assuming the code runs on both client and server, you'd check where you're executing

tawny bane
#

thanks

#

I really appreciate it

tawny bane
#

I used a print node to check and it printed

clear barn
#

Is this the right place to ask for help with a Linux Server that was built from Unreal Engine Source?

I am having tremendous difficulty getting my server running. Please @ me if you think you can help.

autumn prairie
#

Whats better EOS or Steam?

#

About to buy one of them, I need to set this up today.

peak sentinel
#

Both is free?

autumn prairie
#

both cost about 100

bitter oriole
#

Steam is literally the market leader for PC games by about 5 times the next one

#

So like, you are selling there no matter what

#

The $100 fee is for that

#

Using the online stuff has no additional cost

peak sentinel
autumn prairie
#

So can someone point me in the correct direction on what to do here? ๐Ÿ™‚ Ill pay for anythign I dont mind,

bitter oriole
#

There isn't one correct direction

peak sentinel
#

You dont have to pay for anything, those plugins just make implemented systems more accessible

bitter oriole
#

Arguably Steam is 90% of your sales, if not 99%, and Steam users will hate needing more account setup after buying the game

#

EOS is only useful if you ship on non Steam platforms

autumn prairie
#

So I do not need this to set up steam login?

bitter oriole
#

Steam does not require any plugin

autumn prairie
#

thats just extra stuff

#

ahhh

kindred widget
#

Since you're not sure which one you want to use, I need to point out that you don't have to pay for anything until you're ready to publish. You're not ready to publish if you don't have your online subsystem set up yet.

bitter oriole
#

You need 10 lines of ini files from the UE4 doc for Steam - and you probably want the free advanced sessions plugin for ease of use

#

That's it

autumn prairie
#

this is making a lot more sense

#

google is a bad place for information like this lol

peak sentinel
#

Handy plugin, works well, but most of the times you dont need it

#

If you only want to connect people to lobbies etc. just stick with advanced steam sessions

autumn prairie
#

I only used the dedicated server button for almost 3 years now.

#

lol this is going to be fun, (sarcarm)

#

thank you guys ๐Ÿ™‚

tawny bane
#

I have some code that spawns in a bunch of actors randomly when the game starts, I want it to replicate to the clients. I have put it in my Gamemode class, and I know it triggers, it just doesnt show the actors for the clients. I know the code works, because it worked on a different actor.

kindred widget
#

Your spawned actors need to replicate.

tawny bane
#

Set Replicates?

#

or replicate movement?

#

which toggle is it?

kindred widget
#

Should probably be a default on the spawned actor's class.

#

Normal Replicates. No need for replicated movement.

tawny bane
#

that didnt work ๐Ÿ˜ฆ

clear barn
#

got this error that crashes my server and I'm not sure what to do about it. don't even know why the server is concerned with materials anyway

molten matrix
#

Thanks for your help earlier! I finally got it figured out. Turns out (surprise, surprise) that it was my fault and not the engine's ;). I was copying a whole set of actors from a "template" location to it's play location and it was also copying both the player pawn and the player controllers and doing weird stuff with turning off replication. Incredibly stupid and obvious in hindsight...

soft dawn
#

When replicating a skeletal mesh component, do the mesh and material variables in the component not get replicated too? I'm struggling to understand how to change the mesh and materials on the server and have them replicated to the client. The mesh and materials of the replicated component are always None when i access Skeletal Mesh and Materials in the RepNotify of the skeletal mesh component on the client. Should I not be replicating the component and just try to call a client function from the server with Skeletal Mesh and materials as parameters?

meager spade
#

we dont replicate meshes

#

we do replicate what alterations the player has and set them in the OnRep

#

on the character actor itself

soft dawn
#

Ok thank you, so I can't/shouldn't keep track of what modular meshes a character/player has in playerstate? I would just set the meshes on the server and have the character replicate to the client?

meager spade
#

that is design choice

peak sentinel
#

Curiosity question, is there any difference between replicating a int8 and int64 in sense of CPU overhead?

bitter oriole
#

Very unlikely

west mauve
#

Guys is it possible to create a Multiplayer game completely out of Blueprints?

hollow eagle
#

Yes, but blueprint is somewhat limited.

west mauve
#

Where exactly would I need to start implementing C++ then?

blissful slate
#

Hey all, just wanted to check my understanding.
I have setup a networked jump and crouch.
The crouch is just a single bool update, so on input just run a server event that updates the bool, then also update it on local.
The ABP updates according to this.
(I still need to add the capsule shrinking accordingly.)

For the jump, since it actually performs more logic,
the flow i have is
Run Server Event -> Server Event Multicasts Jump logic.

It is running, but I want to make sure I'm building the correct knowledge.

I've attached pictures of each of these.
Is this roughly a correct flow?

Thanks!

gentle pagoda
#

Please review this question this is important to me.

silent valley
#

Two questions about dedicated server hosting. Basically you can host a server on any cloud provider. Unreal doesn't care.

You make a server package from Unreal, copy the package to your cloud VM and run the executable.

At this point you can connect via IP address. Next problem is how to advertise the server to users, and how users can search for servers. This is where Online Subsystem comes in.

#

Sure

hollow eagle
#

github does not provide server hosting

silent valley
#

Probably fine, but sounds like you're a long way from that stage. Make a small game first! You can't rush games especially where networking is required.

valid imp
#

Hey there, I cannot find any doc about sending a potentially large amount of data from server to clients.
Use case is to send necessary information at logging.
Unreal does not seem to support TCP out of the box and I'd like to keep things compatible with Steam anyway.
I can always split data through RPCs "by hand", but I wonder if something is already done for that use case/is a known practice?

hollow eagle
#

I don't believe there's a good way to send large amounts of data like that built-in. That said, raw TCP and UDP sockets are supported, and as you mentioned you could just chunk the data and send it via RPCs. You might want to look at custom network serialization for your data - if your data is in a custom struct you can implement custom network serialization for it and it'll "just work" with an RPC. I'm not sure if/how unreal's network protocol chunks large packets but it's worth trying.

#

One note - if your data is a large amount of "something" in a TArray then you'll have issues without custom serialization - last I checked (which tbf was a while ago - this might have been fixed) TArray has some hard limits on how big it can be when replicated over the network.

nova wasp
#

Listen servers are an option, yeah

hollow eagle
# hollow eagle One note - if your data is a large amount of "something" in a TArray then you'll...

Some of my info is indeed outdated - there's some more info on tuning for large datasets here but RPCs still aren't ideal for it - https://forums.unrealengine.com/t/replicating-large-arrays-and-data-sets/265029

valid imp
pallid moat
#

Hi guys, does the FFastArraySerializer can't replicate MaxAvailableCount and GroupType etc ?

#

Does FFastArraySerializer only replicate FFastArraySerializerItem ?

odd iron
#

Hello guys what service can i use to make Android Joining with PC same session ??

#

Ive tried Playfab but their servers became very expensive

vagrant grail
#

Simple question : The Steam Advanced Session plugin is free, but does that mean you're forced to publish your game on steam to make it work, and pay the 30% that Steam asks for when you make a sell ? Or is it possible to use that plugin but even if you publish it on the Epic Game Store or use no game platform (like people need to go to your website to download it for instance) ?

Please ping me if any answer ๐Ÿ™‚

bitter oriole
#

No one wants to buy on EGS a game that requires Steam

vagrant grail
#

I'm confused by your answer ๐Ÿค”

bitter oriole
#

Which part ?

vagrant grail
#

So is it possible for instance to be able to buy the game from my own website but use steam to handle the invites between players and other stuff ? Or is it mendatory to publish my game in Steam to be able to use the Steam Advanced Plugins ?

#

And also will it work only on Pc or for consoles too ?

bitter oriole
#

It's not technically mandatory AFAIK but it's both supposed to be the case (and just not enforced by Valve) and every PC game is on Steam for obvious reasons

#

No, won't work on consoles or mobile

vagrant grail
#

Arigth then does an other plugin exist (an advanced session plugin) to be able to use those on consoles too ?

bitter oriole
#

Again, advanced sessions does not add Steam support

#

It's just easy Blueprint mode for existing engine features

vagrant grail
#

this part I don't understand it

bitter oriole
#

Unreal has builtin Steam support

vagrant grail
#

What do you mean by "add Steam support"

bitter oriole
#

AdvancedSessions is just five blueprint nodes that show up in Blueprint for people doing multiplayer games without C++

#

There's no need for it in C++

vagrant grail
#

So it's not linked to Steam by any mean

#

because the tutorial I'm following uses that and said it's for steam

bitter oriole
#

What you're really asking is whether the engine supports more matchmaking backends on PC, and it doesn't

#

There's a plugin that adds Epic Online Services, that does work on console, check with your console manufacturer for details

#

Won't be nice on Steam due to the double login though

vagrant grail
#

No what I'm asking is if I'm using that plugin am I forced to publish the game on steam so it handles some part of the multiplayer like linking the players between each other or can I use that plugin even if I don't publish on steam and also if it will work with consoles

#

so consoles you said no

#

but Epic Online Services aren't blueprint yet, if I'm not mistaken ?

bitter oriole
#

The plugin is very literally just the engine's generic session system exposed to Blueprint

#

That's it

#

It's not Steam related (works on NULL OSS, and should work on any online subsystem that's in the engine, plugin or built in)

#

If for some weird reason you don't sell your game on Steam, then no you shouldn't rely on Steam for matchmaking

vagrant grail
#

I'm still confused.
What I need is this :

  • Something to do the matchmaking : What I need is people being able to create a session and it shows in a list and other people could join (like Among Us for instance)
  • Be able to have it working on Consoles
  • Have Cross Platform (But this you explained that I need to talk with Sony and Microsoft) but do I need something specific to set up before starting doing the game or it could be done later ?
bitter oriole
#

As to EOS there's a plugin, no idea what it does since I ship on PC

#

Something to do the matchmaking : What I need is people being able to create a session and it shows in a list and other people could join (like Among Us for instance)
Either Steam, EOS, your own service
Be able to have it working on Consoles
Either EOS, the console service, your own service
Have Cross Platform
Ask Sony and Microsoft about it

vagrant grail
#

Thank you, it's clearer for me ๐Ÿ™‚
Now about EOS, is there any tutorial to follow to do that ? Because the video I'm following right now says that EOS aren't available yet as blueprints (so only C++)

bitter oriole
#

Personally my advice would be to make a PC game, on Steam, with advanced sessions - it doesn't sound like you have huge game development experience and maintaining a cross platform multiplayer game is just madness

#

That's a well documented path that's already quite difficult enough

vagrant grail
#

No I really need to be consoles too (maybe later and I don't want to redo my whole game to be adapted to consoles)

bitter oriole
#

You don't really need to

vagrant grail
#

yes I do

bitter oriole
#

You want Blueprint only cross platform console matchmaking

#

Respectfully I think you underestimate how hard this is

vagrant grail
#

Then at least no cross platform but being able to publish to consoles and consoles players could only play between each others

bitter oriole
#

Blueprint only multiplayer, Blueprint only console, are already two very suspicious things

#

As in they don't really work

#

Anyway, let me reiterate my advice : assuming no crossplay, there is no good reason to avoid Steam on PC

vagrant grail
#

the 30% cut off is a good reason to avoid Steam

bitter oriole
#

It's really not because in reality, no one wants a PC game that's not on Steam

#

Other than freak hits that have massive appeal

#

Anyway, you have EOS, Steam, and each console's online system to consider

#

Try them out and make your choices

vagrant grail
#

thank you

bitter oriole
#

For what it's worth I think we had about 1000x more sales on GOG and Steam than the almost-free itch.io

#

And it's somewhat documented that the 12% cut EGS also fails to seriously compete

vagrant grail
#

I'm more thinking of my own website to buy the game like how minecraft does

bitter oriole
#

With your own update system, payment processing ?

vagrant grail
#

payment processing will be handled by another service

bitter oriole
#

Payment processing + VAT is like 15% already

#

If we're being honest about numbers here

#

Though obviously Steam's 30% is also after VAT, but like, it's not going to be a zero cut operation anyway

#

Anyway, good luck

vagrant grail
#

of course but between 5 to 10% is a faircut, even more for indie devs. I could understand for big companies to be 30% but for small devs it's alot

bitter oriole
#

It's also completely pointless if the platform makes 20% more in sales

#

So I'd argue it's literally the opposite, your indie game can do 5 sales or 5,000

#

Your AAA game can make 10M or 20M

vagrant grail
#

Among us is the proof

bitter oriole
#

The average indie does like 500

#

Lots of them do 50

#

I'm 100% on board with Steam's cut bordering on extortion, but you can't act like indie games have extremely random sales outcomes

#

If you're completely convinced that Steam can't bring you 20% more lifetime sales than your website, good for you

dawn marten
#

can you think of a reason why gameInstance can't call BPI in playerState? i load my save game then try to set some values in the playerState but the call never happens no matter how i try with interface or getting playerstate then doing something with it etc. Whether I try directly like this

#

or with a BPI like this

#

ah because Game Instance exists before other stuff ๐Ÿ™ˆ

hexed thunder
#

What's a good design practice for updating actors randomly for server/clients, for example changing their material to a random one at the beginning of the game. Currently I am doinog a MC on beginplay from the server and trying to fix the issue where clients arent loaded in yet but overriding ready to start in gamemode. I do this for a lot of actors and I'm sure I could do some some sort of interface calls to update the actors once everyone is loaded but worried because then pretty much every actor i have i would have to add some sort of check if loaded logic on beginplay.

kindred widget
#

@hexed thunder State based things should always be replication. If you're worried about performance costs of replication then a replication graph or maybe the pushmodel stuff would help. But you cannot reliably do what replication does with RPCs without even more overhead.

hexed thunder
#

No but imagine I need to move an actor, that the server has moved it to a random location, you can't replicate move actor location

kindred widget
#

Why not? You can use Replicates movement, or set a replicated property with on OnRep.

hexed thunder
#

Yeah you can, but there are some things I have felt I have run into that that may not work, also how would OnRep work if Server changes variable but clients havent loaded in

kindred widget
#

The clients would received the replicated property once they've joined and that actor became relevent.

hexed thunder
#

True yeah I like your idea, do you think people generally do this sort of way?

#

I feel like this sort of problem has been solved thousands of times, but was having a hard time finding example/solutions for this problem

kindred widget
#

Usually. Replication is harder on the server than RPCs because it has to check for replication changes. But it mostly promises consistent state between client and server regardless of when client logs in.

hexed thunder
#

I wonder let's say you generally have like 2-8 properties per actor that the server is going to generate, it may be better to create a struct and just RepNotify from a struct per actor

kindred widget
#

Depends. Probably. Just don't forget to NetSerialize if you're using C++ and you're not always using all of those values. Will save quite a bit of data.

hexed thunder
#

so would this not be solved with readytostartmatch either? Ideally BeginPlay for server/client actors dont start until match is ready to start then this problem is solved much better right?

kindred widget
#

That depends. If you don't let clients reconnect, then you can solve it that way, sure. But even if you wait for match start, make sure all players are ready, and then one player DCs, and reconnects, he has to load the map again and will have none of that RPCed state.

hexed thunder
#

TRUE

#

Thanks @kindred widget for your insight

kindred widget
#

@hexed thunder Also one other consideration is to not replicate a ton of different states. If you can at all randomize these from one or a couple of values, you can place those someplace like GameState, and simply let all actors set themselves up locally from those replicated values.

#

That's more for setup though. Wouldn't handle runtime movement or anything. Can cut off a lot of data use though.

hexed thunder
#

Oh like maybe generate all these random values from GameState, Gamestate replicates this, then clients just reference gamestate when accessing that data or I guess i would repnotify from gamestate to update the clients object with that data

pearl fog
#

please please use Steam please

#

i'm so tired of games using their own launcher or relying on custom websites for no reason, Steam is great, manage alot for you, easy to use for your users, there's really no reason you should have your own website or launcher or anything unless your a big company with alot of franchise

#

or atleast use some popular indie websites like itch.io or other

vagrant grail
pearl fog
#

well anyway for consoles you're going to need to ship it to theirs stores

kindred widget
#

I don't think that it's either or. You can put a game on console stores and Steam.

pearl fog
#

yeah

#

PC version on Steam, console version on the appropriate console store

kindred widget
#

Your website could link to both. Website encouraged, but selling directly from it probably won't go well.

vagrant grail
#

But we were talking about the Steam Advanced Session plugin

pearl fog
#

steam advanced sessions is just a plugin to provide facilities for the steam api

#

to blueprints

vagrant grail
#

I need a system to be able to create a session and find sessions

kindred widget
#

You can also use multiple online subsystems for the same game.

pearl fog
#

but advanced sessions works with all online subsystems that is compatible with the session interface

#

advanced sessions != steam only

#

advanced sessions is shipped with two seperate plugins:

  • Advanced Session, the one providing you the advanced session nodes
  • Steam Advanced Sessions, the one providing some utils functions for Steam only
vagrant grail
#

But could I use both ? One for steam and one for consoles ?

pearl fog
#

you can use advanced sessions without problems as long as the online subsystem you use is compatible with the session system

vagrant grail
#

I'm going for the EOS

pearl fog
#

so for example when you enable the Steam OSS you're going to use the whole Steam online subsystem for sessions, etc
for console you could use Xbox's custom OSS/Sony's custom OSS (I don't really know how its implemented for console tho)

vagrant grail
#

I just need to read the documentation to set it up

hexed thunder
#

@vagrant grail is this your first game?

bitter oriole
pearl fog
#

yeah EOS could also work, but with Unreal's online subsystem system it's abstracted away so you don't need to manage all OSSs cases

vagrant grail
pearl fog
#

so you can make code that works on steam, xbox, ps4, switch, epic games launcher, etc

vagrant grail
hexed thunder
#

I wouldnt even try to thing about different platforms until u can make ur game work on 1 platform to be honest if it's your first game too, its nice and easy to say you can support cross platform but you'll most likely give up but if u focus on 1 platform u have a shot

#

in my opinion anyway

bitter oriole
#

You'd think that's common sense, right ?

vagrant grail
# hexed thunder I wouldnt even try to thing about different platforms until u can make ur game w...

Yeah my first goal is to have a game on pc first. But after finishing the pc version I won't publish it until I have consoles version because I don't want my game to be released on PC first then 1 year later on consoles. That's why I'm asking if I used one system or the other could impact development for consoles or cross platform later, like having to rebuilt all my game because I didn't choose the right system in the beginning

hexed thunder
#

Simple question do you want voice chat in your game?

vagrant grail
#

yes

kindred widget
#

Oof

hexed thunder
#

lol

vagrant grail
#

?

bitter oriole
#

I think literally everyone here agrees that this is a 50 person team's job

hexed thunder
#

Cross platform voice isn't solved very often, I think fortnite solved it? but i don't know who else

kindred widget
#

Well. Indie dev might get away with it, but voice chat in games recently became a nightmare.

vagrant grail
#

I want cross platform but it's not mendatory, like If I can't do it it's ok. But I need my game to be playable on consoles and pc (pc with pc players, and consoles with respective consoles players)

hexed thunder
#

So on the simple point of wanting voice chat in your game, focus on PC, you're gonna want features you won't be able to have cross platform

pearl fog
#

tried using UE4s builtin voice chat with Steam OSS, crashed with every server travel so I rage-quitted VoIP for now in UE x)

bitter oriole
#

As far as the business side goes, cross platform is paid, as far as public information goes; console take cuts similar to Steam, and voice chat legally requires text to speech and voice recognition

#

Just so you know

#

But everyone's been telling you this is a doomed project and you have yet to believe anyone here so ๐Ÿคท

hexed thunder
#

I got VOIP to work on seamless travel, definitely wasn't easy but not too bad

vagrant grail
#

EOS gives a chat system.
Yeah consoles take a huge cut like Steam but if I can avoid it on PC it's a benefit for me. Consoles there's no alternative so it doesn't matter

pearl fog
hexed thunder
#

Zino devaddict on youtube has a good video on it

kindred widget
#

At this point, Voice chat isn't even about getting it to work, it's all the extra stuff you need with it. Just isn't worth it for even an indie company. Make them use Discord.

pearl fog
#

oh, gonna check it out thanks!

bitter oriole
#

AND voice to text

#

Which is 50x harder

vagrant grail
vagrant grail
bitter oriole
#

Yes

#

Legally you need all of it

vagrant grail
#

show me the law please

kindred widget
#

Communications and Video Accessibility Act

bitter oriole
#

It's not exactly a secret

#

Next up you'll discover that game rating agencies have to okay your game on console

vagrant grail
#

so no way to solve this ?

bitter oriole
#

Sure, just call Nuance or whatever they go by these days

#

They'll give you a nice 5 digits price

kindred widget
#

There is vague information around it. Video games have managed to evade it for a while, but there have been issues with that lately since 2019. It does state "within reason", but that's a very vague term.

vagrant grail
#

Hold on as sec. Are you telling me for instance Among Us did something for people with disabilities as they have a voice chat in their game ? Or paid a 5 digit number to a company to do so ?

#

It's makes no sense to me

bitter oriole
#

No one said that

#

You should read up on this and get in touch with a lawyer

vagrant grail
#

I'm assuming that from what you said above

bitter oriole
#

Read up on it

vagrant grail
#

If Among Us didn't do it I don't see why I need to do it

#

I read it on wikipedia

bitter oriole
#

You know what, fine

vagrant grail
#

It's about doing that for people with disabilities

pearl fog
#

apparently x)

vagrant grail
#

proximity chat if you prefer

pearl fog
#

played among us like 2 weeks ago, no sign of voip so I don't quite understand what is going on here xD

bitter oriole
#

I don't think you're actually listening to anything said here, so I'm not going to lose any more time here

vagrant grail
#

When you're close to someone in game you can talk with him and when you're in the thing to vote you speak with people

#

oh wait maybe it's a mod

pearl fog
#

I think yeah ^^

vagrant grail
#

I need to check how they did it on consoles to see if there's a voice chat or not

#

Then I'm gonna just put a chat text you can type in and it shows above your head, is that ok ? Or there's another law about that ?

#

And also I don't understand then why would Epic have that in their EOS if people won't be able to use if they don't have enough money to pay the 5 digits to a company

#

yeah

#

yeah I'm not from the US anyway

#

yeah

blissful slate
kindred widget
#

@blissful slate Out of curiosity, why remake the system? I'm assuming you have a Character class. It already has both crouch and jump which are replicated states.

blissful slate
sinful marlin
#

Hehe stranger pepelaugh

tranquil yoke
#

Hey guys,
I have one weird issue , where i store the Transformation of each actor into a json structure and store in our database(server). Next time when i join the server i respawn the actors, but actors seems at different places when i join from windows client or Quest Client.

Can someone give me some idea what this can be about ?

pallid canyon
urban mason
#

Hey, I'm trying to do a Server build in UE5 but I'm getting the error: Server targets are not currently supported from this engine distribution.

#

I'm also getting this error: Microsoft.MakeFile.targets(45, 5): [MSB3073] The command ""C:\Program Files\Epic Games\UE_5.0EA\Engine\Build\BatchFiles\Build.bat" AzarServer Win64 Development -Project="C:\Users\Ehsan\Documents\Unreal Projects\Azar\Azar.uproject" -WaitMutex -FromMsBuild" exited with code 6.

#

could this be happening due to a version mismatch? My uproject folder's EngineAssociation is 5.0 (not early access) but the folder says UE5.0EA

#

oh really

#

how do you make a dedicated server then?

#

I think that's what I'm doing. I made a new build target called Server.Target.cs

#

but ok let me read more

#

ah

#

that's it

#

i guess the reason you compile it yourself from the engine's source code was confusing for me is because I do have the source code locally in my IDE and I am able to modify it

#

curious why pulling it from github would change anything about that

bitter oriole
#

Right now you have the source code, but the engine operates from binaries

#

You also don't have the full sources, just the engine itself

#

There's no way to modify prebuilt engines, has to go through actual source build

urban mason
#

interesting. thank you!

hexed thunder
#

Would anyone know why like let's say a child actor of another actor doesnt load in for clients on seamless travel? all actors seem to load fine but seamless travel some actors aren't loading in only for clients and theyre not being spawned, theyre part of level

pallid canyon
#

is that just cuz child actor components are super buggy?

#

or something specific to server travel

urban mason
#

difference between the branch 5.0 and the branch ue5-main?

#

is the latter less stable/more features?

bitter oriole
#

ue5 main is pure dev stuff

#

5.0 is a relatively stable branch

urban mason
#

hahaha

hexed thunder
#

Why are child actors more buggy?

bitter oriole
#

Actors are not supposed to be attached that way and the result is fundamentally broken

hexed thunder
#

I see ok thanks

#

Is there a better way to handle a need then of like a blueprint that places mul;tiple blueprints for u in a level?

#

A vehicle for example could have different components you want to be interactable, so it would seem logical to create child actors for interactable components, but then if theyre buggy i would have to put like 4 blueprints in the level each time instead of 1, which isnt too bad

urban mason
#

I would just call SpawnActorFromClass from the blueprint of the vehicle, and make it so that the classes of actors you're spawning have replicated set to true

#

if you want them to be physically attached you can attach them at a socket or bone

#

but they dont have to be in the same object hierarchy

hexed thunder
#

true that would be interesting

#

The server only needs to do that or just allow everyone to do it by default,

urban mason
#

if you want the vehicle to be able to reference all of the shit it spawned, you can put references on an array on the vehicle

#

if you do it that way, you spawn everything from server and set all actors to replicated: true. if you do that you wont have to deal with custom RPCs

hexed thunder
#

Ok and since you set it to replicated to true, even if client hadnt been loaded in when u spawned or reconnected, it would replicate that actor to client joining back?

urban mason
#

yeah

#

that would be a problem if you spawned the actor via a multicast RPC or if you spawned it just on a client

toxic lion
#

Is there any way to override a OnRep function in a child class?

hexed thunder
#

you could make the parent OnRep function call another function/event that you create OnRepOverridable and override it in child class

toxic lion
#

rooThink1
sounds a bit hacky, but I'm up for it

hexed thunder
#

lol hey if you know a better way go for it

toxic lion
#

nope nope. lol

kindred widget
#

@toxic lionI don't think there is in BP. In C++, you just mark the implementation virtual.

toxic lion
toxic lion
pallid canyon
#

Is there something similar to set controlRotation for set location?

#

or is that done strictly by add movement input and the like

kindred widget
#

To set a specific location it needs to be set on the server and client. You can do this with an OnRep or ReplicatesMovement setting. Normally movement components are used for pawns since they move so frequently.

pallid canyon
#

yeah, my context is a slight bit different, I have to figure out how to update a mesh location based on where a players HMD is at without using setRelative on the mesh

#

and there's no actual controllers in use, just an HMD

kindred widget
#

And this needs to be shown on all instances of the pawn?

pallid canyon
#

yeah :/

#

well

#

maybe not, that's food for thought

#

I think definitely for local client plus server

royal vault
#

Hi I have an Server RPC that takes in a weapon array and changes the weapon array (replicated) stored in a chest.
~ UFUNCTION(BlueprintCallable, Reliable, Server) void Server_ChangeWeapons(const TArray<TSubclassOf<ASWeapon>>& NewWeapons); void Server_ChangeWeapons_Implementation(const TArray<TSubclassOf<ASWeapon>>& NewWeapons);

void ASChest::Server_ChangeWeapons_Implementation(const TArray<TSubclassOf<ASWeapon>>& NewWeapons) { CurrentWeapons = NewWeapons; }

Unfortunately only the server can seem to make changes using this blueprint code.

Here prints the array of weapons im going to set the object with, and it prints the correct weapons. However if i print the weapons stored in the chest after setting it with the rpc above it prints wrong items. So clearly the RPC is failing and only working from the server. So my problem is that the client cant seem to change anything in the chest using a server RPC. Any ideas?

kindred widget
#

@pallid canyon This sounds like a client authoritive thing given it's from client's input. I'd start by making a replicated variable. Mark it Skip Owner. Do your stuff locally so that the local player sees it correctly.

For other clients.
Make an unreliable ServerRPC that sends the relative location to the server. Send the current location that you need through, set it on the server and also set the location here(for listenservers), then also in an OnRep for this, you'll set the item's location there for all non owning clients.

#

Doing that will give you a snappy, jittery version. Add some interpolation to currently server set state and it should look okay.

pallid canyon
#

so the problem with relative location is that I'm setting the actor rotation based on HMD rotation through Controller->SetControlRotation, so my HMD relative location is offset from actor zero and then rotated about that actor zero

kindred widget
#

@royal vault Does the client making that RPC call actually own that chest? If not then you can't have that chest RPC from that client.

pallid canyon
#

unless you're saying actor relative location, I fear will have the same problem though

royal vault
kindred widget
#

Actor ownership. By default clients own three actors. PlayerState, Their possessed Pawn, and those two object's Owner, the PlayerController.

royal vault
#

o then i guess not

#

the chest is placed in world

kindred widget
#

If that chest is not set(On the server) to be owned by the PlayerController, or something owned by the PlayerController, then it cannot ServerRPC

royal vault
#

so the chest needs to be a pawn?

kindred widget
#

Can all players affect this chest?

pallid canyon
royal vault
#

if i removed all replication then yes everything is stored correctly

#

it just doesnt replicate to the other players

pallid canyon
#

cuz then you dont have to trust clients not to cheat

royal vault
#

i did a server rpc that ran a multicast

kindred widget
#

If the chest needs to be used by all players, you need to send the RPC through one of the other actors that the client owns.

royal vault
#

wait im wondering something

#

(const TArray<TSubclassOf<ASWeapon>>& NewWeapons)

#

does the const

#

mean i cant pass anything through?

kindred widget
#

No effect change.

#

This is literally nothing more than an RPC issue.

#

ServerRPC invoked from a Client on a Server or Unonwned actor. It's dropped.

royal vault
#

ohhh

royal vault
kindred widget
#

Or controller, or PlayerState, yeah. You could even make this something as vague as an interface call. Get the local player's controller, and call a ServerRPC that takes a UObject* and TArray<TSubclassOf<UObject>> as parameters. Have an Interface function implemented in the chest that you could call on the UObject* and pass the array through it.

#

Only necessary if you plan to pass class arrays to other things through maybe. Just depends.

hexed thunder
#

Conceptual question, so I have physics actors in my levels that I replicate movement on so out of 100 actors in the level, there may be 10 that are replicating movement and have physics enabled, so clients/servers interacting with them all see the current movement state and 99% of the time there isn't a desync issue when I have the net priority above 1.0 (currently 1.2). When I had it at 1.0 it was common for some of these physics objects to get desynced for clients and server. Why would priority fix a desync issue or appear to fix it? Is it because net priority. It does say higher value means it means more likely to replicate. So is this just making it more likely to keep replicating movement for everyone so there is never that desync issue, on top of this is there a better way to handle desynciing? I would imagine unreal engine would have some timer base ability to just grab certain actors on an interval and make sure their location is the same as the server for clients? just ttrying to get my head around this topic a bit more.

pallid canyon
#

when I could have

#

just made the mesh relative to world

#

...

gaunt cliff
#

when you set a variable in a player's state via a server call, then try to get the same variable from the playerstate in the client, its not the same

#

is that intentional or am I misunderstanding networking RPC

#

I thought everything in playerstate is replicated, meaning however I set it its the same

kindred widget
#

@gaunt cliff Assuming that your property you set is a replicated property. If you're sending a ServerRPC and then checking the value on the client in the same execution it won't be the same. Client will still have whatever they had before until the server can replicate it back.

#

This is why you need OnRep functions. You RPC to server, tell server to set the property, and then wait for it to replicate back which will call the OnRep function when the property arrives on any client

gaunt cliff
#

wait, do I need to specifically set the variable as UPROPERTY(Transient, Replicated) ?

kindred widget
#

At least Replicated, yes. ReplicatedUsing=FunctioName if you want an OnRep to run.

#

Transient won't matter for networking I don't believe.

gaunt cliff
#

oh I thought all variables are replicated by default

#

on playerstate

kindred widget
#

The only things that will replicate are properties marked Replicated inside of a Replicated Actor, or Replicated Component that is part of a ReplicatedActor.

gaunt cliff
#

noted

#

yup that was the issue

#

thanks

rocky kestrel
#

We are creating openworld survival game and its replicated to work in editor. Now we would want to make it work server so somebody can host server and others join. That for testing and later buy cloud hosted servers maybe. How would we start making that dedicated server? Any good tutorials?

#

Same style like in Rust or WoW

twin juniper
#

Player controller ID is not accessible on other clients right?

#

other than the client with the ID in question

pearl fog
#

no, player controllers exist only on server & owning client

twin juniper
#

what about bisplayercontrolled

meager spade
#

that is only available on server and the owning client

#

if there is no controller, then its a remote player

twin juniper
#

thank you

meager spade
#

i wouldnt use the Get Player Controller with id stuff in a multiplayer game

twin juniper
#

Well I managed to uniquely identify PCs elsewhere in my project. But I used a different setup here so I should look over what I did elsewhere. I broke my brain for today got nothing done even with 12 hours grind ๐Ÿ˜ฆ

#

I used controller Id pair from game state or something like that. To give different players different colours

kindred widget
#

Random fun fact. GetGameInstance->GetFirstLocalPlayerController() is about 48% faster than UGameplayStatics::GetPlayerController(this, 0). It also is not prone to listenserver explosions.

solemn prairie
#

If I had a multiplayer game where 4 people matchmake to find a game, or where you can create rooms with friends, or queue with a party (2 in party so find 2 more players or another party of 2), I would probably look into having a dedicated server run on a service like AWS. They say they have a "multi-location fleet", so if 4 players were matchmaking from 4 different regions, AWS would handle finding the best server between these people? Or would it always default to whatever location I have my EC2 instance set?

#

Well it's not like it would be running off just that ec2 instance, still trying to wrap my head around how their gravaton instances and gamelift service works

urban mason
#

@twin juniper i built the engine from source. whats the cleanest way to replace the binary build copy with my newly downloaded engine?

#

fuuk

#

what the best way to do that

#

i right clicked it and a menu came up

#

nothing happened

#

haha.

#

they're both on 5 tho

#

i see

#

it

#

so it seems to be working

#

build times are outragous

#

is this my new life?

#

also should i be checking in the entire engine into source control or how will this change propogate to everyone else?

#

i dont mean build artifacts

#

i mean if i make changes to the source

#

which i dont exactly plan to do but now that i'm building from source i can

dense sundial
#

So, I just want to make sure I'm not missing an important replication detail with a hypothetical scenario. I have an actor who holds a cupcake (like in the content examples) and I want, when a key is pressed, for him to toggle the visibility of his cupcake. Which works just fine as shown below:

#

But in this case here, where the actor only ever sets his cupcake to hidden once:

#

Is there really no way to achieve the same functionality (making the cupcake hidden in a replicated manner that is still safe for when players join after the start of the game) without the use of the rep notify variable? I ask this because in this example the variable serves no meaningful purpose other than to be a rep notify. Thanks in advance :)

kindred widget
#

There's no other good way to handle that if it's state based.

#

Replication is the main consideration which is mostly for the Server's CPU use. On a side note, if you make the component replicate instead, Visibility is already a replicated state.

dense sundial
pallid moat
#

How to replicate TestInt or test in FFastArraySerializer?

#

It seems that FFastArraySerializer only replciate Items

kindred widget
#

@pallid moatI'm not sure you can. Items is the only thing replicated I believe. If you needed that, you'd probably have to replicate them on the Actor itself, and then OnRep, set that property in the FastArray struct.

pallid moat
peak sentinel
#
if(bSomeBoolSetInConstructor)
    {
        DOREPLIFETIME();
    }
#

Is it safe to do something like this?

kindred widget
#

I'm not sure about that specifically, but I have at least changed replication types in the same manner.

peak sentinel
#

Replication types? You mean conditions?

hollow eagle
#

mmm yeah, so GetLifetimeReplicatedProps is called on the CDO so it'd work fine for a specific type but not if you changed it per-instance. Per-instance changes would need to be done via conditional property replication.

#

This doesn't seem useful at all though - there's already a way to modify replication conditions in subclasses.

peak sentinel
#

I want to disable a replicated property completely based on a condition

hollow eagle
#

yes

#

RESET_REPLIFETIME and RESET_REPLIFETIME_CONDITION macros let subclasses override parent classes replication conditions.

#

used in the same way as DOREPLIFETIME and DOREPLIFETIME_CONDITION

#

if you need per-instance replication conditions or changes to an instance over time then you need custom replication conditions which are mentioned in the link i posted earlier.

kindred widget
#

There's also a macro to disable a replicated property as well in a subclass.

hollow eagle
#

RESET_REPLIFETIME should do that

kindred widget
#

I thought that enabled a disabled one?

hollow eagle
#

DISABLE_REPLIFETIME, sorry

#

RESET_REPLIFETIME just sets the condition to COND_None

kindred widget
#

The two I know are these.
DISABLE_REPLICATED_PROPERTY
DISABLE_REPLICATED_PRIVATE_PROPERTY

peak sentinel
#

๐Ÿฅณ

hollow eagle
#

err yea, those

peak sentinel
#

Thanks for the infos

twin juniper
#

Hi, if i spawn a replicated actor from client, i will be able to destroy it from client ? ๐Ÿค”

#

it's actually just to do a fake projectile for fx and debugging

kindred widget
#

Any actor spawned on a client is local only and will have zero networking capability as if it wasn't replicated at all.

twin juniper
#

thats what i was thinking ๐Ÿ˜„ just wanna be sure thx !

smoky crag
#

Quick question, where is the best place to put game end logic, in game mode? I have some logic that, first wave enemies all died the second wave will appear, or 60 seconds later the second wave comes, and the end logic is that if all enemies are all died. Where should I put those code into?

kindred widget
#

Game processing logic should go in GameMode and use GameState to relay anything it needs to to clients.

smoky crag
kindred widget
#

Correct. GameState is GameMode's way of replicating stuff so that it doesn't have to exist on clients itself.

#

Of course you can put anything on GameState that is game wide related, but it's original idea was as a replicated state actor separate of GameMode.

gleaming kite
#

If I wanted to switch the serverโ€™s map through an in game widget (dedicated server), could I just put the server travel function in the game mode with a has authority check and cast to the game mode and call the function as the client?
Asking here to see if Iโ€™m missing something because I couldnโ€™t find a clear answer online.

hollow eagle
gleaming kite
#

Whatโ€™s the way people normally do it

hollow eagle
#

You can't server travel from a client. You would need to put a server RPC on something that's replicated and owned by the client... which is generally going to be the player controller.

gleaming kite
#

Gotcha thanks

twin juniper
#

hello guys

#

i am new to aws need tutorial for setting AWS using c++

#

can any one help me?

still coral
#

Hey everyone ๐Ÿ‘‹ I did a post on #online-subsystems a couple days ago, but since I had no answers I decided to repost here ๐Ÿ˜…

#

I'm trying to get my game to work with the Steam Subsystem and I can't seem to connect a client to a listen server.
Looking at the logs, it seems like the client is connecting to the Listen Server and immediately disconnecting?
I did a post here: https://forums.unrealengine.com/t/client-immediately-disconnecting-when-joining-game/269596
Any help is appreciated โค๏ธ

waxen stone
#

Hi guys, how can I make a variable be global in multiplayer that whenever I increment that variable in client1, it will be seen in client2. And if I increment in client2, it will increment from the last value (if client1 is last who incremented then it will continue from there). I'm using Blueprints so I need some guidance considering this as well.

kindred widget
#

@waxen stone Data only goes from one client to the server. Only the server can send data to all clients. Two clients can never under and circumstances send data between each other. A client has zero ability to do anything other than a ServerRPC, Replicating is a one way street from Server to Client.

Having said all of that, to allow two players to increment the same variable you'll need to start with an RPC in the PlayerController. Since this is just incrementing, you just need an RPC, no parameters. You call this from the client's instance of the controller, after the RPC you GetGameState, cast that to your custom game state. Inside of you custom game state, create an event. Have the controller call that event from the ServerRPC after the cast. After that you can create your property, mark it as Replicated or Rep With Notify. Have the function you just created in game state set this variable in GameState to itself +1 or whatever you want it to increment by. That value will replicate back to both clients and if you made it RepWithNotify it'll call that OnRep function which you can then do something with the new value on the clients.

proud gust
#

Hello ๐Ÿ™‚ When i make a HUD/Widget(like Healthbar,Inventory,...) where should i put this. Should it be in the PlayerController,Character,...... Whats best practice. I make it in C++ and with a Dedicated Server. Ty ๐Ÿ™‚

bitter oriole
#

Use the existing HUD class

kindred widget
#

Also as a reminder. All UI is client specific and has no tie in with networking. Relies on local values only.

bitter oriole
#

So essentially, assuming the counter is in game state for example, you need to have such an event on the player controller, that then increments the value on server

#

Clients then get told the new (replicated) value on game state

red lark
#

hey does anyone know why when I call TakeDamage() and pass that into a client it doesn't actually take damage? I called it from a client btw

bitter oriole
#

Client to client is not a thing

red lark
#

oh

#

I did it a bit like this

#

for the TakeDamage() function

waxen stone
# kindred widget <@!619779762998738964> Data only goes from one client to the server. Only the se...

Thanks so much for this answer. Makes sense. I will research on how to use RPCs and GameState as I am so new to unreal, but I'm a long-time programmer of various languages so I hope I can get this part that you have mentioned easily with a bit of research. Just to be specific, I just cited a simple example of incrementation but what I really need to do is update an integer64 variable and more variables eventually. It like this: The first player enters a room, triggers an overlap and becomes the host of the room. I store that variable in that invisible room block that triggers a blueprint and updates that variable. Now if a second player goes in that room, triggers the overlap, it won't do anything because that variable already has a value that was triggered by the first player.

waxen stone
waxen stone
kindred widget
#

No idea. I've never personally used any non UE4 default networking.

vernal cobalt
#

hi, would anyone know why my fast tarray contains invalid data within the fast tarray items when replicating it to the clients?

verbal tendon
rich locust
#

from the database server

verbal tendon
waxen stone
#

But this is of course a workaround because I don't know how use RPCs and GameStates yet... Can anyone point me to a specific tutorial using RPC and GameState to have a global variable update across all clients? Though a guide was already stated by @kindred widget tyvm

vernal cobalt
red lark
#

hey everyone

#

my TakeDamage() code isn't replicating to multiplayer, and I tried UFUNCTION(Server, Reliable) but sending back unresolved externals

#

here's my code ๐Ÿ™‚

#

Character take damage stuff

meager fable
#

Is it possible to pick a map that the client is sent to after session is interrupted? Currently when the server crashes the client is getting sent to the game startup map, I want to change it to my lobby map

bitter oriole
#

Game instance can override it IIRC

red lark
#

guess no one saw my post ๐Ÿ˜ฆ

silent valley
meager fable
harsh dock
#

Hello a very small question, if i call from the server a function that live on gamestate, then that function is automatically replicated to all client?

#

and if it's true, if this function modify an actor implemented as text render on the level (like a counter) then i should put only the variable used for the count set to replicated?

#

and put the actor to replicated?

silent valley
#

if it's a counter (score etc) then mark the GameState variable as Replicated, Set the value on the server only, and it will automatically replicate to all clients.
Each client can then either query the value, or you could setup an OnRep to notify the UI when the value changes.
No need to mark any actor as replicated for this.

harsh dock
#

anyway thanks for the answer dude

bitter oriole
#

Other than that, engine change it is

#

Consider making the lobby map your default map, since lobby & main menu make sense as a common level

#

Alternatively make the default map a completely empty one that redirects to whatever you want

meager fable
#

hmm will try to open my lobby map on travel error as it is too late to split the maps at this point in development

#

thanks

silent valley
#

Does anyone know where to find the default NetSerialize function? The one that is called to serialize USTRUCTS if they don't use custom?

pearl fog
#

Hey guys! Is there some cases where after a ServerTravel the GameState is just unavailable on the clients?

#

it happends sometimes not everytime ๐Ÿค”

pearl fog
#

okay so I investigated a bit it seems that it is indeed replicated correctly but for some reasons GetWorld()->GetGameState() returns an invalid object

#

(everytime, not only in the first few frames after the server travel)

thin stratus
#

Is it a seamless travel?

#

GameState gets swapped out from transition to final map I think

#

:<

pearl fog
#

Yeah it is

#

mmmh

oak elm
#

If I call SpawnActorDeferred() on the server, are any properties that I set on this actor replicated to the actor spawned on the client? (Even if the properties aren't marked as replicated).

stable patrol
#

so, i'm trying to replicate an actor being spawn on a server. spawning the fake one on the client, then setting the location on the server. even setting the variable to replicate and then running the new actor to spawn thru playercontroller the variable doesn't update it always stays at 0.0.0.0 but on the client side it set itself to correct llocation.

twin juniper
thin stratus
#

I know it only survives one of the two travels

#

At least afairemeber

twin juniper
#

yeah i read an old conversation from u about that

stable patrol
twin juniper
#

but so if the seamless travel doesn't keep it.. gamemode don't even re-create the gamestate ?

thin stratus
#

And only the ones that exist on the client

#

E.g if it's a pointer to a replicated actor

#

And that actor isn't replicated yet

#

It might be null

oak elm
#

Great, thanks.

thin stratus
#

Even the picture doesn't help me understanding what you are trying to do

#

Could you rephrase it

stable patrol
#

So, i am trying to make it where i can simply spawn an actor on the client at a specific location and then send that location to the server to have it spawn on the server and then to the other clients if there is any but it only 2 player game.

#

so, 1 player take a turn and spawns an item. that item get sent to the server so second player can see. then after tht turn 2nd player can set an item and send it to the 1st player.

#

so something like chess or checkers

#

right now only the listen server has ability to place actors that the client can see but i cant seem to fake the client placing an actor till the server update it location

dark edge
#

Just send from client to server
"Please spawn this actor"

Then the sever spawns the replicated actor.

stable patrol
#

there no prediction in the game i was just using it to explain the situation. it not setting the correct location it always setting the location as 0.0.0.0

dark edge
#

Show your run on server event

stable patrol
#

it a bove.

#

i probably screwed that all up

dark edge
#

Send the transform in the run in server event.

#

Replicated variables are ONLY set on server. It looks like you're trying to replicate that transform from client.

#

Back up even more, what exactly are you trying to do? What is the actor you're spawning.

stable patrol
#

it just a basic static mesh nothing fancy that in a blueprint set to replicate. everything spawn on the server to client correctly just not the other way around

dark edge
#

There is no "other way around"

#

Just add the transform to your run on server event

#

So client can tell the server what transform it wants for the spawn.

#

The only communication from client to server is Run On Sever Event.

stable patrol
#

so, when i c lick on the client window from the line trace to spawn that actor at that location just do a run on server at the end.

pearl fog
#

i really don't understand

royal vault
#

whats the proper way to leave a session?

proven kayak
royal vault
proven kayak
#

It can be called from anywhere. I call it from a subsystem, but the player controller or the game instance is also common

fading birch
#

I use a game instance subsystem for that.

#

I just call it when you join the main menu level

#

as you shouldn't be in a session at that point

toxic lion
#

Seems I can't modify a rep notify variable in an interface
is the best bet just to create an event to do so instead?

#

Update: Can't call an event from an interface as I still get an error

pastel escarp
#

a bit of a general question, assume I have 3 players (1 Host and 2 client ) , I want each client before they join the server to specifiy their health point before joining, how can this be done ?

#

Host 100HP
client 1 , 50HP
Client 2, 200 HP

pastel escarp
#

Another example would be a car game where the client choses his own car to join the race with

jagged spade
#

One way of doing it might be to store specified health value on player controller

autumn prairie
#

I thought this was free? In order to get fully set up, you will need to pay a $100.00 fee for each product you wish to distribute on Steam (the "Steam Direct Fee"). You can pay this fee with any payment method supported by Steam in your region, except methods that use the Steam Wallet.

kindred widget
#

@pastel escarp As far as I know generally only two things survive joining a server as you have to OpenLevel to it. GameInstance and SaveGames. If you want client to have authority over how much health they're supposed to have before joining a game, then you need a system in place that can store that value in either GameInstance, GameInstanceSubsystems, or SaveGames of some kind. Then once client is loaded in, they can read from that value locally, and RPC it to server to have server set up their actual authoritive health.

#

@autumn prairieFree to develop on. Costs $100 to start selling a game for paperwork fees.

pastel escarp
autumn prairie
#

To get a product ID and page it cost 100?

#

ahhh

#

ex SteamDevAppId=480

kindred widget
#

Not directly. Server can access a client through a client owned actor. That's PlayerController, PlayerState, and PlayerPawn to start with in normal framework. Server would have to ClientRPC the client, and ask Client to ServerRPC back a value from their GameInstance.

pastel escarp
#

Hmmm, Ok thanks , that explains it a bit more , I will give it a try and let you know

toxic lion
#

I'm tryingto get UI to display a message whenever something notable happens on the server
I'm trying to decouple as much as possible to avoid
what's the standard approach to having the UI listen to an event without tightly coupling it to an object/actor?

#

basically, a global replicated event

kindred widget
#

@toxic lion There are multiple ways to handle this. Are you looking for something more like a popup that requires and OK, a simple message showing in the center of screen for a few seconds, or more like a chat log message?

toxic lion
kindred widget
#

I would use something akin to FName or GameplayTags for two major reasons. They both compress WAY down for networking, and they're both fantastic for data lookup. The lookup adds an extra layer, but it's necessary if you ever want to consider localization.

#

As for where to put it, GameState is the first obvious choice. If you really want to abstract it out, you could put it in a Component that can go on the GameState.

#

Could probably be it's own module as a component/widget. Drop it on your GameState and use a static function call to access it and broadcast.

fluid summit
#

Hi! i'm having some troubles moving a third person character (default) to some random location.

I'm spawning the third person character, than going to my controller and posessing that pawn, than using "simple move to location"
Am i missing something?

kindred widget
#

@fluid summit Nav mesh?

fluid summit
#

nav mesh is outside of the place i'm trying to move -.-" maybe it's that, going to check.

kindred widget
#

Also, cache that random or you'll get two different randoms, unless that's intentional.

fluid summit
#

it's intentional, just to test if i can move it on multiplayer

kindred widget
#

Ah. Yeah. Two different pawns.

toxic lion
fluid summit
# kindred widget Ah. Yeah. Two different pawns.

it was the navmesh, thanks!.

Now i'm trying to move the character without using the player controller, the "posses" mess up my camera setup and turns into a "first person" on that character and it's awfull

kindred widget
fluid summit
#

got it working as intenteded, need to spawn a new AiController for each new character and use that new controller to posses it, after that i can move N number of characters at the same time on the network.
Thanks for the help!

toxic lion
kindred widget
#

It's partially for that. The major reason is localization. If you have multiple nationalities playing the game in their own language, they can all see the message in their own language from the same key.

toxic lion
#

Didn't even cross my mind to take that into account

kindred widget
#

My day job. ๐Ÿ˜„ I didn't either until a year ago.

toxic lion
#

never thought about how I was gonna handle localization.
good to know. I'll have to start with that in mind so I don't screw myself over with hard coded strings

#

Thanks again!

flat pendant
#

On a listen server, I have 2 player clients and my PlayerController fires the BeginPlay event 3 total times. Once for each client, plus once for the server. When the event is called, I want to check if the controlled pawn Is Locally Controlled or not, as I believe that's the easiest way to determine if the client owns it or not. However, for some reason, Get Controlled Pawn seems to be null in BeginPlay for 1 of the 3 total controllers. Why is this? Is it safe to assume that the controlled pawn who is null at the time of BeginPlay is the listen server's 2nd controller?

#

I also don't understand why GetPlayerName in PlayerState becomes blank for the listen server after a client other than itself connects.

#

eh I think i'm rambling, probably poor design choices led me here. gotta take a look again tomorrow

lunar spindle
#

You can override APlayerController:OnPossess and APlayerController::OnUnPossess (If you need to handle the unpossess case) to probably do what you're looking to do

flat pendant
lunar spindle
lunar spindle
flat pendant
lunar spindle
#

What end result are you looking to achieve? Might be a different way to accomplish it if that doesn't work

flat pendant
#

I'm not doing anything really important.. just setting variables that exist on the character-casted-pawn rather than having to fetch and cast every single time. Because those variables differ per-character, I would need to re-set them any time a new character is possessed.

kindred widget
#

There is no BP only way to detect possession on clients. If you require that you're looking at a tick or timer function that calls something else when values change with a cached value for checking against.

flat pendant
#

Hmm sounds like I may not want to do this then if it's not already designed for it

lunar spindle
flat pendant
#

Hmm I will take a look at that

lunar spindle
kindred widget
#

Oh. That is a fair point. That is the strangest place for that. O.o I wonder why GameInstance.

flat pendant
#

Okay i'll try the game instance way and if that doesn't work or seems too weird, i'll just use a few more nodes for my functions instead of having those variables.

#

I am new to networking but it doesn't really make sense to me to have the server replicate components as variables just for the sake of saving like 2 nodes of space per function.

#

Thanks for the help !

naive oar
#

Was UE multtiplayer support added somewhat recently? Or has it been around awhile?

kindred widget
#

@naive oar What do you mean by multiplayer support? If you mean general networking, that's been a thing for a very long time. Over 20 years or so.

naive oar
#

Huh... Cool

hollow eagle
#

as it applies to UE4 it's been there day 1.

kindred widget
#

Yeah. Older versions of the engine it's been there since at least 1999. Probably longer.

gleaming kite
#

It would be best to store if players are ready to start the game or not in the gamestate right?

rich locust
#

depends if you want to make the other players aware of it

#

but yeah I think so too

#

or you can store it in playerstates

#

and then access it via playerarray

gleaming kite
#

Ah ill just use playstates then, thank you!

#

can you access the player array in gamemode?

rich locust
#

I mean

#

gamestate exists on server as well

#

just get the gamestate from GM

gleaming kite
#

Great thanks

valid imp
#

I'm getting a LogNetPackageMap: Warning: FNetGUIDCache::SupportsObject: BP_MyClass_C /Game/MyAsset.MyAsset NOT Supported. error as I'm trying to multicast a parameter which is an asset (made from a custom class that derivates from UObject).
What are my options? If it's a matter of implementing something to serialize some reference I'm okay with that, but I don't know where to start.

meager spade
#

it needs to be replicated

#

check the pins for replicating uobjects

#

will also need to follow normal UObject replication.

valid imp
# meager spade https://www.thegames.dev/?p=45

Mmm, it's a Blueprint Custom Event set as "Run to Server" in an Actor Component but I call it from a Character (which owns said component).
The event is compiled down to an RPC, but is it still concerned by this article if I'm calling it from an Actor?

meager spade
#

what is MyAsset?

#

its saying MyAsset does not support networking

valid imp
# meager spade its saying MyAsset does not support networking

It's an uasset made from a custom UObject class which is hanging inside my Content directory. It's static, it has some material & constants but it never changes.
It's not "owned" by an actor or anything. It's like some Material. I just need to send to the server "please tell everyone to use this", which then multicasts to clients "everyone use this!". I wish some id or even the path could be transmitted to identify it.

valid imp
#

I think I found my solution: I'll send the Primary Asset Id instead.
But thanks for the resources, I think it'll be soon useful for me

finite goblet
#

if a replicated actor A is referenced as a replicated UPROPERTY with notify in some other persistent actor B, would on rep be called for that UPROPERTY at the instant the actor A is replicated ?

chrome bay
#

yes

tame trail
#

is it worth it to implement multiplayer into a singleplayer game that is like almost done? or should I restart with multiplayer in mind

#

i'm not sure how hard it would be because the game is already made and designed for singleplayer

bitter oriole
tame trail
#

damn

bitter oriole
#

Hard to say anything without knowing the game though

tame trail
#

yeah that's true

valid imp
#

In this minimal example that I put on an Actor, I expected "MULTICAST BY SERVER" to be printed by Server and Clients. It is only printed by the server:
Any lead on how this can be? What is the logic?

kindred widget
#

@valid imp Not replicated.

valid imp
kindred widget
#

Do you see the "I'm Client!"?

valid imp
#

Yes.

kindred widget
#

Ah. May be replicated fine. Likely relevance. Try checking Always Relevant.

valid imp
kindred widget
#

I don't remember the specifics off hand, but it's likely your actor has no mesh or shape object. Just having a SceneComponent root won't allow it to be relevant.

valid imp
#

Indeed, I am using it as some kind of invisible singleton handling stuff.
By the way, while my Actor replicates in this case, would have it mattered here? Actor's "Replicates" field is only about variable values (and components) no?

kindred widget
#

If you read C++ AActor::IsNetRelevantFor is a good place to start.

#

And it would matter. It has to replicate to clients to send RPCs as well.

valid imp
#

That means I'm wasting a bit of bandwidth replicating variables I only use for server-side computation, too bad.

kindred widget
#

Also there's always AInfo class. It's more or less an Actor class that requires actor stuff like replication but has no SceneComponents, can still hold ActorComponents though. GameState is a good example of an AInfo class.

valid imp
#

Interesting, never heard of that class. I wonder if it can send RPCs (which are done by opening ActorChannel no?).

kindred widget
#

It can. GameState is based off of it, which is what GameMode uses to replicate and RPC to clients largely.

valid imp
#

Awesome. Thanks a lot, you saved my day.

pearl fog
#

So for those who may encounter the problem one day, it is caused by the fact that I didn't specify a transition map (I let unreal manage it because it was said in the documentation that Unreal creates one by default)

lament cloak
#

Does anyone know if FastArraySerializer works with nesting? Say I have a struct with several FFastArraySerializers in it, and then just replicate that single struct as a property

chrome bay
#

It doesn't

#

It only works when it's a base property of an actor/component. Even when embedded in another struct it doesn't work properly.

lament cloak
#

I don't have have access to UDN but I'll take your word for it

chrome bay
#

What might work is implementing NetDeltaSerialize on the parent struct, then internally calling it on all the embedded structs.

#

Not tried that though

#

Oh actually, probably won't work.. thinking about how it creates the base compare state

lament cloak
#

yeah it's not the end of the world. We were just hoping we could define our entire level in a struct with all it's nested data, mostly an organizational thing. Fine to replicate each property separately

lament cloak
#

In NetSerializer.h I see this:

    static constexpr int32 MAX_NUM_CHANGED = 2048;
    static constexpr int32 MAX_NUM_DELETED = 2048;

Does that mean the array can't be any larger than 2048? Or you can only mark 2048 items as dirty at a time?

chrome bay
#

It'll only replicate that many changes/deletions in one bunch IIRC

#

you can have more than 2048 if you wanted

lament cloak
#

Interesting, and is that because TArray without FastArraySerializer can only replicate up to 2048?

#

Or am I just finding BS when googling max size for TArray

#

nvm I see MaxRepArraySize now

#

Okay, I see why this is a thing, max packet size.... makes sense now

lament cloak
#

Does anyone here know if FastArraySerializers handle chunking on their own? The delta limit for the array is 2048 but I'm curious if that means I have to manage that on my own. Use case is we send an array of data which contains data for a user-created map. This array can change during play which would be minimal changes, but I'm worried about the big data dump when joining a server for the first time, will need to send the entire map over, which is very likely to be more than 2048 array items.

#

@meager spade Is this something you would know?

#

I guess the work around would be to have several of these arrays

kindred widget
#

Try not to tag people randomly, specially mods.

#

On a side note that's something that's probably fairly easy to test if you have a FastArray set up. Just add a ton of entries to it. Have a client join long after that, test the array.

pure mango
#

I have a Listen Server and Client.
I have a Xbox controller connected.
I want to shake it when the player presses the attack button.
I'm running it on UE Editor.

Get Instigator Controller:
Get Player Controller (Index 0):

Attack button pressed on Server: Gamepad does not shake
Attack button pressed on Client 1: Gamepad shakes

Get Player Controller (Index 1):

Attack button pressed on Server: Gamepad shakes
Attack button pressed on Client 1: Gamepad does not shake

Why does it not work on Server?
I understand on Client. Only its own player controller exists (index 0), so I understand why it works on Client.
On Server, index 0 seemingly refers to the Client's. And index 1 refers to itself. That's why Get Player Controller (Index 1) works. That's fine. But then why doesn't Get Instigator Controller properly work?

sinful tree
kindred widget
#

This looks a lot like the controller is only registering for the second machine and not the server machine. Could be a PIE with controller issue.

#

Can you try running with separate process?

#

Standalone 'should' act differently.

pure mango
pure mango
#

Ah, that was it:
Now it works with Get Instigator Controller
I guess PIE kind of messes up the gamepad owner
Thanks you guys.

lament cloak
hybrid zodiac
#

Hi everyone, quick question: if I have a struct which contains a set of member variables and some functions too, and I have an array of this struct being replicated, does the presence of the struct functions increase the packet size, or is UE4 able to only replicate the changed variables and ignore the function definitions?

lament cloak
#

it only replicates the variables which are marked as UPROPERTY(), or if you're using a custom NetSerialize function. Functions shouldn't have any affect on packet size.

chrome bay
#

only UPROPERTY variables are replicated. None of the rest matters

meager spade
#

you can also mark UPROPERTY with NotReplicated in a struct to also not replicate them

hybrid zodiac
#

Thanks all ๐Ÿ™‚ Great stuff

hybrid zodiac
supple willow
#

Hi all. I have a game in which standing over a goal area will cause the player to lose. However it is currently crashing when the player steps over it. Can someone give me a hand? I have both C++ and Blueprints

grizzled stirrup
#

How many bytes is FVector_NetQuantize again?

meager spade
#

1billion

#

its 20bits per component

grizzled stirrup
#

Yeah trying to figure out the bytes, so if it's 60 bits overall, it's like 8ish bytes overall?

meager spade
#

about 7.5

grizzled stirrup
#

Thanks!

meager spade
#

normal fvector is 12 bytes

grizzled stirrup
#

And the NetQuantize_10 and NetQuantize_100 versions are closer to 12 I imagine

#

And the QuantizeNormal much less

#

Read the comments in source now

#

Makes sense!

grizzled stirrup
#

Very handy when passing damage info around without having to separate it. I assume that anything marked with NotReplicated in an otherwise replicated struct is 0 bytes and initialized to default on the client? @meager spade

As in if I have UPROPERTY(Replicated) FSomeStruct MyStruct; and some members of FSomeStruct are marked with UPROPERTY(NotReplicated) they wouldn't waste bandwidth replicating down but the other members will as usual?

fluid summit
#

Hi! one question with regards to replication and performance.
on the picture below:
character: rep all
boxes: collision not rep, mesh rep.
i'm spawning a bunch of boxes for wich i only want to check collision against the character on server side, do i get any benefit for spawning a mesh on the client side at "Box position" or is it the same if i replicate the mesh component on server side?.

#

the boxes won't move.

peak sentinel
grizzled stirrup
#

Hmm how does that make sense

#

It's more precision than NetQuantize I thought?

peak sentinel
#

Its lesser

grizzled stirrup
#

Not according to the source

#
 *    FVector_NetQuantize100
 *
 *    2 decimal place of precision.
 *    Up to 30 bits per component.
Valid range: 2^30 / 100 = +/- 10,737,418.24
#
 *    FVector_NetQuantize
 *
 *    0 decimal place of precision.
 *    Up to 20 bits per component.
 *    Valid range: 2^20 = +/- 1,048,576
peak sentinel
#

Hmm

#

Is component stands for per float value there?

grizzled stirrup
#

Yes

peak sentinel
#

Yea makes sense now

ashen bay
#

Trying to get some input on this issue currently, the functionality for the aim offset works on the client but is never seen by other clients. I'm replicating other components of the anim BP the same way and it works fine; besides the yaw and pitch for aim offset.

twin juniper
#

COND_InitialOnly only replicates the first time we set the variable ?

sinful tree
ashen bay
#

Yea, I switched it to Get Base Aim Rotation and it seemed to work properly after that.

subtle veldt
#

Is this sane? It's a moving platform that replicates the "Loc Interp" (the interpolated location)

#

It does seem to work, but it seems wasteful because weโ€™re continuously sending Loc Interp to the clients. Loc Interpโ€™s location should be deterministic relative to time, so assuming we have the starting time in sync with client and server, sending Loc Interp over the network seems wasteful.

gleaming kite
#

Do rep notifies run on the server for PlayerStates?

sinful tree
gleaming kite
#

hmm, i wasnt able to get it to execute on the server for BPs, even when setting the variable on the server

sinful tree
#

Do you have any replication conditions set on it?

gleaming kite
#

No, all default

sinful tree
#

Very simple test.

gleaming kite
#

I wasnt able to get a has authority node working, would default to false everytime

sinful tree
#

Based on your wording, I'm not sure if you're trying to set the variable client side and hoping the server receives that update?

gleaming kite
#

No no, setting the variable server side

sinful tree
#

Ok good stuff.

gleaming kite
#

Is your test setup with dedicated server? Like running as client?

sinful tree
#

Yes

gleaming kite
#

hm strange, no idea why mine is not working

royal vault
#
//Died
    if (Health <= 0) {
        DropItem();

        if (GetLocalRole() == ROLE_Authority) {
            FActorSpawnParameters SpawnParams;
            SpawnParams.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AlwaysSpawn;

            if (DeathMeshTemplate) {
                DeathMesh = GetWorld()->SpawnActor<AActor>(DeathMeshTemplate, GetActorLocation() + FVector(0, 0, 10), GetActorRotation(), SpawnParams);

                UDestructibleComponent* DestructComp = Cast<UDestructibleComponent>(DeathMesh->GetRootComponent());

                //Subtract our location from theirs to get vector that points in kb direction
                DestructComp->ApplyDamage(100, GetActorLocation(), ((GetActorLocation() - DamageCauser->GetActorLocation()).Rotation()).Vector(), DestroyImpulse);
                DestructComp->AddImpulseAtLocation(((GetActorLocation() - DamageCauser->GetActorLocation()).Rotation()).Vector() * DestroyImpulse, GetActorLocation());

                //optional, but set death material to be our slimes color material
                DestructComp->SetMaterial(0, SkeletalComp->GetMaterial(0));
            }

            Destroy();
        }

    }```
#

hi i have a death

#

called in a replicated actor

#

everything works

#

but

#

when i spawn the deathmesh it only has an impulse applied to it when played on server

#

the clients cant see this impulse

#

the deathmesh has replicated movement

#

yet the clients cant see this fired impulse

#

any ideas?

steep wolf
#

is there a convenient way to get the acceleration of an actor for replication?

meager spade
#

what do you need the acceleration for?

steep wolf
#

hmm. i thought about it, and instead i'll just send a bit instead. it should work and would be a lot faster

rain coral
#

Hey, I'm doing Load Stream Level on the server, including hiding/showing it after. Is it correct that this all should already be replicated? On the client I see a black screen when the new level is loaded and the current is unloaded, instead of seeing the new map

proud gust
#

Hello ๐Ÿ™‚ I Have a AActor class, How can i set ReplicateMovement to true in the Constructor? bReplicateMovement = true; does not work ๐Ÿ˜ฆ

twin juniper
#

SetReplicatesMovement(true)

proud gust
#

Thank You ๐Ÿ™‚

vagrant grail
#

Could anyone give me an estimation for the price of a server please ? I know that there's no answer because it depends on alot of factors but I'm gonna give an example of an existing game as it's the closest to what my game would be.
The game is ... Fall Guys :

  • 60 players
  • Average players per month : 8,500,00

I don't know the tickrate they use and other stuff but just give me an estimation of how much their servers hosting cost please.

bitter oriole
#

Obviously depends on average play length per month

#

And their game's server side performance

#

And which provider they picked

deft bloom
#

i have a question. is it possible to copy fortnite old game files into ue4 and change stuff and make it work or its not?
because i download this "Rift" thing that lets you play old seasons and i was wondering if i can make that online with my friends

bitter oriole
#

No

deft bloom
#

so how did Rift do it? but offline

bitter oriole
#

They probably didn't change stuff

vagrant grail
bitter oriole
#

That's not possible

vagrant grail
#

Let's say they picked AWS

bitter oriole
#

I told you the missing data

deft bloom
vagrant grail
#

and the server side performance, take a guess on what could it be and give me an estimation

bitter oriole
#

And it's stupid anyway because 95% of Steam games cannot fill a single Fall Guys server at any given time - 60 players is a lot

#

95% being literally the real number here

vagrant grail
#

I didn't ask if it's stupid or not but just imagine

#

and estimate

deft bloom
#

so can take the files and make it online for me and my friends for free?

bitter oriole
#

Obviously if players play 5 or 20 hours instead the result halves or doubles

#

That's spot pricing, which they're not probably using

#

And AWS is expensive

#

That's why you just can't know

#

(Fall Guys also doesn't have 8,500,00 monthly players by any stretch)

vagrant grail
bitter oriole
#

So 8500

vagrant grail
#

oh messed up the numbers

#

yeah 8500

twin juniper
#

hi guys
Anyone know how to host online session
i was using playfab Legacy but they are going to shut it down any advice?

bitter oriole
#

Assume 50k, 10h per month, 1.6$ per hour

#

So a cool $750k

#

Assuming Fortnite performance and completely arbitrary player counts and play time

vagrant grail
#

$750k per ?

#

month ?

#

Damn that's alot

#

I calculated the average players on fall guys it's 24261.76 per month

#

so we can divide that by 2

#

fortnite performance is so high compared to fall guys

#

even 100k is alot

bitter oriole
#

I have no Earthly idea about which game is costlier on CPU

#

And I mean, Fall guys has 230 people behind it so you can assume something like $20M a year in pay alone

#

Makes the hosting look like a joke

vagrant grail
#

After reading some infos, the more players you have the more CPU you need

#

true but they have investors maybe and they made their money back, but even that it's alot to consider

bitter oriole
#

You're in wild guess land anyway so maybe it's $100k per month, maybe it's $20k, maybe it's $500, who gives a shit

vagrant grail
#

I just needed an estimation to just have an idea

bitter oriole
#

Again, the real cost is the team

#

Then the office space I guess

#

Then probably royalties

#

Then hosting

kindred widget
#

More players does not immediately mean more CPU usage either. 20 players in a super simple game can consume way less than three players in a heavy game.

vagrant grail
#

Interesting

#

@kindred widget Could you also give me an estimation for a Fall Guys like game ?

bitter oriole
#

It's almost like it's impossible to tell

#

We're throwing random numbers here

vagrant grail
#

I know

kindred widget
#

Not really. I have no idea what that stuff runs. I've never once cared to be interested in dedicated server hosting costs. Without a team and at least a half fleshed out game and a profiler, it's just pointless speculation and a waste of time that I could be learning something new like AI or Slate.

vagrant grail
#

But why nobody thought about making a website where you fill some infos and it gives you an estimation. Like you have input boxes like these :

  • Genre of game
  • Max Players
  • Competitive / Non Compรฉtitive
    ...

And it gives you some potion to go for and it gives you an estimation like "Between 50k and 200k" ...

bitter oriole
#

Because it's not possible

vagrant grail
#

mhhh ๐Ÿ˜’

bitter oriole
#

Like we keep telling you

vagrant grail
#

aright

kindred widget
#

There's just far too many considerations. Like, even something as simple as having too many scene components on player pawns makes a massive difference when you start getting past dozens of players.

#

Calculator cannot account for the myriad of different design styles or potential optimizations(or lack of)

vagrant grail
#

interesting, Thank you ๐Ÿ™‚

#

Also another question not related to unreal or servers : Do you know what's the english word for the mechanic of a character giving instruction through voiceline like in Apex Legends when you spot a place it says "Over here", "Come Here", "I'm Attacking in 3, 2,1, Go ! ",...

kindred widget
#

Call Outs is my first impression

vagrant grail
#

Thank you ๐Ÿ™‚

steep wolf
#

if I use a RPC to set a value on the server, what is the ideal way to replicate it to simulated proxies?

kindred widget
#

SkipOwner condition

#

@steep wolf

steep wolf
#

thanks!

dark edge
rocky stag
#

Hi, is there a document for how to use the network prediction plugin ?

kindred widget
#

I think it was Jambax who's made a few mentions about it. I was under the impression that it is still in development.

twin juniper
#

would anyone know how to properly stream levels in a multiplayer environment? i have 0 clue if i should use owning client in the player controller or stream the levels on the server? im currently streaming them on Owning client for everyone individually and im getting engine crashes because of it any ideas?

modern coral
#

Does anybody know how to setup a LAN multiplayer game between Android Instances? (I'm testing Windows to Android right now, but Android to Android is the ultimate goal). Windows to Windows works fine, but Android is not picking up Windows sessions and vice versa. I've read past posts about this and it seems to be a known issue possibly having to do with UDP broadcast restrictions on Android. I'm not ready to give up though. I am on Unreal 4.27.2. Does anybody know if this issue has been resolved in 5? Are there any alternative options? Bluetooth perhaps?

#

Not ideal, but maybe worth a try.

modern coral
#

Server browser would be nice, but inputting the IP address and port number works on LAN so I'll just stick to that for now. Since I don't have a second Android device, I can't test between Android instances, but I'm going to try doing an iOS build and testing between Android and iOS. Has anyone tried that before?

royal vault
#

What

#

wait since when

#

What they replace it with

sinful marlin
#

From the client's perspective, listen server and dedicated server are the same thing, right?

hollow eagle
#

if the client isn't acting as the listen server, yes

sinful marlin
#

Coolio ๐Ÿ‘

ashen bay
#

Has anyone ever ran into an intermittent replication issue, where an animation replicates at one point when moving but then if you stop moving and start moving again, it doesn't replicate?

I debugged it by printing the variables of what the client has versus the server, and it is properly replicating the values, but the animation doesn't always play for prone movement.
https://i.gyazo.com/cfd1c4ba093d1e5fe8efbc781cf5e55c.gif

#

Scratch that... I was missing a single boolean variable that should have been replicated.... ๐Ÿคฆ I guess a night's sleep helped me think lol

tranquil yoke
#

When we attach to actors together on a multiplayer game, do we have to attach actor on server too, or we can skip on server ?

dense mantle
#

I have a question, I am looking into database solutions for my project

I am going to be running a dedicated server for my project, which is going to be write heavy as I "want" to have a persistent voxel based world

I was thinking NoSQL in the form of DynamoDB? Anyone have any other suggestions or what not? I was going to originally just go with what I knew which was a MariaDB/MySQL variant but I realized that it won't be able to handle the amount of writes I need

toxic lion
#

NoSql already has such limited use cases where it'd make sense in the field it was popularized already (web dev)
I'd think that there'd be even fewer use cases for game dev

dense mantle
toxic lion
#

so the main point (to my understanding at least) of using NoSQL is that it's a non relational database where you can store data objects that haven't been previously defined in a schema. they are somewhat lose in the sense that the DB doesn't actually care what you put in there
Instead of having multiple tables where you store your data, you have a single "table" (forget the actual name for it) where all the data is stored

#

please note, I'm no DB expert (or even professional), so take what I say with a grain of salt, but I do have experience using them

#

Anyways, when it comes to it, you usually want relational data. that's when NoSQL databases lose their shine

#

You either store a whole object in the DB, or store a reference to another one.

#

Now you have to modify data in multiple places

#

And of course you fall into the pattern of writing the same data in multiple places

#

instead of references (links such as IDs)

dense mantle
#

Well maybe you can help me then when I tell you my exact use case

Its an RPG so items, well they're not pre-defined. They're randomly generated, so the chances of two items have the exact same stats is very very slim. So each time an item is created/generated it is it's own unique item entry to the database.

So I expect this to occur a lot, so I need a DB solution that will take all the items and store them as they're being created

toxic lion
#

there is an exact pattern for that with traditional relational databases

royal vault
#

how do i replicate add impulse

#

the actor is spawned from server

#

but the add impulse needs to replicated

toxic lion
#

one second @dense mantle

royal vault
#

any ideas

tranquil yoke
#

@royal vault do it on begin play, if this impulse needs to be on beginning, as actor is spawning on server and actor is replicated, it will spawn on each client and all begin play will work,

But if you want to control the Impulse timing, then create an event inside actor, then fire that event on a multicast, it will only work if actor is owned by the owning client (player controller) other wise if it is not owned, then create an event on playercontroller and use player controller to fire the event.

royal vault
#
DestructComp->AddImpulseAtLocation(((GetActorLocation() - DamageCauser->GetActorLocation()).Rotation()).Vector() * DestroyImpulse, GetActorLocation());```
#

what do i do if i have information i need to pass in

#

do i create variables on the actor and set them replicated?

kindred widget
#

Also if this is for simulating physics, physics isn't deterministic, so you have to write a system that'll handle the movement replication and prediction.

tranquil yoke
#

@royal vault well, if everything is done correctly, most of the parameters should already be on sync, but if not, you can pass via event, then execute.

#

if yes simulating physics, then its whole another story

kindred widget
#

That isn't the issue with physics so much. Two machines won't always have identical movements even with the same inputs. If you launch a ball and let it bounce around with the same inputs, it can end up at different places. This is what I mean by not deterministic. On top of that, networking has different timings. If an object is 2 seconds through dropping through the air, and server adds force to it, and multicasts, it could be 2.01 to 2.3 seconds through the air on the client before that same effect is done.

royal vault
#

ok

#

so my object is simulating physics

#

but its like doesnt have to be accurate

#

its just whats spawned after a mob or something has been killed

#

so it doesnt affect gameplay

#

and the actor destroys itself after a few seconds anyways

tranquil yoke
#

what if we have very good movement replication system, and we do the Impulse on one client and the replicate the movement, in that way most of the effect should look the same ?

kindred widget
#

If you really need to simulate physics over network, your only real choice is to replicate four values. Location, Rotation, Angular Velocity and LinearVelocity. Replicate these semi often to the client, or RPC them. Let client interpolate on tick to the new value. Client will always be a little behind the server, but it'll be semi close enough and simulate a similar state.

royal vault
#

wait but isnt there a way for me to just send from the server to client the impulse

#

and only that

tranquil yoke
#

@royal vault if logic which suppose to start Impulse happening on server , yes you can directly send it to clients.

royal vault
#

but

#

i now have an even more strange problem

#

i have this code

#

all those variables are replicated from cpp

#
if (GetLocalRole() == ROLE_Authority) {
            FActorSpawnParameters SpawnParams;
            SpawnParams.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AlwaysSpawn;

            if (DeathMeshTemplate) {
                AActor* DeathMesh = GetWorld()->SpawnActor<AActor>(DeathMeshTemplate, GetActorLocation() + FVector(0, 0, 10), GetActorRotation(), SpawnParams);

                ASDeathMesh* SDeathMesh = Cast<ASDeathMesh>(DeathMesh);

                SDeathMesh->Location = GetActorLocation();
                SDeathMesh->Impulse =  (((GetActorLocation() - DamageCauser->GetActorLocation()).Rotation()).Vector()) * DestroyImpulse;
                SDeathMesh->NewMat = SkeletalComp->GetMaterial(0);

                

                //Subtract our location from theirs to get vector that points in kb direction

                //optional, but set death material to be our slimes color material
        

                Destroy();
            }

        
        }```