#multiplayer
1 messages ยท Page 410 of 1
if you scrolled somewhat slowly, just enough so you see what weapon you scrolled to
I've been using similar code for the inventory too, equipping/unequipping items, etc, also using items, and several other weapon interactions
as opposed to having it memorized
Works well enough
wouldn't that make the animation choppy as well?
It sure does. I was just confused by your reload code
Blending fixes that, unless you're thinking of something else
I mean if you scroll fast
And the server really has to at some point say "Yo, this is wrong, here is the real update."
Then you'll face a correction anyway
The other idea is to just save the last x swap events and when the Server comes back with the updates and reapply them and make sure you end up at the same weapon
Cause if you scrolled through 10 weapons and the Server comes back at weapon 9 when reapplying it, then the server probably has some reason for that
Hmm
Well, it's food for thought
At some point I probably want to rewrite a few things, might look into it then
It's basically the ClientPrediction and Reconciliation from Movement code applied to a fast weapon switch
@cinder brook - both USkeletalMeshComponent and UStaticMeshComponent are children (a few tiers down) of USceneComponent.... which has function GetSocketLocation() and a few other getters for sockets.... check the API - they pass down to children class archetypes due to inheritence.
https://api.unrealengine.com/INT/API/Runtime/Engine/Components/USceneComponent/index.html
A SceneComponent has a transform and supports attachment, but has no rendering or collision capabilities.
has anyone used UE4 with AWS and Steam?
tons of people have
any idea how to utilize the steam subsystem on an AWS ded server? doesn't work by default
anything steam related with Dedicated Servers - requires your project to be Steam Direct - which replaced Steam GreenLight service.
you can test dedicated servers offline/outside of steam - but to test steam implementation - requires Direct
100$ to set this up.
already bought it, got the steam ID, we've been uploading the build for testing and have tested it through steam directly
ded servers work, everything else works
but we can't get steam usernames anymore, VOIP doesn't work, anything else related to steam doesn't work
what are your INI settings for your game with AWS integrated?
specifically AWS & Steam related
sec
@cinder brook - why would the server not render models - and anything socket related has to do with teh skeleton/staticmesh - not rendering..... it would be tied to the .uasset file associated to the skele/mesh
are you sure you're not typo'ing the socket name somehow? its case sensite
sensitive
@unique thunder - what method of AWS integration are you using?
C++ SDK or a plugin?
and do you have any .ini setup for AWS ?
@worthy wasp A plugin, no .ini setup for AWS
ai already placed in the level, are they owned by the server
or would they be individual copies on each client?
AI Controllers do not replicate by default
So, no copies unless you turn Replicates on, and OnlyRelevantToOwner off
can i have some basics to UE networking?
give Cedric's network compendium a read, it covers most the basics
pinned on this channel
Hey @winged badger
In the documentation netmulticast is defined as written :
"Multicast RPCs are designed to be called from the server, and then executed on the server as well as all currently connected clients."
So the relevancy isn't taken in count.
In my case, I have a very small relevancy and the multicast is opered on all connected players whatever are their relevancy
I don't understand
the object wont exist on non-relevant clients
I will retry
is this by chance a map-placed actor?
map-placed ?
They are spawn at different spawns yes
But the map is huge
I test a new thing and I come back if I have found a solution
I have a progress bar and with a funtion in the character im setting the percent but when i do it in Single player mode its working but when i do it with 2 players the bar doesnt work how is that possible
Can it be that the target has to be set as the get player?
set percentage
I have a function thats called modify stats and there is a function called Udate stats
update stats
do i need to set it to Multicast?
The update from the regeneration of health is working but not the update of the Healthbar
You can also create a custom event for owning client
Called only for the replicated client
so like a have num - and call custom event that calls the Modify stats?
Each time you update the variable
Or if you want, you can replicate the variable
or the update stats of the bars
so i update it on the own client now but it still doenst work
And i cant Replicate the variable because its a map
You try to call a function which only work when called on server
The health is normally only on server
stat*
So you need to notify to the client that a entry of your map has changed.
Where exactly does the engine pick which subsystem to initialize?
I am getting OSS null when I shouldn't be, trying to figure out what's going wrong
should be FOnlineSubsystemModule::LoadDefaultSubsystem
it attempts to load the default system specified in the ini and if it cant, loads null
Thank you
Hello guys, i want replicate this part of my climbing BP
So i made this to replicate it
= when i check the didecated server: the characters doesnt grab the ledge, but they play the"Grab ledge animation and they freeze as wanted, but not graping ledge, the charcter just plays the animation Montage fine and replicated to players and fine when it faces the desired "ledge location + hieght" but the character falls to the ground just as if the charcter is just jumping
= mean while when i uncheck the dedicated server: the charcters actually "grab the ledge" which is goood and plays the animation,but they doesnt get and climb the ledge , the animation plays locally but not to the server eventhough i replicated the variables
This is the "Climbing Up ledge"
And this is how i tried to replicate that "Climbing up"
This is how i grap the ledge ( the button )
can someone tell me what i did wrong on my (Replicate photos)
the climbing ledge on its own is working "as a single player" just trying to replicate it
Hello, before I used Network emulator toolkit but I can't use it anymore. I create and add a filter, I create link, with default parameter and I launch it but it block all connection. I missed something? I use it with windows 10 updated. Which tool you use for simulate network and latency ?
Clumsy @teal flint
how can I align my capsule with my character?
if I move the character the capsule stays
no matter what I try the capsule component stays down
replicating physics-based projectiles seems to be too heavy, too many physics ops. should I run the projectile locally and then replicate the hit event only?
of course
Im stil working on the health regeneration part but i dont get it because i get the right value only the Percent of the Progressbar will not be updated
Second Question the Stats Regeneration must that be handled on the server or client?
What is the proper way to have an anim notify 'hit' event to replicate - on AI? The notify casts from the AnimBP to the ActorBP. I've tried numerous Run on Server/Client/Multicast and it is not working in a packaged game but works in the editor.
@ripe hound if they are visible to the player real time, both
with server providing an occasional correction to keep things in line
oke so i can use multi cast?
replicated variable is fine
well its a map so i cant repllicated the variable
thats the problem im trying it to solve it with the map
@winged badger Can you maybee help me with the Prgressbar part
best guess, its the wrong progressbar
well the strange part is if i do it on Dedicated 1 client it works only more it doesnt
this is the 1 client dedicated
on top is the 2 clients
well, you do need a reference to the correct progressbar for that to work
But if im right it is because i have it working with 1 client so the reference is right
And if i look good the Values are also Correct into the bars
hmm, you haven't used any GetPlayerCharacter[0] or GetPlayerController[0] server side, did you?
I have a pawn controlled with a controller, typical WASD for a top down space ship. The keys will call the server side event to rotate and move the pawn on the server side so that everyone sees it. Other clients will see it, however, the client that is sending the keys, doesn't see anything. any idea why?
what creates the widget?
and its saved how?
variable may widget after if its valid
show me, all the way till it makes it into that struct
oke
@static lynx your movement component is likely not replicating stuff to owner, and you're using one that has no built in simulation
add a Branch with condition IsLocallyControlled to the start of that BeginPlay
BeginPlay executes on all clients and server
which means both client 1 and client 2 local copies of their Characters create that widget
and add it to Viewport
@winged badger weird, I have replication on for everything, so I'm not sure why it wouldn't be working.
which movement component?
and as you did not set the OwningPlayer (good practice to toss in your controller in there always)
i'd wager you have 2 widgets on screen, the wrong one ontop
CharacterMovement, thinking about changing it.
I don't see ship rotation my screen, but I do on other clients
@winged badger its working now thx ๐
and anim BP is dependant on Velocity?
its also a good practice to let your HUD class juggle all ingame widgets (i still prefer GI for menus), often prevents accidents of this type
Also, is it better practice to send the inputs to the server and let the server move the pawn? Or best to put the inputs to the pawn on the client, and let it replicate from there?
I have a top down space shooter
so I just need to do Ship Rotation on one axis, and forward vector movements
and vanilla approach is InputAxis -> Multiply by ForwardVector -> AddMovementInput
Oh I can do that, I'm just wondering how to do it
Should I do it
- Client presses key -> Server receives Key event -> Server rotates/moves pawn
or - Client Presses key -> Client rotates/moves pawn -> Client replicates data across network with replicates bool
sorry, its 2am, and CMC is not a light subject ๐
I am getting "An error occurred (FleetCapacityExceededException) when calling the CreateGameSession operation (reached max retries: 4): No available process."
when trying to run a create game session command for local gamelift
any idea what may be causing that?
@grand kestrel Thanks a lot
The Replication Graph Plugin provides a replication system optimized for games with large Actor and player counts. The system works by building a series of customized nodes that can centralize data and computation. These nodes persist across multiple frames and can be shared by client connections, cutting down on redundant CPU work and enabling Actors to be grouped together in nodes based on game-specific update rules. We may make changes to the API, so this is considered Experimental in 4.20, but it is in use in Fortnite Battle Royale and it will be a fully supported feature.```
How useful is this feature?
I have read the documentation written and looked through the ShooterGame example. However, I am unsure how much this feature is needed, and when it should be used.
Doubtful ShooterGame uses it ?
well, they made the feature for fortnite, so presumably its useful for similar game types
wouldnt have bothered if there was no need
@bitter oriole They made an announcement that they created an example in ShooterGame
It's called ShooterGameReplicationGraph.cpp I believe it is inside of /Online/Public
what kind of objects is it used for in the example? the regular characters?
@manic pine https://www.twitch.tv/videos/286656883
They made a live stream. Skip to 14:50
hmm so its kinda like group-based net relevancy?
instead of checking hundreds/thousands of actors for net relevancy individually, sort them into a group and perform one check?
The description reads like "Blueprint-based net relevancy on steroids"
If that's what it is, it's probably not useful for everyone
is it possible to save online coop game, so that whoever played can continue from the same spot later ?
(using Blueprints, no C++)
Saving is pretty much entirely up to you, so yeah
Just implement it like you would implement it or a single-player game
When you quit the session, save, ignore the other players, and you're good to go
but how does it all get synced up when new session is started and clients join server ? (unless it's all done by UE4 under the hood and I don't need to worry about that)
I don't think UE4 has any high-level saving
It's you who decide what to save, where, when, how
If you're asking about the game design aspect, well, the player to start a session would be the one deciding the save to use
First player to join for a dedicated server, I guess ? But that's really up to you
I don't really want to deal with dedicated servers.. Probably will be a listen server.
so, I assume whoever was server initially has to be sever until the game is beat ?
You can look into how Borderlands 2 did it
Every player has his own save and progress, and friends can join him
When you start a game, you load your current save, when friends join, they just join, wherever you are
Their own game save is unaffected, save for character progression - they still level up while playing with you
When they exit, they can just keep playing their own save (though their character might be stronger now)
I see.. I guess I am just gonna have to experiment
Im struggling with MP integration right now too, your not alone ๐
I am still on the fence about MP
I don't like MP (and got no time playing MP anyway), but I know it's a good promotional tool as Twitch / YouTube streamers love playing MP games.
The Borderlands-style, Destiny style save sharing I described is what i'm doing for my next game. Basically solo, but friends can join you, and some activites are hard enough to make it useful, game progress separate from character progress
is there any difference between saving in SP game and saving in MP game (Destiny-style) from coding (Blueprints) perspective ?
no
Not really, no.
Especially with a listen server
Basically the same as single player except you maybe won't save the other players
trying to figure out if there is an event called on a client once the player joined the game. Can someone point to it?
I found in game mode has OnPostLogin, but that is on the server
nothing specific that i know of, but there's a number of general events and functions fired related to joining a game
for instance playercontroller's beginplay
lots of repnotifies... some static uworld events
Notify(Server)WorldLoaded might work for you
as far as I know, beginplay on a player controller is not the safest place to start calling RPCs...
server-> client no, client->server is fine
right, hm... still can't figure out what I can use on a client. Basically what I need I need to pass some data from the server to the client upon map loaded (on client)
map's begin play may be? Is it save to say that a client is connected and ready to go?
im not a fan of ->client rpcs, usually more sensible to use a replicated var with repnotify
if this is client-unique data you could put a replicated var in controller/playerstate/pawn
if its data for everyone, gamestate
technically it is an array of structs that I need to pass to the connected client. hm... In a variable I can say to sync initially: Initial only. Will that be called every time when a client connected?
yeah, on the initial bunch
which is when the actor channel opens for the first time
though if it loses relevancy and then becomes relevant again, it'll be resent, of course
hm... it must be relevant all the time
I will put it into actor that is always relevant
well, you can make a replicated actor to do whatever you want, but playerstate/gamestate are always relevant
right
as is the playercontroller for a specific player
all right, thanks so much. I think I will try with a variable to start.
Actually, one sec: here is an idea
what if I receive on rep notify for whatever variable - that can signal that replication is opened and I can start query server for the data.
Thing is that I want to compress that data before sending.
that array might be a lengthy one, but compressed it is very small.
does the client have some say in how its compressed?
no, I can zip on fly, and client will unzip it.
then you dont really need to query server for it ye
it is a dynamic array of hit events to recreate a dynamic mesh (surface) for my voxel world. So new clients will recreate it, but I need that data.
so the best would be push that data once a player connected, but zip it before sending, as it might be a lot of elements.
after that I can receive just updates
yah, im just saying; unless there's some information the client has that the server needs, then this should be a one-way communication line ye?
yes
you can also look into delta serialization arrays
server -> client
which lets you be notified when an array changes
it replicates additions and removals from an array
unlike the regular array which is all or nothing
Is it UE4 feature?
ye
Cool. I did not know that. I will take a look! Thanks
so i have a simple projectile that replicates, except for the timeline inside it that controls deceleration. is there something fancy i might be missing?
i dont think the timeline has to be replicated because it should be the same every time, so if the server spawns the projectile, shouldnt it work?
I'm using blueprints. Whats the best way to replicate movement of a pawn?
Should I just use the built in replication bool options?
Or should I send my controller inputs to the server and let the server update the movement for everyone at the same time?
use built in character replication
ok, so don't send the keys? thanks!
Is anyway familiar with the Behaviour tree/move to replication issue that maybe help me ?
We do have a pawn with a AI controler, and while senses, animation and everything works, the AI moves only for the server, while the client doesn't seems movement.
anyone*
sorry
Ok, weird thing... I just made a test, running a server and a client, and the AI moves efectively for the client player, BUT ONLY if the server player is looking at tha AI...
Anyone experienced this?
Anyone?
@winged badger A little bit. Tried to make the movement always relevant
but I don't know which one should be, the Controler, the pawn... I am lost tbh
what you describe usually means net relevancy problem
want a screenshot of the setting ?
aha...
any idea where I should try to start shooting at ?
you didn't touch the AActor::IsNetRelevantFor ?
we are using BP so far
first check if replication works fine in one of 2 cases
near the place client first spawned
or near 0,0,0
or just near server Pawn
if your PlayerController is not directly possessing the Pawn
then you have extra considerations
The player controles is asigned as default on the player.
and the AI controler is also asigned into this pawn, we don't change controllers on construction or beginplay, as far as I know
let me check anyway just in case in this iteration there is any changes.
this pawn being the AI controlled NPC?
er.. yes
sorry ZLO I am not english native speaker, so I sometimes tend to express myself as a potato.
This is the only thing we do in the AI controlled pawn, we just check for posession. But this will be deprecated soon.
but by default, and AI controller is set on the configuration
I promiss is not a zombie game! this is just a multiplayer stress test.
๐
inb4 "another zombie game!" hahaha
i have zombies in mine, they serve their purpose
Yeah, for basic AI and multiplayer testing, they are pretty okay.
sometime funny to shoot yeah Hahaha
ok im going bonkers here. i have my projectile replicating but the timeline isnt going. ive seen a few people say they can get out of sync and get jittery, but mines just not going.
i dont think the actual timeline has to be replicated since it should be the same for each projectile (and it would be tricky cuz its fast)
The time should be updating a variable, and that variable should be set on server, and replicated.
I believe @steady briar
oof... not the time... the timeline.
honestly i thought that would be unnecessary. might be right im not trying to argue but... does it actually have to be replicated?
replicating movement people say is a bad idea because of jittering for fast moving things like that
Whenever is a variable that needs to be seen by all players, yes.
like, when the projectile fires everyone knows its speed and direction. couldnt they also be aware of the timeline and adjust it per client?
like its predictable i mean
well its a projectile so it just needs to know if/what it hits
deceleration, eventually will have damage scaling too
projectile is actor?
ya
I am almost sure you can do decceleration without the need of the timeline.
but not an expert into that matter.
and timeline is inside it? beginplay?
well ive been plugging some stuff in so its a bit ugly but...
this is the projectile bp. might be a lot of clutter... i tend to do that when i run out of ideas and start googling
@steady briar just let the projectile actor run the timeline on beginplay
you have to spawn it everywhere
anyways
RPCs for this are just... redundant
ya it used to have nothing whatsoever
most of this bp does absolutely nothing
without anything replicated in the projectile, it worked the same because its a replicated event from the character
i just wasnt sure why the timeline wasnt working so i did my usual spam a bunch of garbage in a bp and see if anything happens
as soon as server spawns a replicated actor
clients will too
and they will all run their Tick and BeginPlay separately
use it
u mean like this? cut out the junk functions at the top?
also if i set the projectile itself to Replicates it just explodes and doesnt move from spawn. supposed to ignore pawn so i dunno what thats about
Is the projectile being spawned by the server ?
it does need the initial velocity
this is in character at the end
its ugly im organizing <_< but i do what Zlo helped me with a while ago with a rock o.O
thats bad
everyone sees the same projectile, direction and all (i have a random aim offset thing to check)
everythings bad T_T
Canada?
this getplayercharacter(index) should be banned
might as well
ya i plugged that in just out of curiosity
it didnt seem to change anything though
but it will either always return the listen server host, or in case of dedicated server, first client that logged in
i have spaces here for doing tests/checks i dont have yet (has ammo etc)
ill have to pass through a character reference through those functions for instigator
hint:
delete all?
have a function Fire() and function CanFire()
preferably both on your character and on your weapon
Character::Fire() calls Weapon->Fire()
character CanFire() checks for stuff that he has a weapon, is not dead, basically stuff in character scope
weapon CanFire() checks for ammo, weapon not jammer, etc
Character's CanFire() does its own check and ANDs the result with Weapon's CanFire()
ya thats eventually the plan. currently i was just trying to test the projectile itself. i wanted it to work properly so when i add the other stuff and something breaks i know its before the projectile
yeah, that rarely works out that way
the bomb tutorial seems to be pretty good about that
once you are neck deep in clutter, you're pretty much doomed
i am clutter T_T
but... still unsure why timeline isnt going. the checks and stuff shouldnt be related right?
@winged badger I think I tried so far all combinations of relevancy with no luck.
๐ฆ
does your BT execute when server's Pawn is not around
might not me a networking issue at all, just a buggy decorator
hey, are there any differences between a local client and a remote one besides ping and packet loss etc?
i have a bug that's probably network related that i can't reproduce locally, even if i launch 2 separate instances of my game
and even if i simulate lag
Explain the bug
@hasty adder i'm not sure what the exact bug is since i can't replicate it
and it's hard to explain what happens without explaining the whole game
but i guess i'll try
i'm making a racing game
when you load a map, you start as spectator and have to spawn manually
and being a racing game, the game records lap times etc
so the problem is when a client joins a server and spawns before the host, the game doesn't record lap times for that client
if the host spawns before the client, everything is fine
and i'm sure this is just a bug of my own fault
it's just that i can't find it because i can't replicate it locally
why cant i drag and drop MotionControllerPawn.uasset from my vr porject into my 3rd / 1st person project???
i need to make my game VR mode
did you drag it into the content folder using explorer?
@small temple any AlwaysLoaded streaming levels around?
sublevel, basically
(i had a very similar experience and in the end it was an engine bug, when client finishes loading first any sublevels set to AlwaysLoaded were not set as Visible to that client)
it also involved SeamlessTravel
ah, my clients definitely aren't loading first here
unless my playtesters are really super quick lol
but yeah i'm not using any form of level streaming at the moment so i doubt that's it
nod
how do you record lap times?
the client sends them to the server which then broadcasts them back
if you added a second client
would it stop recording for both the client1 and server?
well, i wouldn't know because i can't replicate this bug locally
(would indicate you forgot to check for IsLocallyControlled on BeginPlay)
and ran the same logic on whoever spawns last
on every copy of the PlayerPawn on every connected machine
basically "overwriting" the logic that recorded lap times prior
sideeffects may include few "No owning connection for" output log lines
but that depends on the setup
it's possible but i doubt that's it considering everything works fine normally
but my question is: why would this only happen with a remote client?
i just tested a client with 1000 ms lag (in a config file so applies before joining the server) and it still worked fine btw
how is that different from testing with my friends who live a country away?
i do not think this is in any way related to lag
unless you show me how it records the lap times
and i don't mean the actual bug, because that could be a bunch of things, like your example
there are too many variations to guess
for the bug, yes
but the bug isn't the issue ๐
the issue is that i can't replicate it locally for some reason
ofc its an issue
Pie acts different
ok, and the issue appears in shipping?
development, not shipping
you're running 2 games on same machine? steam involved?
not enough information for me then ๐ฆ
just ask if you want more ๐
over lan on the same machine, yeah
yeah
I'm not sure with fake latency you will get the same results like you'd want. Would have to know how lag simulates. Rpc events may be happening instantly still not giving you the bug
Both client and host simulating the lag?
only client
i can try with both lagging but i don't see how that would make a difference
just tried with 1s lag on both ends, still works fine lol
im losing my hairline because of this one maybe someone can help me but I placed my thirdperson guy in the world, but when I click play, he stays there and im able to move around in another 3rd person guy but he wont show up on edit mode
it sounds like you're in over your head a bit @halcyon totem
yes
the damn instructor was confusing
also he spent 10 minutes doing something wrong
following a multiplayer tutorial?
I'm having a really odd issue
For some reason on the server's screen the client pawn is much larger
๐ค
you mean the server's pawn is much smaller on the server's screen @elder crypt
are you messing with the scale anywhere?
then i have no idea, sorry
so when playing in editor how do you grab your local playercontroller instead of using index 0?
if you are on your local client, playercontroller at index 0 is always you
if you are on the server, you can't be sure who it's going to be
so, like, if you are doing things like UI or HUD work, getting player controller 0 is totally kosher
Yeah that's what i've been doing it's just a pain to run the game outside of the editor to test it
was wondering if there was a way around that
use your context
if you are in a pawn blueprint, then you have a controller available through getcontroller
if you are in your hud/umg, you (should) have it available through owner/owningcontroller/owningpawn
these global static functions are terrible
ahh that worked thanks @manic pine
I would sure love some feedback on my approach here. I have a Golf game w/ replication I've been trying to sort out. My ball is a pawn, the client calculates the speed and angle then sends it to the server to add the physical velocity. After that is calculate, I call a multicast to project the ball movement to all clients. Is this even close to a good approach here? I can't get it to work but I think it's a client side issue in my calculation logic.
Just to add, my current issue is each client can hit but the pawn doesn't move however the server does calculate and cast the ball movement to everyone else
@jovial ravine I'm not that experiend with MP yet, it's still a pain in the ass for me, but from logic side, if it's MP game, then why would you do calculation on client and send it to server?
From avoiding cheating part at least I would do oposite, would do calculation on server side and then just send resoults to client. But maybe I'm wrong and someone will correct me
It's like in shooter games, where damage is calculated on server side and then resoult passed to client
I have gone back and forth internally myself on this one but I settled on let the client determine the parameters but leave the actual application of force up to the server. I always remember the words "never trust the client"... I'm not convinced what I'm doing is even remotely best practice though!
I am just struggling with this simple concept and at this point, the only one that sees ball movement is the server so obviously I'm not doing the multicast correctly at the moment
I would try to run calculation on server and then multicast resoult to clients. It would be safer and would help with replication too. Now I'm not at PC so can't test it, but it will be easier to multicast too.
Also you can check if any of your variables don't give you these problem, try to set them to replicate
Is your ball even set to replicated and replicated on movement?
I double checked my variables and pawn, all set to replicate.. I'm guessing I am not doing the SetWorldLocationAndRotation right on the multicast... as I said, the server sees everyone moving.. the clients don't see the movement even though they initiated it.
So everything works how it should be on server side?
correct
Ok, then check with print string your multicast resoults just to check if it multicast calcolation or not
*calculation
And then let me know. Becouse at the moment I have a feeling that it replicates calculation as it should be
yeah, it's showing the replicated #'s on all clients... it's just like the client doesn't actually do anything with it
Ok. That's what I tought
Are you sure thet BP is replicated? Not your static mesh or what ever you're using but your BP? And it's also replicated on movement?
These part
yes sir...all checked
Hm, then I need to think a bit
I may have it.. I was using my SetWorldLocationandRotation on the sceneroot and not the ball itself
im testing that now
that seems to be it, now I have other problems but at least the balls are moving on all clients!
Thank you @dusty halo for your time!
@jovial ravine np. Mp is a pain in the ass ๐ that's what I usually do, when I have no clue what's not working, I check what is working
yes it is..even for a simple rolling ball
If there is anything else I can help you with, let me know, will try to help
I appreciate your time sir
Hey guys, I have problem, I have create code in the blueprint of map, when overlap trigger spawn AI NPC, but when run with dedicated server (client) the NPC spawn and after few second auto-destroy actor....why? Destroy only for client, in the SERVER the NPC work...can help me? tk
@winged badger Hi, Sorry for the time I needed for an answer. The AI moves if the server is watching them, or maybe close not sure. But We can see the AI moving on the client if the server's pawn is around, yeah.
@zinc crater for me man?
Hey, no. ๐ As you can see @winged badger is nominated in the comment. ๐
ah ok! can help me for me problem?
hmm... let me see how we do it. I am not the main programer, so...
give me some time and I'll chek it, I think we are spawning actors in MP no problem.
anyway, you're spawning at 0,0,0 have you seen if the character teleports to 0,0,0 when is server validated, just in case...
it's being destroyed for sure ?
I just checked our code, and it looks like yours. It's an execute on server.
So try this.
OnOverlap call a custom event
and on that custom event, try to execute on server directly.
and I am sorry if I can't help you man.
just forget that, is just an example
is the closests one I had now...
what matter is that this custom event executes on server
not work...
Maybeit's a silly question. Is the actor you're spawning a proper AI ?
When I'm saving player's data to a database, how should I handle the player ID? Their steam ID?
@cedar galleon
Try this way...
You should call a custom event that calls another depending on authority
So if it has authority, calls a custom event that is ALLWAYS RELIABLE and executes on server
and that custom event calls another custom event that executes an all
That third one (Tell clients) is the one that must do the proper spawn AI
While if it's remote (a client) just "Asks the server" if he can spawn (in my case a particle)
sorry if that doesn't works I am out of ideas... but at least tried... ๐ฆ
so everyone can see my projectile, with none of it being set to replicate. if i set it to replicate it spawns 2 and they immediately impact eachother. is that weird?
@zinc crater not work...
Sorry @cedar galleon I tried what I could. Your problem may not be a replication problem then.
should a projectile spawning be multicast or run on server? both seem to have the same result, visually. same prints i need to figure out whats wrong with those too but thats later
and things like damage should be done on the server, things like explosion/visuals should be multicast for all to see, right? O.o
Is there a way to replicate an actor or component just for the server and one specific player ?
is it possible for one component too ?
jea i find it just in the actor defaults but not in a component defaults
ookay But good to know ๐
Okay another question: Can i replicate a actor for two players and the server?
Like so it is the same actor for players in range ?
Okay if i get out of the replication range and the server spawns a component and than i return again in the range what happens ?
Does anyone know how to fix the issue I posted above?
i've never seen it, what did you send with the login request?
which net driver?
Okay if i get out of the replication range and the server spawns a component and than i return again in the range what happens ?
You know, between now and back when you asked this the first time, you could have simply tested what happens
- DM people randomly for help is against the rules
There are rules to ask people for help? thats **** man
and jeah i tested it and it stoped replicating but sometimes its starts again
and sometimes doesn't start
tested 142 times
DMing randomly is the part of the rule that is important
oh okay than it wasn't random
i asked him
@thin stratus You know, u could just help me instead of telling me that
well, you want to know what's going on exactly
type in log lognet veryverbose in your console
and read ^^
(the logs)
:P It was totaly random. I wasn't even part of any discussion here.
there was no discussion anywhere
i just asked you cause u helped me already and i know u have a big knowledge about it
some people do this for a living @next falcon, and when i pull 12 hour day sure, i'll help a bit when i look at discord, but as long as it doesn't take my attention from the work i do
giving you a piece of information that will point you in the right direction can be enough
i personally don't like when people prod me directly just because i helped them abit prior
and i imagine its the same for Cedric
Just pls help me
I need just a bit of information
and if i pm someone than it has nothing to do with this server or the rules here
try the multiplayer content example, there are really great treasure chests in it
then ask a very specific question here, something i can answer inside a minute if i know the answer off the top of my head
Okay if i get out of the replication range and the server spawns a component and than i return again in the range what happens ?
it should use its NetOwners relevancy setting to decide if it should start replicating again
it is always relevant
then there should be no change whatsoever if it leaves the range or enters back in it
Okay and what relevency need it so it replicates if i get closer
default ones, maybe adjusting the NetCullDistanceSquared to something that suits you better
default being 15000^2
i have a int (replicated) that every tick increases if i am close to it it gets replicated but if i move back its Not and if i move closer it stays unreplicated ?
bool AActor::IsNetRelevantFor(const AActor* RealViewer, const AActor* ViewTarget, const FVector& SrcLocation) const
{
if (bAlwaysRelevant || IsOwnedBy(ViewTarget) || IsOwnedBy(RealViewer) || this == ViewTarget || ViewTarget == Instigator)
{
return true;
}
else if ( bNetUseOwnerRelevancy && Owner)
{
return Owner->IsNetRelevantFor(RealViewer, ViewTarget, SrcLocation);
}
else if ( bOnlyRelevantToOwner )
{
return false;
}
else if ( RootComponent && RootComponent->GetAttachParent() && RootComponent->GetAttachParent()->GetOwner() && (Cast<USkeletalMeshComponent>(RootComponent->GetAttachParent()) || (RootComponent->GetAttachParent()->GetOwner() == Owner)) )
{
return RootComponent->GetAttachParent()->GetOwner()->IsNetRelevantFor(RealViewer, ViewTarget, SrcLocation);
}
else if( bHidden && (!RootComponent || !RootComponent->IsCollisionEnabled()) )
{
return false;
}
if (!RootComponent)
{
UE_LOG(LogNet, Warning, TEXT("Actor %s / %s has no root component in AActor::IsNetRelevantFor. (Make bAlwaysRelevant=true?)"), *GetClass()->GetName(), *GetName() );
return false;
}
return !GetDefault<AGameNetworkManager>()->bUseDistanceBasedRelevancy ||
IsWithinNetRelevancyDistance(SrcLocation);
}
why does my Int not replicated again ?
Because the actor holding it is too far away
In that case no idea
:/
Properties can't change whether they replicate or not at runtime, so something else must be going on
seams that the activation range is smaller than the deactivation ๐ฆ
if i look at it, it works 4 sec. and than it stoped and if look away it replicates again
wtf is happening
hate to be that guy i gotta go in 10 mins just wanted something to think about. i have a projectile that replicates perfectly except a timeline that adjusts speed. if i print the float it works, but it doesnt actually adjust the speed. any ideas for me to ponder anyone?
@winged badger Okay it works but only if i don't look at the actor??
Is the actor being occluded?
what does that mean ?
behind something, not visible
it has a static mesh component
unless im wrong which is... quite often
@steady briar what do you mean by speed? what property are you updating exactly?
well actually thats a good question...
i was modifying Initial Speed which... looking back at this............... name might be self explanatory
what would i modify for the speed of a projectile using ProjectileMovement? im using vector for direction
speed for speed
if that makes sense
Vyk show him y our BP you showed me
doesnt projmovement have a velocity vec member
UProjectileMovementComponent::Velocity
projectile has velocity and speed
if u have a speed number it uses that, but velocity for direction
but it only has initial speed so i guess i was adjusting initial speed and of course it wasnt changing its speed because its not initial once its launched...
Correct
so then how do i adjust speed?
ya its a simple thing, i thought it wasnt replicating the timeline but i think it is working perfectly, just adjusting a number it doesnt use
and most of that bp is just shiny stuff that pretends it does real stuff. it could be like 5 nodes
his timeline at the top wont work and i suggested using an RPC to call it but someone else said to use beginplay
rpc didnt do it either. i do think the timeline is perfect, its -what- im adjusting thats wrong
You would update the velocity.
wondering if ill have to use velocity instead of speed because i dont see anything but initial and max speed
hmm... ya i was hoping i didnt have to use velocity, seems more complicated somehow...
ok so if i did the same thing but velocity (assuming X) it would slow it probably?
@jolly siren thats probably it thanks... was in a hurry and thought id get some better brains on my problem and... it became immediately apparent with the variables name. will see if i can fix it later today
np, you will probably also have to update it on both the client and server; but I'll let you experiment with that ๐
Hey
I want to make a floor out of floor components and i want to do it like every player sees only their own floor components so the components are on the server and that client But if another player get near to the other player, the floors they use are the same so replicated on server ,player one and player two but all other players who are far away doesn't see the components
And "don't see them" doesn't mean just invisble, they doesn't exist on players client
Whats the best way to do it or is that even possible ? IF yes How ?
Is anyone using the replication graph in 4.20?
ShooterGame is, if you haven't looked at it yet
I have looked into it a bit.
There was also a live stream where they showed fortnite's code
Right, yeah I watched that too
@jolly siren It only seems useful for large, open world games.
I feel as though a game like unreal tournament, or left for dead for example would not be so good with it.
Yeah, it was designed for Fortnite; so it makes sense.
Cross Platform between PS4/PC still requires custom subsystem or we groovy ezpz in UE4 thanks to Fortnite?
(or use GameSparks/PlayFab real-time)
Hoping someone can point me in the right direction. I'm working on an multiplayer RTS Game. Trouble I have is using the controllable AI to determine who gets multicasted.
For example when a team AI enters the cull distance of an enemy AI how do I replicate that to all the team members
or more specifically how does the net cull distance work? Is there a component I can attach to the AI characters?
determining who gets the multicast
unless one of the special conditions is true (like owned by PC viewing, AlwaysRelevant...) it defaults to DistanceBasedRelevancy
that would be the NetCullDitanceSquared (default is 15000 UU)
I'm curious though, what is based on the distance? distance to the client?
you can read the AActor::IsNetRelevantFor and APawn::IsNetRelevantFor override if you can do c++
your PlayerController, which defaults its location to the possessed Pawn
for the calculation
okay, so if the playercontroller is not attached to the pawn then it doesn't move
because I've had this issue. I still move my RTS character but the cull distance component does not follow the RTS character
so essentially the cull distance starts when the possession
do you use some kind of ObserverPawn with camera slapped to it, or does your PC not have a Pawn?
no I mean my RTS character is not calling the cull. So units disappear regardless of where my RTS character is
it's an actual character that has a camera
but for some reason whatever the culldistance is based on is not attached to the RTS character
ok, but still the question remains: what is your PlayerController possessing?
SimpleMoveTo for movement?
well it's not AI
I think we got mixed up somewhere lol
Is there a way to use the AI characters to determine who gets replicated instead of my overhead pawn
as long as your PlayerController actually possessed and owns the RTSCharacter
NetRelevancy should work
calling SetPawn from PC fixes the scenario even when you have an AIController possessing the character
and no, iirc multicasting from non-relevant Pawns won't do anything to help you
What exactly do you mean SetPawn? like the default pawn?
if you have any c++ code
just add a base class for the PC
UFUNCTION(BlueprintCallable)
void SetPawnBP(APawn* inPawn) { SetPawn(inPawn); }
and you can then call it from BP
Alright. I'll give that a shot thank you.
(all of that goes in .h, and base class for PlayerController has to inherit from APlayerController)
Ok, so I am watching the Krazy Karts multiplayer tutorial on Udemy and it has really good info for a multiplayer game, only thing that I know of that they don't discuss or go into detail is using the PhysX engine to simulate physics as they used a dumbed down version using their own physics engine.
Obviously I don't want to reinvent the wheel, and I am planning on hosting lots of players in my game, so what are some things to keep in mind when using the PhysX engine with replication?
I already know a little about semi-fixed time sub-stepping, I know there is a lot of annoying stuff with replaying PhysX scenes but I don't really know how to go about doing that ๐
My first pull request is a one liner, wish me luck ๐ค https://github.com/EpicGames/UnrealEngine/pull/4922
The review process will take a bit
anyone ever done multiplayer through blueprint?
Probably the majority?
how do I get network synced time in clients? my replicated actor hits the ground in clients and I want to print impact time to see which client hit later
๐
AActor doesn't use velocity for prediction?
I have a rocket which only moves in a defined direction and speed. should I do prediction myself?
Only Characters have prediction
All other Actors etc. are simply setting location
If it lags, it will jump to the newest update wihout prediction
Well not only characters. Could be that something like the ProjectileComponent has something
charmovecomp does extrapolation
but thats the only move comp that does
if you wanna predict projectiles youll have to do it yourself
projectilemovecomp simulates on both server and client i believe
with corrections from server
but it'll be lagging behind the server by ping/2
GetServerWorldTimeSeconds on dedicated server gives me a value more than clients when I use it for the first time! why?
Hello Sirs,
Has anyone had an issue where World Composition tiles are not loading in quickly so players are falling out of the world?
Has anyone used UNEASY's Good Particle: Status, Blueprint Component? Having a heck of a time getting the particles replicated. ๐ฆ
Is there an event for 'player disconnecting' in BP?
EventOnLogout
ah
Thanks bud, I was looking in the controller/state ๐
Also I haven't used that system but I've managed to replicate particles before
How are you replicating them?
I use it to clear their controller when they disconnect
I think I finally got it figured out. I was making a magic system where depending on what Magical Element you're using, it'll spawn a particle on your hands showing what Element you currently have.
@jolly siren they override GetNetOwningPlayer to provide the ownership on network for Pawns, that nullptr setting appears to be a mistake on their part, either that or GetNetOwningPlayer can revert to its default implementation of checking its owner
when we use NetPktLag on a client it applies to the outgoing packets. am I right?
In real network is ping the same ? I mean sending packet from server to client will takes the same time ?
shit. the replicated actor is not spawned at the the exact location I used on dedicated server. how UE4 sends initial Position And Rotation to clients?
Server Pos: Is X=5352.663 Y=8980.523 Z=6142.833
Client Position Is X=5327.800 Y=8933.700 Z=6031
Sometimes when this runs, it works fine, sometimes client 2's name will be set to none, and sometimes both clients will have their names set to none. Any idea why? I'm trying to understand the problem.
Is it because the playerstate is initiated first?
dedicated server?
you do know BeginPlay runs on every copy of the PlayerState on server and all clients?
and that PlayerController[0] returns a different result in each
and even if not for the PlayerController[0] approach (PS can get its controller directly, no need for statics)
the steam name is pulled locally from the steam client running on that machine
so, whoever runs that last, wins
Yeah instead I've changed it from Get Player Name (inputting a PC) to Get Player Name (inputting a PS)
although it looks like Get Player Name (PS) is not with advanced sessions ๐ค will this still return the steam name?
it should run just fine as long as you check if PlayerState owner is the local controller
then RPC the name over to server
great, thanks Zlo!
How to increase level streaming time?
if i send someone this engine i have for this unreal game will they put online into it please
yes please
Well I've got bad news - that's probably more work than you already put into it.
Multiplayer is hard
ok
You should look into how it's done, learn, do it patiently
ok
Just do a save-as Multiplayer format
Hey I posted this question in the subreddit but thought that maybe people would be more active in here, could anyone help me out? https://www.reddit.com/r/unrealengine/comments/94by6h/help_with_using_seamlesstravel_from_a_server/
1 vote and 0 comments so far on Reddit
it doesn't get past the cast except for the local player controlelr
@soft relic
it can exec server only, it would work as intended then
let the PlayerControllers handle their own client updates via replication
(there is only one PC on each client, so for any PlayerState that is not your own, GetOwner is NULL)
@knotty finch GameModes have bUseSeamlessTravel boolean
What I want to do is everytime someone changes his selection, it updates to all the players
@winged badger that's set to true
then keep it in PlayerStates
update PS and let the PC pull the data locally from there
you are Multicasting that which means it runs on all clients, and they all try to access all PlayerControllers
So I should change to playerstates instead?
PlayerStates are fully replicated to everyone
PlayerControllers are not
so i don't know your setup, but that would probably work for you
So you're tellingme to keep the game state as it is but instead of casting to the pc cast to the ps
@knotty finch ExecuteConsoleCommand: ServerTravel MapName?listen ?
not cast
move that Characters array
into the PlayerState
Isn't that just a BP node @winged badger ?
it is, but if you're constructing a string and calling it from code
string argument should look much the same
Yeah but it probably just wraps seamless travel @winged badger
But clients are already connected to the listen server
And seamless travel doesn't except params. Only a map name.
Basically I'm trying to set up a system like in left for dead where once you complete one map you travel to the next. And clients are able to connect and play on the first map. But upon completion the seamless travel only works on the server. It seems like clients are still connected they just don't travel
I believe the ?listen parameter is what you do to get the specific map on the server to be the map the players load into.
I'll give that a shot. I tried adding a param to the map name on the seamless travel method and it crashed. It seems like the method takes a map name and constructs a url from that, and that url can contain params like "listen" but it wasn't clear how to add those params to the url.
hey i actually know the reason why its crashing, thanks to my good ol bud victor
one sec let me find it
You are my hero
#UE4 Multiplayer Tip: ServerTraveling Seamlessly but Clients are crashing? Try this: Destroy all pawns before the ServerTravel call. Players not spawning correctly? Use HandleStartingNewPlayer (in GameMode) instead of OnPostLogin (only gets called once per game for each pl...
nah, thank victor
Ok ok, I'm gonna try that in a minute on the blank fps template first and then my project
sounds like a plan!
projectile velocity is the devil.
how so?
Actually I think I'm just an idiot @blissful thorn @winged badger this whole time I've been using SeamlessTravel instead of ServerTravel
:/
it happens to us all
velocity is so much more annoying than the oldschool Speed, but we can only set Initial and Max speed
cant adjust it like i wanted to with a timeline. velocity i cant get it to go in the proper direction using the same transform as speed so i just gotta redo everything. gotta be done though
not sure why theres an option for max speed if it isnt adjustable though. so gravity doesnt drop it too fast? seems like lowering gravity would have the same effect o.O
that made almost no sense @steady briar
and iirc MaxWalkSpeed is what limits the length of Velocity vector when travelling over land
I'm still having a hard time understanding appropriate ways for clients to interact with objects in the world and for these interactions to be replicated.
For this instance, I'm trying to make an object spawn where a player can pick up an object, that object fades out, and after a few seconds it fades back in again.
So far I've got this fully working on single player and have been attempting to figure out how this could work for all clients to see.
Here's what I got, minus the attempts I've made to replicate it with multicasting etc
This is an actor permanently in the world.
(open in browser for full res)
I've been running into similar problems with other world objects - If someone could elaborate on the proper procedure for replicating objects that are permanently in the world it'd be very much appreciated.
@icy nacelle 1. With your approach, there's going to an unreasonable amount of code duplication since you're having the logic in every item in the game. 2. Make fade in/out first call the SetCollisionEnabled() then call a new event (multicast) which handles setting the material parameters.
So I should handle the material in a separate function on a multicast?
Yes
Because even if I change fade in/out into multicast events they still do not work
The dynamic material is not replicated, so you must multicast it
Who owns the item?
Ah, since posting that screenshot I have set it to replicate
Is the item itself replicated?
Yeah
hmmm actually hold up
Yeah no I forgot to replicate the actual class
God dammit.
Apologies - I will take on your advice about optimising my code!
is there anywhere I can adjust parameters on how agressive the server will adjust the player's position? Not having much luck witht he Character Movement Component, network settings.
I'm adjusting the max accel and walking speeds fairly often which trips up when the client and server desync a little
I'm looking to replicate a weapon's current ammo with client-side prediction so I don't have to wait on latency to see the ammo remaining count change. With a simple prediction for a weapon that fires rapidly enough I would see the ammo numbers jump around quite a lot as the client would be well ahead of the server in terms of shots made (for a higher latency). My current thought is to not actually replicate the current ammo but have the client manage it entirely on their end, and in order to adjust the ammo (e.g. reload) implement that via a RPC the server could make to the client. Does anyone have a different solution that might be a bit more elegant than that? thanks! ๐
@livid barn are the accept and walking speeds something the client would be able to predict? if so it might well be worth implementing your own CMC, inheriting from UE's CMC. Similar to what is done here https://wiki.unrealengine.com/Authoritative_Networked_Character_Movement for sprinting; the same concept would apply to what you're doing (as long as the client can predict the changes)
@winter zenith yeah its starting to look like I need to roll my own CMC which I really wanted to avoid :\ Havent done C++ in ages, and even then some of the syntax kept cofusing me
It does look a bit intimidating, but the example in that wiki is pretty fleshed out. I was able to take that previously and roll with it as a basis quite happily ๐
and the result was pretty ๐ as it was all movement ability stuff that the client fully knew about
@winter zenith you can try with a timestamp
if 0,1 seconds have passed since server sent the update at the time it was received
and client is firing 300 RPM
you locally simulate the difference (5 shots have been fired since the update was sent)
won't work out of the box tho
Yo I have steam session finding and joining working in C++ but it only works with friends joining me since I have port forwarding. Everyone on the forums sees to suggest that the OnlineSubsystem should automatically use steam's NAT punchthrough.... any ideas?
Only friends being able to join suggests its not a port forwarding issue.
Port forwarding just eliminates the need to punch through the NAT
But it does so for everyone equally
yes as in playtestest can find and connect to my game
friend or not
because I have the open ports
but when they host a session no one can find them
ah, so THEY havent opened ports when they run a server, and ya need a way for ya game to punch on through?
oh cool that I did not know. I've always just manually opened ports on my router ๐
and half the material I read online says the online subsystem should use steam's punchthrough
but it doesnt :/
yeah the game will be using dedicated servers for the most part but for custom games I want players to be able to use a call of duty style networking model
yeah not sure how that works sorry. All i can suggest is basically dig into how steam punches through ya router. Maybe there is some flag somewhere you may need to enable for it?
Maybe its working for the people who run it who have routers that support NATs, but others that say its not working have some security firewall thing preventing them?
http://canyouseeme.org/ is a good way to check to see if ports are open at your end, can forward that onto community to use when they run a server?
A free open port check tool used to detect open ports on your connection. Test if port forwarding is correctly setup or if your port is being blocked by your firewall or ISP.
yeah port forwarding aint too hard but I would really love people to just click host game ๐ฆ
dont a lot of games these days when someone chooses "host game", doesnt actually spool up a server on their own system, but actually has a server instance spool up at some data center somewhere and then everyone connects to that?
yeah they's how most modern games work however we cant afford the infrastructure ๐ฆ
Call of Duty opened a p2p listen server
used NAT punchtrhough
same with dark souls and stuff
@fiery dome i believe listen server NAT punchthrough works with steam sockets
Zlo: I'll throw up a stream of what I'm doing, just incase you spot something
if you are having a Replicated backup variable
nothing will cause as bad a jitter as not using SkipOwner
when replicating it
okie if ya curious to what im trying, you can probably see it here. https://picarto.tv/chiggenwingz
ChiggenWingz is live on Picarto.tv! Watch our streamer do Game Development stuff and chat with likeminded people. 106 have watched ChiggenWingzโs stream!
in case of directly RPCing MoveSpeed to server, it should be Unreliable, all your ServerMove functions are anyways
you can also Lerp that speed update
reckon a lerp will help with the deiscrepency? Cause currently I have a Curve that reads the Current Speed of the character, and adjusts the Max Acceleration based on the current speed.
So thus as you get faster your acceleration dies off
but in the end you set the speed to 400 or 1000 directly, no?
no acceleration there
just jumps to 400
yeah, BUT that will be changed in the future. Max speed will be dictated by a constantly updating stamina value. SO I'll hit the same problem im getting witht he accel value chaning
discrepancy in the position is miniscule
inorite! i wish I could tell the server to chill a bit and let the client have it ๐
is there a way to print out timestamps?
i saw someone else did it in a video, but had no idea how they did it
not sure
@winged badger how would I get that working?
i just gimmicked it with AdvancedSessions
since i did not need more then a prototype that connects properly so far
as far as i know, open ip:port directly will not work with NAT punchthrough
the client knows the servers ip:port, but the server's router has no idea that it should be listening to connections from client's IP address
that is where port forwarding comes into play, just forwarding everything
only when I host can they find the session
Hey fellow devs
How can I activate clients button in the widget by pushing a button on server?
I do this
Basically I created a bool var in the game instance, set it on server player controller and check on tick on client player controller . But nothing happens on the client side
I'm guessing something like
Server sets PlayerState's ButtonActive=True
Widget reads off PlayerState if ButtonActive == True.
Then Widget unlocks the button
or server to player controller
then again if its a global thing, possible the widget canm just read off the GameState?
assuming the variable is replicated?
maybe need a dedicated Event to be triggered on Multicast to set the variable possibly?
I just narrowed the problem to the variable (yes, it's replicated): this bool var doesn't change for the client after the server change it.
GameInstance isn't shared
over network
you'd have to move it to GameState
the boolean
will it work across the maps than?
no
The idea is to activate the button while the server is on the different level
That's why I used game instance
they can't be connected to the server
if server doesn't have the client's level open with ?listen
Yep, levels have to be different
to communicate across levels
you should use a system outside unreal's network replication system, like for example steam lobby
its not technically part of the game, so it doesn't have to conform to same restrictions
that's sad, because I don't want to use any subsystem
(use Session data to communicate)
Got that, thanks
Than I'll have to move my widget to that map and set the var in the gamestate and cat to it eventually
I guess ๐
actuaslly you shouldnt need to
have the main Bool live in Game Instance or whatever
then have game state read off the state of the bool from gameinstance
then the widget from the game state
that sound doable?
they won't be sharing GameState, or any game framework class unless they are on the same level
I think @livid barn talked about replication while being on the same level
Anyway thanks a lot @winged badger and @livid barn
oh der, so you have multiple instances of the server running, each one runnign different levels and players?
nope, I have one server, that has to transfer data to clients that are on other maps
Nothing built-in in UE for that
Client & server always are on the same level in UE4
OWS now supports seeing players on other zone servers by creating a network of zones that talk directly to each other and share player location data. Proxy c...
this guy has done some work on this for mmos
you can download the project I think, and see how he's done it
@fiery dome cool, thanks!
Lemme know if that's what you're looking for
In future - yes, but now I'll just move my client widgets to the clients map
So the widget will exist on the map where both server and client are
@winged badger Did you tag me? Got a notification this morning and it looked like it was from you
Asking about ownership?
misread something in your BP, then deleted it
Maybe someone can help me that would be so awesome!
https://forums.unrealengine.com/development-discussion/audio/1511143-roleplay-voice-chat
ENGLISH:
Hello everyone out there!
I'm working on a project right now, it's a RolePlay game and I really need a voice system for that. And that's how it
@loud umbra You want to look up "VOIP" Voice Over IP systems.ย Theres a bunch of different approaches, I don't know them off the top of my head; but a number of other Unreal games use various VOIP systems.ย You may even be able to use Steam's VOIP system I think?
So I've got a weird symptom I'm about to try and chase up, and not sure how (so will fumble through for the next little while unless anyone has suggestions?)
Basically I have a character that runs along and their Max Acceleration setting is reduced the faster their velocity is. This is done by reading off a curve which has Speed/Velocity axises. If X speed, then set Y velocity.
I update the values each time OnCharacterMovementUpdated and that seems to keep things within sync sort of. BUT After a few seconds of running I suddenly get a position reset by the server and I cant figure out why the server things the player's character is slowing down.
LogBlueprintUserMessages: [ThirdPersonCharacter_C_0] Server: Cur Spd: [996.360779] Max Spd: [1000.0] Max Accl: [10.727844] Is Sprinting? [true] Now [52.372]
LogBlueprintUserMessages: [ThirdPersonCharacter_C_0] Client 1: Cur Spd: [996.549377] Max Spd: [1000.0] Max Accl: [10.690125] Is Sprinting? [true] Now [52.374]
LogBlueprintUserMessages: [ThirdPersonCharacter_C_0] Client 1: Cur Spd: [996.683655] Max Spd: [1000.0] Max Accl: [10.663269] Is Sprinting? [true] Now [52.386]
LogBlueprintUserMessages: [ThirdPersonCharacter_C_0] Server: -------------------------
LogBlueprintUserMessages: [ThirdPersonCharacter_C_0] Server: Cur Spd: [993.387207] Max Spd: [1000.0] Max Accl: [11.322559] Is Sprinting? [true] Now [52.397]
LogBlueprintUserMessages: [ThirdPersonCharacter_C_0] Client 1: Cur Spd: [996.817566] Max Spd: [1000.0] Max Accl: [10.636486] Is Sprinting? [true] Now [52.399]
LogBlueprintUserMessages: [ThirdPersonCharacter_C_0] Client 1: Cur Spd: [997.030029] Max Spd: [1000.0] Max Accl: [10.593994] Is Sprinting? [true] Now [52.419]
LogBlueprintUserMessages: [ThirdPersonCharacter_C_0] Server: -------------------------
LogBlueprintUserMessages: [ThirdPersonCharacter_C_0] Server: Cur Spd: [941.213867] Max Spd: [1000.0] Max Accl: [21.757227] Is Sprinting? [true] Now [52.433]
LogBlueprintUserMessages: [ThirdPersonCharacter_C_0] Client 1: Cur Spd: [996.55896] Max Spd: [1000.0] Max Accl: [10.688208] Is Sprinting? [true] Now [52.434]
LogBlueprintUserMessages: [ThirdPersonCharacter_C_0] Client 1: Cur Spd: [997.071594] Max Spd: [1000.0] Max Accl: [10.585682] Is Sprinting? [true] Now [52.446]```
LogBlueprintUserMessages: [ThirdPersonCharacter_C_0] Server: Cur Spd: [489.814758] Max Spd: [1000.0] Max Accl: [550.926208] Is Sprinting? [true] Now [52.460]
LogNetPlayerMovement: Warning: *** Server: Error for ThirdPersonCharacter_C_0 at Time=10.205 is 15.494 LocDiff(X=-15.414 Y=1.575 Z=-0.048) ClientLoc(X=2263.830 Y=3666.000 Z=108.200) ServerLoc(X=2248.416 Y=3667.575 Z=108.152) Base: ThirdPersonExampleMap:PersistentLevel.Landscape_0.LandscapeHeightfieldCollisionComponent_1 Bone: None Accel(X=10.600 Y=-1.100 Z=0
.000) Velocity(X=487.298 Y=-49.591 Z=0.000)
LogNetPlayerMovement: Warning: *** Client: Error for ThirdPersonCharacter_C_0 at Time=10.205 is 15.493 LocDiff(X=15.413 Y=-1.570 Z=0.048) ClientLoc(X=2263.829 Y=3666.005 Z=108.200) ServerLoc(X=2248.416 Y=3667.575 Z=108.152) NewBase: ThirdPersonExampleMap:PersistentLevel.Landscape_0.LandscapeHeightfieldCollisionComponent_1 NewBone: None ClientVel(X=991.862 Y=
-101.791 Z=0.000) ServerVel(X=487.298 Y=-49.591 Z=0.000) SavedMoves 0
LogBlueprintUserMessages: [ThirdPersonCharacter_C_0] Client 1: Cur Spd: [489.962677] Max Spd: [1000.0] Max Accl: [550.186646] Is Sprinting? [true] Now [52.463]
LogBlueprintUserMessages: [ThirdPersonCharacter_C_0] Client 1: Cur Spd: [505.53772] Max Spd: [1000.0] Max Accl: [486.155701] Is Sprinting? [true] Now [52.475]
LogBlueprintUserMessages: [ThirdPersonCharacter_C_0] Server: -------------------------
LogBlueprintUserMessages: [ThirdPersonCharacter_C_0] Server: Cur Spd: [505.545715] Max Spd: [1000.0] Max Accl: [486.135712] Is Sprinting? [true] Now [52.486]
LogBlueprintUserMessages: [ThirdPersonCharacter_C_0] Client 1: Cur Spd: [511.09668] Max Spd: [1000.0] Max Accl: [472.258301] Is Sprinting? [true] Now [52.487]
LogBlueprintUserMessages: [ThirdPersonCharacter_C_0] Client 1: Cur Spd: [516.534546] Max Spd: [1000.0] Max Accl: [458.663635] Is Sprinting? [true] Now [52.498]```
i am using Anim notifies to change montage section, problem is it's not changing the montage on other clients
the montage is playing on other clients just not section change
in regards to the sudden slow down i mentioned above. I threw togther a v4.15 and v4.19 version of my network test project and the same symptom happens in that ๐ฆ
you might be losing packets
if you have a lot of stuff replicating
the ServerMove functions are not reliable
Hi guys, I have a quick question. I have a pick up item in my game. When the player overlaps with it, it will call an event and run it on the server (increase players health). The variable is replicated. Can the player call this function over and over again to get infinite health? If so, how could I prevent this?
use a Do Once or set a bool saying they picked it up
On the server side right?