#multiplayer
1 messages ยท Page 310 of 1
Any chance you have a link to the thread? I'm trying to figure out how to set those values myself. Althought Conan is using a different server backend so I dont know if the networking is coupled to those vars
Im trying to increase the amount of data the server can send to clients myself, but I can't seem to affect it
Because I own the game, and I too have these issues, but having worked with the engine I'm confused as to why
Clients need to change values too
Its possible they are using those vars with their networking implementation, and likely that during transmission of lots of data the server fps would drop
it could likely cause network saturation
that is a large bandwidth pipe they gave users in that thread.....
But you're saying servers will prioritize sending data over having a stable framerate?
Dont know enough about replication to say one way or the other
Well it does make sense if you're trying to keep all players in sync
I don't think it actually lowers servers tick rate, unless it literally cannot process replicating everything
server doesn't update everything on every frame for everyone
there is a queue with importance and last update taken into account
This is what the dev is saying that has me confused:
"The downside is that the server is now allowed to spend up to 700kbs a second per connection doing replication(networking) of data to the clients. Which means it will spend a lot longer time doing it each frame than it did before. Which means lower server framerate, and everything else in the game will suffer from it, like AI behavior not being able to update as frequently as it requires"
update rate is total bandwidth /
but there is still a max update rate setting
default is what..100htz? on components
I think he's just talking about onload
Yeah, but when a building comes into view and needs to load
not values that need to be kept updated every frame
like movement data
same difference to the engine
thats actually the exact issue im facing right now building a multiplayer voxel world. Each 16x16x16 chunk is an actor that replicates an array of 4096 ints. Takes a good 1-2 seconds per actor with default bandwidth settings. Makes new player loads insanely long. I dont know if there is a way to increase bandwidth for users who are in a joining state or not, doesn't seem like it. Might just be a matter of finding the right ratio between load time / server performance. But I'm just getting into this stuff and might not have a clue ๐
I dont even know if UE4 compresses UPROPERTYs for replication or if I need to do that myself
Yeah, and ideally would have latency compensation so the client would like to know what the blocks are when editing, vs. just sending visible blocks (which still takes a long time)
Twitch
What I found was any array over 512 took forever to replicate
I made a voxel plugin awhile ago with multiplayer
You need to compress the data.....
If it's procedural only send data on the blocks/chunks that have changed
Been working on that this morning @heady merlin , using FCompression but getting kinda lackluster results
I compressed with a custom RLE, then ZLIB, then chunked it over the network
Any chance I could peek at your code?
there is a max size to replicated arrays in engine btw
have to chunk it
sounds like you are blueprint?
Im doing this as a learning exercise so appreciate the tips, dont really know what I'm doing
C++
if you are doing it as replicated array on an actor for each chunk...
oh
you can do WAAAAAAY better in c++
for one thing, storing the voxel data as RLE to begin with
means you just replicate the array itself, chunked
also what are you storing in that int?
a better approach btw would be a master "terrain" or "volume" actor, with subcomponents for each chunk of the voxel data
Well so I thought about doing RLE but have no experience with it, my first idea was that I could avoid having to replicate the FVector position of a voxel but just sending all of the voxels by type, as an array of ints, and the position can be extrapolated from the array index
that is the correct way to do it, but you need compression then to send it
I have a VoxelWorld actor that spawns replicated VoxelChunk child actors
if you have sparse arrays you can send initial pos of first and then strings of voxels too though
yeah the chunks shouldn't be actors themselves
higher overhead
oh ok
you using that community procedural mesher?
URunTimeMeshComponent yeah
I rolled my own but his is good if you don't want to
his seems to be fast enough for now at least
I want to do marching cubes or dual contouring eventually, I figured it might be good for that
MC is terrible
DC is good
but MC is really easy to implement
and DC isn't
also for DC your entire approach will need to change
Can you elaborate on having the chunks as components on the main world actor vs having chunk child actors?
you'll have go to octrees
Yeah thats on my list to explore after I solve this replication stuff
subcomponents just have less overhead than a full actor
also that places everything under one master actor
would I just extend UObject and slap em on the world actor?
RuntimeMeshComponent, subclass it
add your voxel data
and then attach those to the master actor
and those will replicate individually?
you want to manually replicate
the built in one will not do what you are looking for
RPCs then?
can be
There's also smaller optimizations you can make. Like if a chunk is entirely air or is entirely buried and contains no visible voxels, don't send anything at all.
RLE already would handle that well enough
But i guess that would only work if you are working with both horizontal and vertical chunks
If not RPCs, you'd use sockets manually to replicate them?
yeah
or could rep a custom struct
but you likely need to chunk everything and send in portions
then compile back together
my data was smaller than yours though on the default type
What would a replicated custom struct look like? How would you chunk it as a whole struct? I'm probably getting over my head here
So chunked might be something like, 4 replicated/RPC'd arrays versus one, each compressed?
yeah
or however small the chunks need to be
I ran RLE, then ZLIB, if the zlib was larger, flagged it as RLE only
I see, any thoughts on using replication vs RPC for this? Should I bother trying to use replication?
replication has potential issues
Did you do RLE manually or is there a built in utility?
rpc or direct socket is likely what you want
manually
voxels RLE can be far better than general RLE
lots of micro optimizations you can make
can fit more than block type in that int
if you want full 32 bit color, RGB, A = part alpha, part data
if you don't mind 16 bit color, far mor eto work with, or less array size
So the replication vs RPC issue is interesting to me, why would I not want to use replication? All the docs say to use RPC for cosmetic stuff
I know I might be able to force faster transfers thru RPC but would that have side effects
socket is best honestly
rpc has some overhead
which is why for normal game play variable replication is better
but its also more flexible in a way
So for a socket, i'd have the main world actor keep a connection open with each client and push the array chunks as necessary?
yea
the array rep only reps what has changed over
so thats nice
but its harder to detect what changed
Easy enough to keep an array of changes that frame
if you plan on fully compressing the data all of the time
the entire array will likely be different
so if you don't compress, it would likely work better
but your memory load is far higher then
also iteration is actually faster on a RLE compressed voxel array than an uncompressed one
interesting
damn
So you suggest having a single world actor, with subcomponents dervied from URuntimeMeshComponent, manually replicated via RPC or socket, and I guess the client would be spawning their own mesh subcomponents as they receive them and destroying them as they go out of range?
true
keep a component pool
based on draw distance
initialization of components is actually pretty heavy in engine
ah ok
fair enough then
well that gives me a healthy amount to go and learn
I really appreciate it @heady merlin
GL
Mind if I bug you again in the future?
nah its cool
tyvm
Hi, would anybody be willing to quickly run me through the general ideology of how client-server relations work in ue4? It's pretty confusing even though I know how to do things in theory. I just don't have any idea on how to implement these principles practically.
I can host/join sessions when I run two instances of the game on the same computer, but when I go to a different device on the same network it cant find sessions. Anyone know why that might be?
Tiled landscapes/world composition works fine as long as you use a dedicated server right?
So general question. Starting up a listen server with a client in the editor if I ask for the Player State -> Player ID on begin play I get a 0. if I wait a few seconds and ask I get a valid #. Any reason why?
@summer rivet the answer is i love your videos
@potent prairie from what I know world composition don't work in multiplayer
if you're calling the state from the client PC beginplay, the state may not have replicated yet... you can do a simple isValid loop, with a 0.2s delay in there (which just makes sure everything has had time to sync)
Whew 5 hours later and I've got the character movement running on all characters (usually it doesn't update state on non-owning ones, though that may be cause I turned off bReplicatesMovement). Now I just gotta pray that my dodgy code doesn't cause any bugs.
@thin stratus was in the characters begin play. Was simply trying to make a reliable way of storing that ID from the player state in the character without using a delay but I cant seem to get a function that's reliable for that lol
Why would you move it to the character?
Just query it from the PlayerState
Character has a Pointer to it anyway
Also keep in mind that this ID is only unique during that one map/level
If you servertravel or rejoin you'll have a new ID
if any of you guys have ever packaged to consoles or multiple devices, would you mind checking my question over on UE-General please? โค
So the problem is recreating group health bars on UMG widgets. Each player has a bar that represents another player and themselves. When the server deals damage to a player I'm having a hard time IDing that player to tell everyone which bar to change in their UI
@summer rivet GameState has a PlayerArray with all PlayerStates
You can use that to always try to retrieve PlayerStates
If you have a group you would want to have that bay saving PlayerState refs
The owner of the PlayerState is the PlayerController
If the Character gets hurt you only have change the health on him
yeah I think I am not handling some things properly is what it is
Then you go to your UI
Get the PlayerStates
Get their owner
Cast thaz to playercontroller
Get the controlled pawn and his health
Client's dont have access to other players controllers, only the server does, remember that
heh
Does the PlayerState have a pointer to character?
nopers
if your player state stores health, (that's what we do) have your widget keep a reference to the state that owns it
Then just push the health to playerstate
you can send pointers over an RPC just fine, don't ask me how 'cause that's some black magic bullshit but it works
my first pass at this was having the player state store it yes but I am trying other ways to learn this stuff
so you can send a reference to who owns wat over an RPC
@summer rivet You could have a reference of the character inside of the PlayerState
But in the end you wanna use the PlayerState to share information between users
yep trying other ways of doing this without adding things to the stuff ๐
Hey guys, I posted this issue in #blueprint yesterday, but no one there was able to help.
I wrote out the entire issue on answerhub, and that goes over everything I have tested so far with this issue.
If anyone is able to help, I could really use it haha
@wise depot replicated actors are linked via netids afaik
so you could, for instance,
in your player state create a reference to pawn that is replicated,
on the server, in your pawn, do pawn->PlayerState->PawnReference = this
or along those lines
If you pass a reference of a replicated actor you actually pass the id
then your clients can all be given references to who owns what
the current idea is store the player ID on character creation and replicate that so the ID is always persistent on each character. When I create the UMG layout I store a map of the ID -> health bar widget. Whenever I replicate damage I can then tell all the character to update their UMG with that ID and the new value. It works fine but I really hate the fact I can't easily tell when the player state is valid without delaying or looping
so the issue is not really the health or anything just trying to make sure I only do stuff when stuff is valid lol ๐
You can by using the BeginPlay of the PlayerState
on a client will that only fire when its valid on that clients version then?
I thought I had it licked with the possessed function but thats server only lol
BeginPlay fires on each instance ones it's spawned and ready
yeah that might work, playerstate can talk to it's owner and tell that character to store the ID then
I had a few instances of the player state->Id still returning null after 2 seconds spin up time
But just linking the widget to the PlayerState would be way easier
as in?
Array of PlayerStats that resemble your Group. Loop over it in the main widget and spawn group widget per entry. Pass that the reference of the PlayerState. Then have health on the PlayerState replicated so you can just use the PlayerState variable in each widget to get the health
If character gets damaged it's handled on the server anyway so he forwards the health to the PlayerState
And everything else updates automatically
yeah that's what I did the first time
was trying to learn to avoid modifying the player state for this time ๐
basically just redoing this idea a few times in different ways to learn networking
Makes no sense as that's how it should be done afaik
You are complicating things otherwise
Don't make your life harder than it is xD
not making it harder, using it to learn
I had the other way working for example without using RPC and would have never gotten a handle on RPC without it
same with learning that PlayerState isn't valid on Begin Play in a client ๐ Got to break shit to learn how it works
appreciate all the answers tho. Networking has been making me it's bitch for the last few days lol
You could set a rep notify variable on the Server Version
That should replicate etc one everything is valid
But not 100% sure
But yeah just keep asking if something is up
And, in advance make sure to understand ownership
To avoid headache when a rpc doesn't work
yep been learning ownership the hard way heh
@thin stratus somewhat related question to what you guys are talking about, in your pdf you said to wait for AGameMode::PostLogin to be called before doing rpc stuff.
I made a custom kinda 'begin play' for networked stuff and also disabled actors tick until this is ready, thoughts on that?
PostLogin is called when the client has a valid PlayerController
I think i simply meant that at this point you are save to call rpcs on that playercontroller
and yeah @thin stratus using rep notify was what I used for the first test as well ๐ seems like the first version might have been the "sane" way heh
Hmm maybe I had a call to the player controller in my character then. Otherwise it should be fine to call rpc stuff in the character on begin play?
You are fine to call rpc everytime, it's more about having an entry point at which the server can start interacting with the client
Such as spawning a pawn for him
I might need to rephrase that if it causes confusion
I might have to relook at what I'm doing then. It's cause a bunch of people mentioned trying to put a delay to wait for things to replicate.
Which usually fixed the problem for me
so I thought beginplay was unsafe
and that your postlogin thing was the solution
Though I had to put a delay after post login anyhow ๐
yeah I used post login to talk to the player and that was fine it's just some variables are not replicated yet on the client side was the issue I ran into. Delay ftw lol ๐
just because you have a valid player controller doesn't mean you have a valid character as well lol ๐
networking basically goes "all the stuff you learned before? Fuck you, it's wrong"
Na it's just not excusing as much wrong stuff as singleplayer
I feel like I'm going crazy: I started a blank C++ project, added an actor class with the following:
void ATestActor::BeginPlay()
{
Super::BeginPlay();
if (HasAuthority())
{
GEngine->AddOnScreenDebugMessage(-1, 10.f, FColor::Red, FString("Authority"));
}
return;
And inserted it into the level. But both the server and clients display "Authority". It works properly if I switch Play mode to a seperate process, whats going on?
I'm suspecting GEngine->AddOnScreenDebugMessage is global when using single process for playing
Any easy way to respawn pawns in C++ multiplayer game?
And where should I place code for respawning players? PlayerController or GameMode?
@hollow quartz single process is displaying it to both screens
That doesn't mean both call it
If both call it you would see it twice
@verbal slate Up to you. Could do it in the PlayerController
And no, you might need to destroy the old pawn and spawn a new one by hand
@thin stratus I'm trying to call GetWorld()->GetAuthGameMode()->RestartPlayer(this); on button press but that just resets camera
And if I try to respawn on client it crashes game
I see, forgot about that
Restart Player is probably just doing stuff with the PlayerController
You might really handle that stuff yourself
Yep, thought that this might be the case
I was checking out ShooterGame project and spawn system there's pretty extensive
ShooterGame is overdoing it a lot
Good to learn but a bit too much for most simple things
Yeah, trying to find middle ground between shitload of code in ShooterGame and GetWorld()->GetAuthGameMode()->RestartPlayer(this); ๐
If someone is looking for same thing I just solved it (only for server though, clients will come later)
Here's the code:
APlayerPawn* PlayerPawn= Cast<APlayerPawn>(GetPawn());
PlayerPawn->Destroy();
GetWorld()->GetAuthGameMode()->RestartPlayer(this);
im thinking im not understanding how player controlled objects are replicated. I have an airship, It moves on the players screen but not on anyone elses. Two things im not understanding. #1 i would of thought the server would snap the airship back to where it is on the server instead of letting the client fly away on it and #2 why http://prntscr.com/e6om55 doesnt work replicated in the airship but http://prntscr.com/e6omfh is replicated in 3rd person character. I have the components set to replicate but obviously its not sending the movement to the server. When i try to run the inputaxis events through a run on server event before add controller input nothing still happens for the other player http://prntscr.com/e6op2q
@dawn glen I can't help you with your problem but take a look at this pdf (http://cedric.bnslv.de/Downloads/UE4_Network_Compendium_by_Cedric_eXi_Neukirchen.pdf). It is incredibly well written and really healpful.
Though it will probably have something to do with checking if player is authority or not
well the input has to come from the client
then it has to go to the server and teh server perform the movements
but if i dont allow the client to calc the rotation it wont rotate for the client either. Its like the server is ignoring and not replicating at all
Do you have both bReplicate and bReplicateMovement set to true?
and for some reason my player is replicating but when im testing the blueprint and set it to dedicated server there is no server instance of the thirdpersoncharacter yet with 2 clients connected its showing 6 instances in all worlds with none of them being server
i reparented to character instead of pawn and it solved most of my problems and created new ones lol, thanks for the document i will read it through after work.
Didn't help much but I'm glad you got it working
@dawn glen does you thing there have a charactermovementcomponent?
Iirc default replication of the yaw input etc needs that
So a pawn doesn't do that by default and needs you to handle that themselves
Is that maybe the issue?
@dawn glen okay yeah im certain it's that as pawn didn't work but character does now
Pawn doesn't have the component while the character has it
does UE4 support in-app purchases on steam, or only ios/android?
The Steam SDK handles the actual purchasing, though you need to add hooks into that in your game where you want people to buy stuff.
I can't find game sessions when I use lan on different computers, but it works when I run two instances of the game on the same computer? anyone have any ideas
can't figure it out at all
Could you possibly check out your log file? It might give hints as to why the connection failed (e.g. different builds of the game)
Though I believe that issue specifically will still return the session, just the join itself won't work
Either way, it's a starting location
You might also want to make sure you're outputting session info for found sessions to your log. That's always useful for seeing what sessions your game is actually finding, if any.
how do you check the log file for a game when you right click the uproject file and launch?
Through Saved -> Logs
But I believe right clicking launch game effectively runs an editor instance of the game without the editor itself, and editor MP never seems to work
You might have more luck packaging and distributing
thanks for the information, ill try to package and run it
Yeah you don't want to start 2 editors
Though you also don't need to package it as long as the engine is installed on both pcs
There should be some information in my compendium about how to start a listen server and client etc just through cmd
For you that would be 2 non clients i guess as you have a menu?
ya i have a menu, I can't connect over cmd on different computers but I can on the same one
I am using unreal 4.13 and thinking that is the issue
becuase no example projects work on that version
Just to confirm, you can see the other PC on the network, correct?
(ping, nmap, etc.)
Because no example projects working seems quite odd
how would I confirm taht I can see them?
Get the internal IP of PC 1 using ifconfig, go to the other PC and try to ping <IPofPC1>
Oops, ipconfig
If you're on Windows
You should be able to see it, but I'm just trying to rule out something like AP isolation being on (which is mainly for public WiFi anyways)
no that doesnt work, i am able to ping my laptop and computer
and see each other
but it still cant find the sessions
right clicking the launcher and launch games or a packaged version
Can you share screenshots of the code you use to host and join
Ya and I'm not sure if that still works in the newest versions
Can you try to hookup the session nodes
And make sure that that works?
like blueprint?
Cause then we can pin point it to my outdated tutorial
Yes
If the session nodes work then we know that something is wrong with the cpp code
I'm currently not home (till sunday) but others might be able to work you through fixing that if you go step by step and check what doesn't work and what does
Maybe the hosting already doesn't work. So you might want to add some onscreenmessages to the callbacks
And see if they return successful etc
I think i already do based on your tutorial, the deleagtes print debug messages when boolean results
Alright, that should help to get some information what fails
I mean atm it's only a part of hosting and finding
when I run the game on the same pc, it host/finds/joins correctly
but when I switch to two different pc's on same networok
it can't find any sessions
Okay you might want to google how to enable logverbose for the logonline
And then check the logs
Maybe they have something in them
Can you make sure that you can connect like this:
open MapName?listen
On the server and
open LocalIPAddress
On the client?
You can see the ip of the server by simply doing the ipconfig thing in your cmd
The open command is a console command
So you have to open the console on your games
Gnah my phone is at 2%...
trying it now
Just make sure you can connect
Then check if you are actually hosting (delegate debug texts etc) maybe enabling logverbose for logonline (google)
that doesnt seem to work
again it works if I run two instaces of the game on the same computer
Then the issue seems to be in the network
but not on different computers
And not directly with ue4
pacakged version of my game
If you have two packaged versions then it should work
You added the Subsystem dependencies to the build.cs file?
Should be part of my wiki entry
DynamicallyLoadedModuleNames.Add("OnlineSubsystemNull");
Make sure both games are either launched through the engine (not editor) or packaged
And check the logs files for any errors/warnings or so like timeouts
Or maybe even non working online features
Can't be much if it's working on the same pc
Although open commands should work without subsystem
So that's not even needed. Yeah try to get the open MapName?listen thingy working first
If that works you can test the session stuff again
No biggie (:
working on this for my capstone project and have been comptely lost
Ya, Multiplayer is a bitch sometimes
There might be some additional good resources pinned to this discord channel
everything seems to be in blueprint though
really wanted to do this with code
but might have to switch
Moss's project shouldn't be Blueprints
Also BPs remove tons of online features
Such as your own keys for hosting (servername and such)
Or updating a running session
So stick with cpp if you are on it already
where is moss project?
Should be pinned too
Lemme check
Yeah it's the lowest
Multiplayer Twin Stick Shooter Example on GitHub
https://github.com/moritz-wundke/MPTwinStickShooterWithUE4
Maybe he has hosting etc in there
Other project would be ShooterGame
Though that's tough to dig through
Yeah, the wiki is made from me digging through it for hours and stripping away all the unnecessary stuff. Anyway, phone dying soon. Should also sleep. Good luck buddy!
thanks, appreciate it!
My friend made Steam leaderboards blueprints that actually works: https://github.com/ryangadz/Steam-Leaderboard-to-UE4-Blueprints
So im trying to setup the simple example on page 23/24 of cedric's network compendium and when i add score everything is crashing
it happens right when I try to do TeamAScore++ or TeamBScore++
Shoutouts to cedric_exi's Networking Compendium thing -- it's a gem and blows the official documentation out of the water.
Is it possible to possess a pawn that exists only on client-side?
@native axle My understanding is that Pawns cannot exist client-side only, so I think the answer might be no. I could be wrong, though.
Yeah the network compendium is fucking god tier
Just see this on twitter https://nte.itch.io/steamuer
I cant download this compendium and I need this desperately.
"This site canโt be reached
cedric.bnslv.de took too long to respond."
I need help understanding if its possible to make an "avatar" on spectator class pawn and be visual on server side (the spectator is on the client).
Did someone tried this before?
One yes/no would be enough for me, I want just to know if by design this is going to work.
By avatar do you mean something that flies around in the world? Or just a UI representation of it
Becuase you can always override ASpectatorPawn and add your own functionality to it
Yeah, you shouldn't have much trouble implementing a mesh onto it, I'm not exactly sure how ASpectatorPawn is networked so you might have to do a decent amount of it on your own
I'm not at my computer to look at the source at the moment, but I'd just look at some of the spawning methods to see where they're spawned and things like that
it gets spawned with the argument SpectatorOnly=1
btw I am not programmer, and I use mainly blueprints
I got the info about this agrument from here
the last answer
cd C:\Program Files\Epic Games\4.10\Engine\Binaries\Win64
UE4Editor.exe C:\Path\to\project\NetTest.uproject 10.0.0.5?SpectatorOnly=1 -game
this is how I get the spectator spawned
So I was thinking that this is not working because its just spectator (invisible pawn)
Well, that's just a command line argument that tells the game to spawn a spectator pawn, I would look at how the actual spawning occurs
mhm
Spectator pawns are invisible by default yeah, but you can always make your own class ๐
the problem is that I dont know how to spawn this new class the same way with the command line
as I said I am not a programmer XD
Is it possible to get the spectator pawn transformations from inside the server character pawn?
Looking at the source now, it looks like the spectator pawn is only spawned locally, so you would have to do pretty much a rewrite of how the spectator pawn is created
Something like a event dispatcher
Which, unfortunately there really isn't a great way to do in BP
ahh
hmm
ok, then I will do this as it should be done, spawning one char (vive) and another one which will be a normal character pawn.
I just liked a lot the command line thingy because I can debug stuff really fast like this
๐
THanks for the info @brittle sinew
Player health, name, other important stuff for a networked game. Assume you want other players to have access to this info on demand. What would be the best place to store this for later? PlayerState or something else?
IMO, you have to create a distiction between what's pawn information and non-pawn information
Like I would put health on the pawn, because it depends on the pawn currently being used by the player, but player name usually wouldn't depend on the current pawn
Though it may be easier to consolidate things onto the PlayerState, that's up to you
Gotcha
@summer rivet PlayerState is what you want -- check out pages 25 thru 33 on that Networking Compendium thing the cedric_exi guy made. It's a gold mine of info like what you're asking about. It's the 3rd thing in the pinned list for this channel
Cool
oh no, the cedric networking guide is down. Abort Abort! Everyone to their shelters the world is going to end, we have no info! I repeat we have no info!
Someone give him money so he can turn on the lights again
Anybody has idea about direct mobile connection for online games?
More or less, yes.
Does GooglePlay or AppStore allow that?
Actually, it might not even be an issue with them
(I don't do mobile dev)
We are working on a mobile game, and cross-platform would be nice. But implementing a custom online subsystem with dedicated server instances and stuff would take a LOOONG time.
So we were thinking about an easier method, running the same game version on each platforms with direct connection to eachother. Works perfectly on local in mobile-mobile or pc-mobile but no idea about direct IP connections (or more like port restrictions)
Since it would be ideal if people could play against eachother even if they are not on the same local network ๐
@thin stratus and @minimpoun I got a question you guys could probably answer. So I am trying to setup gun skins in my game, so I have a data table with all the different types of skins. When the player is in the menu and picks a skin, I have the skin ID (a three digit int32, example 001) get sent to the server and I take out X amount of credits from their account which is stored on my PHP server thanks to minim โค But sadly, I have yet another problem. When the player logs into the game I have a RPC that gets the skin ID from the server and sets it as the material override. But for some reason, whoever is the first to load into the game sets every ones skin as their skin. So if I load in first with skin ID 018, everyone loads in with skin 018 even if they don't have the gun skin 018 uses.... Not sure what I am doing wrong here, any help would be spot on!
wait, @minimpoun
what
Hahahaha
He is sleeping
He left didn't he? He was telling me he was thinking about leaving cause all the noobs where making him waste his time ๐ Anyways, I can PM him later, anyone know what I might be doing wrong?
You can PM him
We didn't ban him.
No you didn't
you didn't?
just because someone knows something doesn't make it acceptable that one acts like he did
He was a really good guy once you got to know him... He was just.... uhhh.... rough around the edges ๐
He wad totally not nice in programming today
Everyone is a good guy once you get to know him ๐
/shrug
good? he practically made fun of every new person here and keps spamming memes to them, laughing at them
in my books, that's not ok
@tropic kiln cannot say what you do wrong as i don't know your code. Sorry
@thin stratus is your site permanently down?
@fierce birch is it offline?
Hm it will be off for quite a while, yes
It wa shosted on a friends server
I will reopen it freshly at some point and connect it to my existing page on cedric-neukirchen.com
@fierce birch I can understand that, but he helped me learn by doing that. He made it clear he wasn't going to, as he puts it, "spoon feed" me. Once I realized he was helping me, I stopped trying to be defensive. He walked me through setting up my own server and creating a PHP database. Even walked me through setting up the slate code for my menu UI. Maybe he just liked me
ยฏ_(ใ)_/ยฏ
There is an easy rule
@tropic kiln yeah, I still stick to my original point, even if you know stuff, you can't be a jerk to people
If you don't want to help, stay quiet
No one forces him to spoon feed people here or help them at all
TBH, even people who don't know anything are jerks around here
As far as being spoonfed
I sadly have to agree to that
But, then again, everyone learns differently
Some people will actually learn something by being spoonfed, while others, can't/won't
Mentorship is the best way to learn something imho
Yeah, but you could argue that if he had stayed quiet he wouldn't have helped me. Not trying to say what he did was okay, but I do have to defend him a little, cause he helped me a lot. And I know I am not the only one, he has helped a lot of people, he just does it in PMs. And I agree Victor, everyone is different. Some people don't learn the way he teaches. Nothing wrong with that
Some people can learn a lot from tutorials, but others just watch them and are like zombies
Copy pasting stuff and then they come on here and cry about not understanding or the tutorial not working
The underlying issue is the "understanding" part
That and never wanting to use Google...
When I would ask him how to do something he wouldn't tell me, his idea of teaching was telling someone how it works and then them figuring it out. He would tell me if he just told me how to do it I wouldn't learn how it works
which is what a lot of people will do
I don't say the way he helped people here was bad, I'm only complaining of his attitude agains people who didn't know much to begin with and making fun of those people
he is a bully
fair enough, and I do agree with that.
But like I said earlier, the reason he helped me was because I didn't get mad at his "bullying"
Yeah see
We all come from different walks of life ยฏ_(ใ)_/ยฏ
Everyone's views on things are going to be "skewed" depending on their own life experiences.
Also, not many people on here have a sense of humor IMHO
I have noticed that...
Which boggles my mind
I think it must be my good looks that get me all the bad attention
@stiff wasp can't compete with this smile
Who was the guy minimpoun was always hanging around? Koko or kroko something like that, he seems really nice/helpful. Which is kind of funny seeing how oppositeminimpoun is
you rang?
@severe widget
@stiff wasp just read few pages up and you'll be on the same page
@tropic kiln if I had to guess on what you did wrong, you are probably setting the skin ID as the default. Remember, I told you NOT to do that. Just a guess
I really don't care enough @fierce birch
I can probably guess
yeah, I've noticed
It doesn't take a genius to notice
I still wonder why mods tolerate your behavior here, I'd kicked you out months ago
@stiff wasp default as in the material override?
Maybe they have a sense of humor unlike someone with a 0 in their name
and yeah @tropic kiln
hmm
wait, it could also be where you are getting the data table row name.
I don't think you setup that function
unless you did it while I was offline
I am just getting it and setting it
as in?
like I am getting the row name and setting the material directly
ยฏ_(ใ)_/ยฏ
having an issue i dont understand. I have a UI that is popping up on all the clients screens for some reason i cant seem to see.
This is my Tick event to run a trace which is run on client only (will never be a listen server always dedicated) http://prntscr.com/e742jr
Handle Trace Function
http://prntscr.com/e742zt
http://prntscr.com/e74367
DispMountUI
http://prntscr.com/e743is
http://prntscr.com/e743pk
@fierce birch It's not like we tolerate it. We simply check if it's a general behavior or just a bad day. Also, as we are multiple mods, we like to discuss things first. I don't like removing people right away.
@dawn glen hard to tell
Only thing i see is that you might want to set the curmount on the client too
Correct
But in addition letting the client set it so he doesn't wait for the replication
Your ui gets only added if the variable is valid aka replicated correctly
i can do that and drop the isvalid
but the ui pops up on both players in a 2 player dedicated server PIE
This causes delays for the local client if the ping is a bit higher
Yeah that's another thing
ive made tons of changes and cant figure it out
the currMount? no
Is the UI popping up if you disconnect the add to viewport node
made teh curmount change so it sets server and client
Don't directly have to turn the replication off if the server should still hold authority about it. Setting it on the local client is just lag prevention
i use this same code on chests
Hmm both get it... Character. Tick. Remote. LineTrace. When hit spawning UI for each hit on that remote client. Hm
and the chests show only the right player the ui lol
Really? Weird
yea
You dun sumting wrung bro
obviously, cant see what though, it eludes me, sorry i have to go back to work, be back in 5 hours
@dawn glen That is the whole logic for it that you shared?
Then I'll sleep though. Just compare both functions.
Maybe the widget itself is doing something weird
I noticed that textrender don't update on begin play
unless you had a delay on it
even a 0.0 delay
It was the strangest bug (I was getting score from Playerstate)
Yeah, you just never know
Sometimes engine is weird. Always woth digging into the source code to see what's causing it
Had a problem with the combobox where setting it in its own "onset" call was getting overridden by the previous selection
Cause cpp code was calling the BP event first and then set it. Sent a PR to fix it
/shrug
@wary willow it is
I'm going to redo it all as a function after work and try to streamline it a bit
@fierce birch Ah, good to know.
Yes, sorry
Friends server went down and I forgot about it as I'm not home atm
Lemme pin that:
Cedric.bnslv.de is offline. Example projects as well as the Multiplayer Compendium will be available soon under a new domain.
If you need the PDF, try to ask around a bit as a lot of people already downloaded it.
You could just drop the PDF on Google Drive and copy a public link from it there. ๐
ok so maybe I've been approaching learning this the wrong way. For Networking in UE4 is there alot of "I did something on the client, so I need to tell the server what I did" then the server "I was told somebody did something, let me make sure it's ok and then update my local copy of that with this info" and then "everyone else who should know about this change needs to be notified of this, so let me tell them"
Well, if you're already multicasting to other clients, multicast covers the owning client as well
So you wouldn't need to directly send a client RPC back in that situation, unless there's a differentiation in what type of data is transferred
But otherwise, that flow looks generally fine
well in the case of a variable changing, lets say the client changes his name to bob because why the hell not.
I would tell the server the client did/wants to do this, the server does the change locally, and then it tells everyone else about the change (assuming they need to know and it's not just a replicated var)
sound about right?
Well, in that situation you should really consider making it a replicated variable
yeah have been having some interesting conversations about how this seems like way too much crap to do but it seems like its correct
Simplfies a lot of the back and forth, you just have to call up to the server to do the change and it gets sent out automatically
yeah @brittle sinew I was being a little generic to try and keep the flow generic
@summer rivet So I am assuming your next big series is on Networking?
Or did Epic ask you to fix up what they did wrong?
but in the case of what I was having the issue with earlier; Text Renderer on the character. I change the Text property on the Text Renderer and then I need to tell the server about the change and then multicast that change event as well since Component replication did not seem to propagate that change as expected
yeah my next big big is networking. been spending the last few stream with viewers hammering our heads into the desks trying to learn it lol
right so
There is a bug with Text Renderer
Depends on when you are calling that event though
@brittle sinew Just because a variable is replicated, doesn't mean that everyone will see the change?
well it worked fine when I multicast the event to change the text. We just assumed changing the Text property on the Text Renderer Component and having it replicated should have worked but it did not heh
If the actor itself is replicated, I believe it will?
yeah theres some definitely "do it the right way or shit don't work" when it comes to networking
As long as you're changing it on the server
yeah I just have to do more research to test it on components
So what do you mean? AFAIK replicated variables will at least eventually change everywhere @wary willow
You shouldn't just let the clients know everything about replicated variables is what I am trying to say I guess
yeah replicating vars seemed ok so far if I did it right, and oh boy did I keep forgetting to call those nodes on the server lol...
And it should only be modified by the Server
Well I meant when you said just because it's replicated doesn't mean that everyone will see it, unless you're saying that not everything should be replicated
oh yeah for sure
just understanding the flow of when things should be and how to do it is the kick in the balls right now
Yup and unless you're god's gift to earth, you'll be still crying months later
(even years?)
maybe not years
oh I know. I've remade the same project 3 times? maybe 4 times, just learning all the ways to get info passed around and I still forget half the things I have to do after just doing it a day before
the flow is just so damned weird to me right now
Also, make sure @thin stratus has an advance copy of the tutorials lol
I think the biggest challenge (still is) is how one player is the listen server
trips me up quite a bit
Using Is Local Controller and the like is like whoa
@wide hamlet I'm a still not home. The file was on the server and is only on my local drive at home. Would need someone else to pass it to me but also only on phone atm so i rather to that all once I'm back
about this replication business, if I've got a board game and the board along with the pieces that concern both players are represented with widgets, will I have trouble replicating those parts?
widgets dont seem to be too much of an issue, the command to do X with widget can just be replicated so everyone sees the action
ok sweet thanks
In case you guys still need this
OnRep is called on clients only right? anything i run in that will not run on server im assuming?
docs seem to say it will run on server as well. i cant get an auth node in the function though it seems
im using blueprints for this particular issue im having. i set a boolean on server with rep notify and when that boolean is true it updates an aspect of the ui. Im getting an assertion error i dont understand and im thinking its the server trying to do the ui function in the rep notify with a null pointer. if this is completely wrong then i need to look elsewhere but from what i can see the UI reference is being set on the clients but when it tries to update it gets the error and the variable is blank. The engine is giving me an issue where it wont let me select dedicated server or clients since the clients list is empty and all the instances of this BP on client and server are all mixed up under the dedicated server section and they all are saying client on the bp window...
its definetely the server trying to run the UI... cant get has auth node though.... http://prntscr.com/e78pij
just did an isvalid? and assume if its not valid its the server i guess. works for now.
context sensitive?
maybe because its a component? it works fine in other BPs but this is a component added to the player
wont show anywhere in graph on this component
wierd...
...
That's the one you need
๐
Just use a branch
create a macro if you need one
ok, i was looking for this http://prntscr.com/e78tz6
double click in it
oh i see
its a macro that is premade in the ACharacter... i thought it was default engine node
sorry AActor
it wont take self so i assume i have to check its parent?
first time
thanks for that
But, anyway, Get Owner is what you need
But if you have time, do some research into them
i thought they were just actors that were attached to other actors. guess i read wrong
this multiplayer UI issue im having is gonna kill me though. I moved the Use UI into a function and the use on my chests works fine but on the airship it shows to all players. I dont get it. i redid the whole thing.
Can you explain what you want to happen from start to finish?
Use paragraphs if it gets too long ๐
Or pictures ๐
i will use pictures. i failed grammar lol. gimme a few to put it all together
so on tick the function is called on client that runs a trace http://prntscr.com/e78w16
That trace checks for other pawns and chests then loops through them and sends them one at a time to the display ui function http://prntscr.com/e78w5z
The Display UI checks the tag name to decide how to spawn the UI http://prntscr.com/e78wju
If its a chest it sets a reference variable on server and client, checks if a use widget is already open and if it isnt creates one with info passed to the Widget Then breaks the loop so no more traces are done http://prntscr.com/e78wop
If its a mount it makes sure its "Walking" aka not in flying mode, sets the reference to the mount on server and client, checks if a use widget is already open and if not creates the widget with basic info passed on then breaks the loop to stop more traces http://prntscr.com/e78x29
When it traces a chest it shows the UI on the player tracing the chest only as expected
but when it traces a mount it displays the UI on every player on the server
and it isnt supposed to
What a subsystem name ๐
@dawn glen you still have that issue?
@dawn glen can, just for sanity check , change the widget class in the mount logic to the chest ui?
I just wanna know if the widget is the bad guy here
hmmm
I'm wondering about network relevancy, by design it's distance based but I'd really need something that more working in the line of sight
so I'm guessing this means server has to solve relevancy with my own code instead of using any of the unreals own code for this?
I'm now thinking of a straight on a racetrack where you need to see all cars in the straight (which can be long) but you don't have to see past the corners on both ends
for example, you can think the track is shapes like a square, so distance check wouldn't really work
I guess I could do overlapping trigger volumes that server could just use to determine which clients pawns should be able to see eachothers and only update them accordingly
@sedric@thin stratus its the same widget for both. i just call it with diferent info plugged in for name desc and instructions
Hmmm.. I guess I could just use distance at spline too.. Anyway just curious if there's nothing but distance check built in
@fierce birch Override the IsNetRelevantFor function
And add your view trace check
@dawn glen I srsly have no idea :O
Oh wait
I do maybe
This is running on tick on a character
Means it runs on all clients
Try this: In addition to the SwitchHasAuthority check , try to add a branch with something like "IsLocallyControlled"
Or simply use an is valid check on "GetController"
Cause this is null on all but local client and server
You want it to only happen on the Character of that one local client. Your current setup calls it on all instances that are on the other clients too. It's only filtering the server
No idea why that doesn't happen on the Chest thing though
@thin stratus oh, that sounds good
Just started with with ue4 networking a week ago, still figuring out things
hey. my movement is only replicated from server to clients (server doesn't see clients moving, clients only see server moving). tutorials everywhere says that it's enough to check off the 'replicated' and 'replicate movement' checkbox, but that only makes it the way it is now
am I missing something?
is ue4 replication only received/sent during Tick?
or actually, real question is, do I need to use sockets instead if I want to fire off (and receive) data from a separate thread?
I'd rather have network packets sending + receiving done at fixed interval on separate thread instead of doing it on gamethread (where everything is tied to your framerate)
I haven't checked the engine code yet but almost everything related to game logic is run in single thread
there's no new data until next tick usually
so it would make sense for ue4 to deal the replication there as well
Aye, (the new audio "engine" is on its separate thread now though?)
not related but, wondering
yeah, I'm going to multithread my physics and input, I don't want to leave networking behind after all that trouble
I just doubt any docs cover things what I'm facing now
Some tips for optimizing the performance and bandwidth usage of Actor replication.
Ahh multithreading
yeah, I'm aware of the update frequency setting
but I suspect it only works that 100Hz which it's been set by default only if the game ticks that speed
it could be more of a clamp in case someone can play the game faster than that
I'm just guessing since I haven't touched the engine code for networking + havent actually examined the traffic yet
Detailed information about how Actor properties are replicated.
Some good tidbits there too
I wonder if anyone's used the Adaptive NUF
NetUpdateFrequency indicates the maximum number of times per second that the Actor will attempt to update itself
that really sounds like it's just for clamping
@fierce birch why do you need it to update so much
You want to put it in a separate thread?
O
doing it on tick will mess up the physics
You can update on fixed
I don't want to lock the rendering
You could try messing with the physxerrorcorrection stuff
oh, I don't worry about physx now
I have physics sim aspect pretty much figured out
if I do things UE4 way in single thread, I may end up having various number of physics steps between tick on client and they are not same amount as with other clients/server
and I still get input only from tick (by default)
I can work that out, figure which physics steps had which input on clients by buffering them on servers end
but that'll mean additional delay before I can send the data to other clients/corrections
having everything going at fixed intervals would stabilize the system and require smaller delay from servers end
@thin stratus do I have an engine bug then?
Whats up with the authority of newly created player characters? I am seeing that the server still has authority over them when BeginPlay and PostLogin are called:
https://gyazo.com/56284d9d4d1d776b90a4a03fb0658335
Prints:
Server: I have authority over:PlayerCharacterBP
Server: I have authority over:PlayerCharacterBP1
Single process multiplayer is disabled, and the second print comes when the second client connects. It also prints its own I have authority over:PlayerCharacterBP1 but it seems the server thinks it has authority too at the start. Can someone clarify for me? When can I safely do client-side initialization of the character?
Does the server not have authority over the character after the start?
I believe the macro lumps autonomous proxy in with authority, though I could be wrong
Either way, I think the server should always have authority, but at the hand of the proxy the client does as well
Seems like I should be using IsLocallyControlled, not sure though
I thought the client had authority over its character?
Yes, it does, through an autonomous proxy only
The server still holds authority always though, at least I believe
With the exception being actors spawned by the client?
Well yeah, if it's not replicated then whoever spawns it has control over it
Hmm, it doesn't look like HasAuthority should return true on a proxy, I'm not quite sure why it would say it does have authority on the client
If it's spawned on the server
Do actor components have a NetCullDistanceSquared equivalent? Or are they always replicated if the actor is replicated (and the component has replication enabled)?
Hey, have any of you guys played around with dedicated servers for android games? or can point me in the direction of where I can look up how that all works with google playservices?
so someone tried it weeks ago. Search for it on here @wise depot
@thin stratus sorry i seen where you said you had no idea and didnt notice you said more. its strange because it should only be running on the client that actually gets a successful trace on the airship. The chest trace is handled in the same function as the airship.
I tried the isvalid and that didnt work, it still shows on both clients but the locally controlled branch seems to be stopping it form going to other clients.
Just makes no sense to me that the engine sends a trace and if it hits a chest it calls DisplayUseUI on that client only. that function if its a chest shows the exact same ui for the chest as the airship, if it traces nothing it should terminate in about 4 different places long before it ever displays the airship UI.
Well that's because you don't understand what is happening
ClientA and B have a Pawn/Character, right?
Both of these are replicated and exist on each other
- the Server
Means in a Setup of Server and two Clients we have 3 instances of client As pawn and 3 instances of client Bs pawn
Let's concentrate on client As pawn
You filter with Switch Has Authority
That calls Remote for the Pawn on Client As game and the replicated copy on client Bs game
(not on client Bs pawn!)
That means the trace fires two times
The trace IS hitting twice as the replicated pawn of ClientA in the Game of clientB is also looking at the mount
Using locally controlled makes sure the replicated copy of PawnA in client Bs game is also getting filtered
@dawn glen
ok, so if player A traces the airship it runs the Trace code on all clients not just his own
then why does the chest not do the same?
That is something i don't know
But you could simply print the displayname of the pawn the trace happens in
And see if it traces one or two times
so anything i do with UI i need to check if locally controlled
Technically yes
that is SOP
You wouldn't need to if it was in the PlayerController
As that one only exists on Server and owning client
But then again that's no reason to move logic to it which should go into the pawn
just seems wierd if it creates the widget on the player controller and pawn b doesnt have one in pawn a's client yet it somehow is valid and displays the ui on pawn b
not only that but sends the ui somehow from client to client
Why wouldn't it? The you never did GetController
It's not sending from client to client
The whole trace etc happens on the clientB too
i get controller 0
Yeah but that's a local call
and when client b traces it should trace from his location forward where there is no airship
No
Get into the mindset that it's not client bs pawn
It's the replicated clone of client as pawn
so should i check locally controlled all the way back at the start so that the traces arent happening on 100 clients later on if i have that many?
Correct
wow, i knew that other players in my client were replicated pawns but i didnt think their code ran on my client also unless that was sent to the server and back to me....
so since ALL my stuff is supposed to be on the client's own pawn i need to check locally controlled at the start of everything to save processing.... right down to updating the stats in the main hud...
and instead of Has Auth should i be using a branch with isDedicatedServer instead?
Hm no, authority just checks if you are on the server or client version of it
Authority calls for ListenServer and DedicatedServer
i wont be allowing listen servers
The it doesn't really matter
The code will never execute on the server as long as you use remote
After remote you just need to further filter the other clients
ok, it sort of makes sense, thanks Exi. i will have to divide my stuff up between what i want to run only on my client owned pawn and what i want to allow run on replicated pawns on my client. I suppose its done this way to avoid lag?
No it's just that each pawn or actor in general calls the event tick
Doesn't directly have something to do with replication
so maybe i should move my stuff off tick and onto a timer
Timers are OP
Well you would start the timer with what?
But it might not solve your issue
:P BeginPlay?
from begin play
You might have some logic bug
@dawn glen Surprise, guess what each Actor calls
๐
You don't get around filtering the call with locally controlled
i guess when a player comes into replication range on my client it will run begin play... damnit
?
ok, i gotcha
yeah sadly
Maybe, but no one really reads that whoel thing ๐
-_-
they skim
@wary willowpssr
oh, that's your compendium. read over half of it today
You gotta read it all
honestly.... i skimmed it... stopped where there was something new to me but this was likely under a header i thought i knew everything about lol
Or I win
Yeah, it's not really meant to be read from start to finish
Or if that's the intention, then...
Well it's technically not "new"
Pawns that are replicated and spawned by the server
Get created on everyone
After that they naturally call begin play, tick, end play etc
have to read it more thoroughly
@thin stratus In Comp2.0 can you have a quiz at the end of each section?
Sure (:
You teach right?
Ehm
So you should know
make ue4 networking only work if you get a success code from it lol
What gets "student's" attention"
so people have to pass to use networking
i kid
lo
I will think about it
Won't be any 2.0 in awhile though
Busy with projects and freelancing
quick question: the server won't read the player's input axis values, they are always 0 on the server. how is that supposed to be done?
Woot
Input is local
You RPC it over to the server
Pass it with a float input
Shouldn't be hard (:
aah, let me try
(it worked, thanks and GN)
Bit of a design question I'm tackling here. At the moment, things like attaching a weapon to a player, or attaching a player to a seat is handled by a multicast to let alll current clients perform the event, and a rep notify to let players know if they connect after the event. Is this the way to do things? I was considering changing it so that a newly connected player receives a reliable RPC with all the information they need to know when they first connect instead of leaving it to individual rep notifies
if your weapons are actors i'm pretty sure attachments are networked by default
what i did though is override SetOwner to attach to the new owner if there is one and detach from the old one. there's an onrep for the owner you can also override for client side
Anyone have any idea why this might be happening? https://youtu.be/peeHP1veW9A
when a player hits F it triggers a trace and checks if its a instanced foliage mesh component. it then loops through an array of structs and checks against mesh http://prntscr.com/e7o4v2
When it finds a match it stops the loop and sends the needed information to the server. The server then executes a multicast event to remove the instance of the foliage. This is working it seems as intended. I get one print for the server and one per client saying Foliage Removed. Then on the server it spawns the actor which only atm has a destructable mesh on it. After a couple seconds (for testing), it applies a force and breaks.
http://prntscr.com/e7o5j6
http://prntscr.com/e7o3zi
The wierd issue is that if on dedicated server the actor flashes wierd and the mesh destructs wierd (sometimes the debris flys around like being caught in a dust devil). If i run as listen server and client the server sees it how it should look and the client gets the wierd flashing actor and destruct. This is set up for a rock and a tree type. The trees are working 100%. They remove the instance, tree falls and after 15 seconds is destroyed. The rock uses the exact same setup but doesnt work right on clients.
This video shows the trees working fine. https://youtu.be/IS5x_NQ0Yqk
do you still need to download steam sdk and move dll's into unreal in 4.13? or does enabling the steam plugin do that
@true peak Try it :P
AdvancedIdentityLog:Warning: GetUserAccount Failed to get the account!
any ideas?
@dawn glen First thing is: I assume that StoneBP is replicated?
That calls BeginPlay on every version of it
So there is no need to use a server rpc and then a multicast
You can do directly hook up the logic of explode with beginplan
The other thing is: The actor you spawn when you found the correct staticmesh. I would make it non replicated and spawn it inside the multicast when you remove the instance of the mesh. That makes sure that the mesh is remove at the same time that the actor is spawned. Otherwise you spawn the actor inside of the stone which might cause z fighting
Everyone would spawn their own local tree/stone and simulate the destruction themselves. After all it's a visual feature. Nothing that the server needs authority over
Hey everyone, I'm fairly confident when it comes to using blueprints in UE4, however I am still lacking when it comes to multiplayer. I've done quite a bit of research already but I still don't quite fully understand it. Is anyone here willing to mentor me for a bit and maybe provide some examples so that I can understand it a bit better?
Have you read my compendium?
I'm not in reach of it as my server is off and I'm not home but maybe someone can upload it here agaib
I have not. Would be grateful if someone could post it here ๐
Looking at the pinned posts if anyone has the example projects as well that would be great!
Thanks
@thin stratus i tried multicasting it in that first. I want the object to be multicast because eventually it will have values like how much stone or wood in in it. How much it left of multiple players hit it.
when i multicast spawn it did same thing, if i shut off replicated would it still work? just run replicated variables instead?
when i do it this way also when a new client connects the old foliage is back on his client which it shouldnt be and it gives a ghost collision. He gets stalled on it like it collides then server says you didnt collide and he jumps to the other side.
maybe i will just use actors for harvestable nodes
if you don't want to use actors you'll have to push a full update to the player when they join
Anyone know whats required to use the tear off functionality? I want an actor to replicate once and then become owned by each client. bTearOff seems to be related but not sure how it should be used
Can anyone help me out here, it seems like there might be some networking stuff going on. I have a level with some placed blueprint actors. When i preview the level with my editor, no problem. When I launch the level with my menu system(using a simple Load Level node) my placed actor double spawns. 1 copy that works, and one that doesnt
ive tried ticking off replication everywhere
no luck
@native moth Go to play settings, untick "auto-connect to server"
Stupid question: I'm trying to figure out how the pattern for handling win conditions work. My current idea is to start with the obvious, that the GM, after figuring out the win condition is satisfied, multicasts an event on the GS and then both clients & server each react however they need to. Is there a better way of going about it or am I trying to reinvent the whell here?
@versed socket hm sounds fine
There is a gamestate system in place but that's more for engine intern handling
Afaik
Can anyone help me out with simple respawn system for multiplayer game in C++?
I currently use something like this
AMinigolfBall* OldMinigolfBall = Cast<AMinigolfBall>(GetPawn());
if (OldMinigolfBall != NULL)
OldMinigolfBall->Destroy();
GetWorld()->GetAuthGameMode()->RestartPlayer(this);