#multiplayer
1 messages · Page 316 of 1
Oh, you do? Well you can do whatever you want with the function then
Im just not familiar with how to make a C++ class for it or what not
Is it just a class with one command to set the isnetworkcompatibleoverridw?
or do i just change it in the .h or .cpp?
Thanks a ton for the help btw!
You would probably want to do it in a custom GameInstance I'm guessing, it would be something like FNetworkVersion::IsNetworkCompatibleOverride.AddDynamic(&UMyGameInstance::MyFunction); (I think, it might be different binding to a static delegate? I'm not really sure looking at Google)
If you want to run a source build, you can just change it in the source
If you want to do it in the project, do the binding
Just wondering, are you stuck with BP only for something like iOS? Might just be better to bite the bullet and learn the module system, just to avoid running two separate projects like now
hey so im trying to replicate emitters to all in multiplayer for like gun muzzles. the issue is i can replicate it fine after making it an actor but i cant find a solution to mimic spawn emitter attached, so now it spawns but stays in the same place even if the play moves his muzzle
Yo I have an Actor placed into my world using the world outliner. It's replicated. It's responsible for changing objectives in the world. Whenever the code is activated to get a new objective, I check and make sure that method is only run on the server and then replicated to clients. However I'm receiving this error: UIpNetDriver::ProcesRemoteFunction: No owning connection for actor BP_ObjectiveManager_398. Function ServerUpdateCurrentObjective will not be processed.
The code is setup in the base C++ class which is inherited by my parent BP class. Wondering if that might have something to do with it. The BP class is set to replicate
@fierce birch Was the network stream today?
@jolly berry are u running on an listen server?
@thin stratus yeah
Nice, need to watch the youtube upload.
:D did they by any chance mention my compendium :x
few times
ya, thanks. Don't have time now
hey @thin stratus I have a job for you if you are interested.
@loud mountain I'm assuming just using the popout PIE window auto makes it a listen server no?
Wow good Morning everyone and yes it does
Uhm The error You have means, that there is No owning Connection
Means that you need to have a owner for it
Because you are on a listen server you should make the servers playercontroller the owner i belive
This would have been a great question for yesterdays Stream
drat alright! How exactly do I make the server's playercontroller the owner?
does that mean I have to spawn the actor from the server?
or is there a way I can do that through the world outliner
or do I have to set the owner using the begin play on the server side?
oh I see, testing now
hmm I seem to still get the error
is it because I'm setting it in the C++ class not he BP?
lemme try that
even with me setting it in the BP and the C++ class I still get the error, is it possible it's something else? What I don't understand is that it's actually replicating and working flawlessly
my objectives are updating and rendering correctly on the client and the server
so I don't even know how it's possible this error is appearing
@loud mountain
sorry it took awhile for a response I was updating some of the replication functions/variables. The crazy part is it works! So I don't fully understand the error
Okay pretty sure I figured out why it worked. I didn't need any client to call the code on the server. Doesn't explain why I was getting the error but it explains why the net code was functioning despite the error. As of now I no longer need to fix this since I removed all instances of the server implemented functions but I am still curious as to what the error is really pointing towards.
Does anyone know how to fix this?
It happens when a client tries to join
I'm using steam
I'm trying to bind the IsNetworkCompatibleOverride delegate of FNetworkVersion. Can anyone point me in the right direction on how to do this?
I'm trying to create a Blueprint Node for it, having trouble finding the right command
@indigo hawk I think I've seen that before, it was something about folder names being too long
Good morning
If my character has a static mesh shield that only comes out when you press a button, should I make it an actor or can I keep it as a component ?
That depends
It's useful to have it as an actor if it has specific values coming with it
Such as blockrate or so
And if you want to have different shields
But if it's only a visual thing and the shield is always the same etc
then you can keep it as a mesh and handle the block rate etc in the damage calculation of the character directly
You can technically save the data of a shield in a struct/datatable
And just fill the component and other data with it
ahh so actor if I want more features in the future
And actor is actually only needed if the Shield is meant to be placed outside of the player (drop/pickup) and if it has values that change over time (durability)
can you make the actor follow the character?
Yeah, plain data holding is a bit too less for an actor.
Yes
You can call "Attach to"
For example you can attach the Actor (its root component is the location then) to the Character mesh
And then even specify a Socket
For example the hand socket (Which you need to setup in the mesh editor of course)
is it better to do that in the character blueprint if I want to assign it to a socket?
Hm, the Golden Rule of objective programming is that an object should handle its own state
Objects are here the Actors
So in an ideal situation, you would tell the shield that it's equipted
And pass it the Character
Then the Shield would attach itself to the Character
Otherwise you overload the character with all kinds of code
ah that maybe part of the issue i'm having
@thin stratus how performant are Actors? Like in multiplayer, could you in theory have like 10k of them and no lag
I was reading on the ue wiki that actors only add like 4bytes to the code because of the header code compared to a component so its almost not noticeable
Any tutorial recommendations for making a multiplayer shield actor ?
@twin juniper Technically yes, but that depends on the actor
I spawned empty actors in the my scene and even with multiple thousand actors, it wasn't lagging
If you add models to them the whole thing goes down the drain
For my instance I want to spawn in actors with only two things, a mesh and a variable, and maybe physics enabled
Physic enabled actors would probably hurt
hmm
You might want to disable physics on them (sleep) till they are used
Does Tick() need to be enabled for physics to be active?
hm, idk
Disable tick on actors that don't need it is one thing
I had a VR project with loads of candy
all physics
I found that putting them to sleep until the player interacts with them helps a lot
hmm
Arent things just naturally culled out when the camera isnt looking at them?
Like just for the client i mean
Well, if somethings is falling
and you look away
Do you want it to keep falling? :P
I mean, you could ask schrödinger at that point
lmfao^
Schrödinger's Cat
If you don't look, is it dead or alive
I was just joking, as if you don't look, is the physics thing falling or not
.>
😛
ah that brings me back to school
i'm a chemistry majors, we had shirts with shrod's cat on them in a box
@thin stratus are you currently working on any projects
Yes, why
Despite my own project, NDA
For my own project?
There is non. I work on it when I have time
haven't touched it for the past month
How long have you worked on it?
(or so)
Uff, 2 weeks only atm. But it's actually pretty small.
Trying to get the base systems in
It's a resource manager where you manage a fantasy guild and the resources are your guildmembers
:D na, you use them to send them on quests that the townspeople bring in
They earn money for living and give a bit to the guild so you can improve it
Yes and no. I might port it to mobile later
@twin juniper I only have a bit experience, but I don't think about art until I have a state in whic hthe game makes fun without art
I can always plug together some cubes and low poly art
Hello, currently evaluating possibilities with a friend, we want to build a game that doesn't have instanced servers (lobby system or similar) but has possibly 200+ people on one map (mmorpg like), can you use the ue4dedicated server for such a thing? Would it be bad to build something myself with raknet and integrate it into the ue4 server or even standalone? (I'm aware of how much work that is)
Hello, currently evaluating possibilities with a friend, we want to build a game that doesn't have instanced servers (lobby system or similar) but has possibly 200+ people on one map (mmorpg like), can you use the ue4dedicated server for such a thing? Would it be bad to build something myself with raknet and integrate it into the ue4 server or even standalone? (I'm aware of how much work that is)
- The Server itself can do that, but it has limits. All your players need to be on the same map, as one Server can't have multiple maps. You need to work a lot with netculling etc. And games most likely start to lag because of all the collision checking in the Character Movement Component. At least that's what I read a few months ago. Usually people don't try to use the DedicatedServers with so many players. They were build for FPS sized games.
- Why would it be bad to use RakNet? If you can work with it (I don't know if they have any user slot license things) then go ahead.
@Sidia#9322
I can't tag people again
DISCORD
-.-
Could someone tag him for me -.-
Ty!
Thanks! Well would it be better to integrate Raknet into UE or standalone?
And raknet has no fee as long as you only distribute to pc
Why don't you want to use instances ?
Speaking of which . Would anyone be interested in a DSM for unreal . I just finished coding one . It can start and stop dedicated servers fully auto so they are opend when needed and shut down when no games are needed
Could also be used for dungeons , level streaming big open levels etc
Players can also choose to host or can use classics approach of having a master server list and choose games to join
And all can be controlled from a widget inside unreal
@worn nymph cause we aim towards an open world game, I know about instances for different areas but we have to look whats possible for us
if its open world game even more reason to use instances
and level streaming
so you break big world up into small server chunks
and only stream in what players need
like this is a massive map from life is feudal
each one of them squares is actually a seperate server instance
they are spun up and shut down only if players are on the square
but together they make the whole map
@worn nymph isnt that the ARK map? lol
lol no
is that your map?
its life is fedual mmo
they finally launching the proper multiplayer soon still in beta waves
just for my own curiousity - why would you need a SEPERATE SERVER to instance that map?
wouldnt SEPERATE SERVERS be for load distribution on population?
you wouldn't
IE: WOW having 10 million subscribers - each server has 1200 players
(just an example of load balancing)
MMORPG's have very low real game play though
90% of it is grinding
10% is bossing / raids
If you compare it to MOBA games, League of Legends has 100 million users who play monthly
Way out classing WoW and basically every moba in existence
that has nothing to dow ith the map instancing - but ok
Just saying that people shouldn't focus on MAP size, but instead on gameplay
Lol
That's literally the only reason why I mentioned that.
Large map < Good gameplay
map size can BE the gameplay tho
in some games... IT IS
Ark is more based around grinding still
(like the one im making)
i have like 753 hours on ARK
and i was second strongest tribe on a server at one point
then everoyne just quit
point?
point is, games shouldnt be revoling around constantly having to replenish resources
grinding should be removed from games
looka t EVE ONLINE
i disagree bdoom
no game should have grind
thats opinion
your opinion = entitled to yourself
i'd say MOST players really enjoy resource gathering
really gets the feel-good hormones going in the brain
again - opinion (we were asked to move this CONVO btw)
yeah we should to gaem design
btw where is the code of the dedicated server? I cant really find it right now.. 😄
Is there any way to have a client call a function from the game mode? Like make a request for the server to call a function? I thought that was what custom event set replication to server did
but can't seem to get it to work
if I call a server function on a Character and try to use "this" to reference the player, or when doing a linetrace if I am adding an actor to ignore could I type Params.AddIgnoredActor(this); or would it be doing it on some class on the server?
AVeritexCharacter* TheCharacter, UWorld* World, UCameraCompoonent* FollowCamera
are these acceptable parameters
to pass into a server rpc
If the Actor is replicated
Which is needed to call RPCs
- being owned by the Client who calls the ServerRPC
Then you can pass "this"
@warm pagoda you there?
I don't usually hang out in this channel, you can ping me directly though. What's up?
Hey so uhh
Im trying to figure out this LoadObject thing again
but with a separate instance
U think you could help me?
Wait nvm i think i got it
yea looks like i got it
Alrighty. 😛
Hello! I'm currently trying to setup a basic network multiplayer lobby following the blueprints network multiplayer tutorial on Unreal's youtube. However, I'm having a few issues that I'm having a really hard time figuring out. Namely, my host is able to connect without any issues, the client however can find and join the server, but doesn't spawn in the lobby at all. And when I select a character in the lobby menu, my character disappears entirely.
I was wondering if anyone can point me to a working example project that I could download to compare and troubleshoot? I can't seem to find project files for this tutorial anywhere.
Thanks a ton!
Project files might be on the thread of the tutorial
The tutorial itself isn't the greatest though
It teaches a lot of unnecessary things
Lemme see though if there is a working exmaple project for it
cheers
Thank you! I read through that thread saying that the tutorial has a few unnecessary additions to it, but figured it'd still probably be the best way to jump into it quickly
@thin stratus morning
@outer sable It certainly is a good way. The thread is directed at Epic so they change it a bit though :P
@twin juniper Yo
@thin stratus I was going to post a video of my newest updates of my game since last night
But, I forgot to make the video... was too tired once I finished adding a new update
@thin stratus
would you guys recommend playfab for a multiplayer fps game? or do you generelly have any experiences with it?
I've never heard of it
@frank portal we tried to integrate playfab but there wasn't really much documentation on it so if you can figure it out all yourself you'll ultimately save yourself the most money IMO compared to other alternatives
@cosmic apex yes at the beginning it will be for free but i am not sure if it will be that cheap later on i saw some comments that it will be more expensive than some alternatives. also the documentation is not that much for ue4 like u said. did you find a alternative or still looking for smth good ?
There's also gamesparks, they seemed to of had more plus they include a login blueprint. We're probably going to use steam and revisit the topic later just so we can reduce launch times
what the best way to rotate a character ? I read some topic talk about CharacterMovementComponent
yes steam is nice, but the problem is that it is only for pc ^^ so playfap sounds like the right solution, because of the free developing accounts till 35 player or so
@rare cloud The CharacterMovementComponent that is part of the Character automatically gets you network predictive replicated movement for translation and rotation in the default provided movement modes. You can also add your own movement modes and still make use of the network predictiction.
actually I simply want to set a new Yaw for my character
maybe an existing function already do that
Calling SetActorRotation on the server side will automatically replicat that back to all clients
sometimes yes
if you are using a Character (not a Pawn)
but nothing can happen too
It isn't replicating back to the clients?
The only time I have had that happen is when it isn't network relevant
which usually only happens if one character is a LONG way away
assuming you are running the default nerwork relevancy settings
To see if that is your issue you can check the box Always Relevant and see if it makes a difference
you also want to make sure you are setting the rotation on the server, not the client
If your action originates on a client, you will need to make a run at server RPC call to get from client to server and then set the Yaw
In most cased you won't need to override the Yaw and you can just use AddControllerYawInput
ok well from others clients it's look fine
but owner haven't got the correct rotation
Any gurus want to have a quick chat about some more philisophical/architectural questions? (Im in Lounge 1)
Has anyone tried to implement discord into their game for voice/chat ?
@cosmic apex, I thought about discord implementation which could be simple as a Web Browser UMG Widget. Do you have any other ideas on its implementation?
@still barn apparently there is an SDK but you need to be approved first I guess. https://discordapp.com/gamebridge --
I bet that would be a very nice selling marketplace feature
I'm thinking discord for m y game would automatically create 3 private voice channels per match, 1 for each team and 1 for global and then 3 for messages
and then private lobby chats when you are waiting to join a game
Well I'm currently using 4.14 and SetActorRotation is replicated to all clients except owner
I created a Third person project with a simple event
using 4.15 and I have the same problem, my character rotation isn't update from the owning client
Is there an open source or free alternative to Oodle for network and data compression?
@cosmic apex thanks for the link. Ill have to review the docs. IMO its a great chat option and I would integrate it into my game's chat system as an additional feature set. Can you elaborate on what you mean by 'very nice selling marketplace feature'?
@still barn Yea basically a discord plugin, thats very easy to swap out all the settings with, well documentated and has a hud widget to drop into your game for pulling information like avatar, username, text, etc
basically a chat box that uses discord instead
and the overlay feature for in game
@cosmic apex. It sounds like a quick solution for powerful features. Are you working on this?
Can someone point me to a decent Blueprints Tutorial for dealing with Replication for Character Customization/ Attaching Items to Player Characters? The goal is thee fold. 1) I want players to be able to customize their pawn and those changes are replicated to clients. 2) I want two more players to be able to make changes (attach items, swap materials) to a Entity, and those changes are replicated to all clients. 3) Player makes personal changes that are only seen by the owning client.
I can handle #3 but 1 & 2 is driving me insane to get working properly. I've referenced eXi's Network Compendium, which has been helpful, but i have yet to see a tut on a network character customization. I'm using several types of networked construction systems, i anticipate each using the same attachment replication processes. The solution to this will solve all my worlds problems. I truly appreciate your recommendations
No, i'm just exploring all the options of voice chat/ text in game chat at the moment and thought discord would be ideal solution
@cosmic apex, I considered a IRC solution from the start and discord is very nice. I'm going to dig deep into the gamebridge, when I start implementing a chat solution. Im integrating text based dialog, bot commands, scripting etc into the chat interface as well for unified text interface.
afaik, someone tried to get that SDK before
And they denied him
No idea what they actually want
hey mates, trying to make an event replicate, I'm all done with characters for now, runs fine on server->client, but on client it doesn't do anything http://i.imgur.com/ISINppr.jpg http://i.imgur.com/DpBA13l.png
first image is server, second is client
nothing happens on servers for openrep.
(when client calls it)
If you're trying to call the RPC on the door, you won't be able to call it from the client
Server RPCs can only be called on owned objects, like the little text says
wouldn't the client own everything locally viewable ?
or am I totally getting this wrong
No, the only thing that the client really owns by default is the PlayerController, and indirectly the pawn
ah, righto.
that's why I can do these rpc's on the pawn >.>
that was all making so much sense making those, so how do I run one on something I don't own ?
Yep, that would be the reason 😄 , it is slightly annoying but it lets the client affect things it owns
You would have to run the initial RPC call on something you own
For example, the PlayerController. Once you're on the server though, you can do whatever you want
oh, so I'd be actually replicating that I'm pressing the use button, but not what I'm using
Yep, that's pretty much the workflow you have to take when calling server RPCs
all good then.
boss wanted multiplayer stuff to go in, this has been a year long project
xD
didn't ask for it until recently.
Hi Litruv, just curious, any character customization or attachment of items that must be replicated to clients?
eh so the shooter example is c++. 😦
whats the proper way to possess pawns to recieve input in a MP game?
via BP
Is there anything extra needed to be done to make a custom uobject subobject replicatable? (other than overriding IsSupportedForNetworking)
i've done so and my property isn't being replicated
and it's sitting right next to a AActor reference that is replicating fine
Did anything in 4.15 change how networking should work? I had my spawning & possessing working fine, then upgraded to 4.15 and now its not working at all
@hollow hatch, you need to create a function like "ReplicateSubobject" on your UObject and call it from your actor
Howdy y'all - my player actors keep getting rocketed in to space when they run in to each other, any ideas for mitigating this? They're using a slightly smaller capsule than usual but other than that they're pretty vanilla
Is there an open source or free alternative to Oodle for network and data compression?
thanks @rare cloud I'll check that out
@untold cipher let me know if you find one, I got a quote for Oodle and it knocked my socks off
@dusky skiff are your character holding static meshes? if so, are their collisions set to block all? (thats what happened to me once, they'd swing rifles into other actors and send them flying)
Ya @thorn merlin . I was worried to ask them.
Anybody have a guide on how to make a proper inventory system for multiplayer?
@cosmic apex, Are you referring to a shared inventory between multiple players? or using an inventory to equip (attach) items to player pawn and replicating that attachment to clients? I believe both requires the same mechanism to work as a character customization replication. Heres an answer from hulken from #survival-template
hulken - Yesterday at 8:29 AM
I don't have time to work on tutorials for something like that, but in short what I did was, make an array in the game instance with all custom meshes the characters could use, then make a widget to browse between those meshes and apply them to a preview pawn in the main menu map. when changes were made to the character choises I used that to store the settings in a SaveGame instance which in turn was loaded in the player controller when the game started. Then it sends that to the PlayerState with a RepNotify that triggers a server event to set the selected character mesh on the server (and all clients), that event also triggers an update mesh event on the pawn
for more advanced "character customization" like bigger boots, you need a skeleton with boob bones, then all you do is make a bone transform in the animation blueprint with the characters values
Thats techlord, that seems like it makes sense. Hopefully i can make it happen. I want to make a system sort of like Destiny, swap guns out of a vault, swap body parts, "shaders"
thanks techlord*
@cosmic apex, multiplayer customization is vital to my game designs. I'm essentially applying customization to all entities in the game, for use by game designers to prefab entities, for use use by game admins to create quest, for use by game players to customize characters, weapons, vehicles. I would expect all construction systems to attach/swap parts, swap/adjust materials, etc using the same method.
shooter example seems to have alot of security flaws in weapon system?
Its not meant to be an AAA game example with perfect secuurity lol. Its just meant to be an example of C++ systems in place
If I put something on PlayerState class, will that automatically be replicated?
@vocal ingot, no, are you using C++ or BP ?
Blueprint right now
ok set is as replicated and now it will be replicated
also don't forget to set a specifier like OwnerOnly, to avoid to replicate something other don't need 😃
even from clients?
I heard replication only works from server to clients
not from clients to server
@vocal ingot, what you want to replicate ?
Team Id
I guess you have an UI to select your Team and others options before start a game ?
@vocal ingot, if you have more than 2 teams, create an Enum, else a bool is nice
create a struct to store all informations player select and send it to the server through an RPC
ideally check player input to be sure informations are valid like set player to an already full team or whatever hack
@vocal ingot @rare cloud A good example for the Conditions, like OwnerOnly, is WeaponAmmo.
A WeaponActor is most likely replicated. So everyone has an instance to see the weapon.
Setting Ammo on that Weapon to replicate would allow everyone to see the current Ammo of that Player's Weapon.
Setting it to OwnerOnly would make sure the correct Ammo is only replicated to the Player and the other clients will only see the default base value.
So if your TeamID should be visible to everyone, then you don't need the conditions
yup
Anyone managed to get network profiler to work with STeam
Game crashes once someone joins with that on
Anyone here know much about steam dedicated servers?
Dw I figured it out
Has anyone tried out SpatialOS?
Hey, I'm trying to create an overheating mechanic. I've got it so that it replicates on a dedicated server, so clients can't fire when they shouldn't be able to, but it doesn't work on a listen server. The server player is able to fire constantly. Can anybody point me towards a solution?
@native axle, I will try soon
@gilded eagle, you use BP or C++ ? I guess you simply need to replicate a float variable
BP. I've had every variable set to Replicate, but it won't work for a listen server.
hmm you can only change it server side
if you change it client side, it will be override by server
As far as I can tell, the overheating code isn't even being ran on the server, just the clients.
well you need to replicate with an RPC when the player press the input and release it
@rare cloud Yea it looks really nice, been thinking about making a semi-open world game with lots of small servers and some hacky stuff. But this would make it so much easier.
@native axle, yup I'm waiting pricing too 😛
I will try to join the Innovation program
@rare cloud Oh so we can't test it without entering this program?
we can test it already
but innovation program really help once you release your game, for pricing and support
but yeah one of the advantage of SpatialOS, you can create a small instance and start to dev for free
@native axle, I guess you already read this : https://spatialos.improbable.io/docs/reference/10.1/experimental/unreal/introduction
I hope later we don't need to patch the engine it's a bit boring 😛
Yea I was looking at that earlier, seems like a quite long process to get it up and running. Hopefully woth it though 😛
@jolly siren, I have no experience with steam voip, but I guess its instance it build from a core object of Unreal (eg. UWorld), and RestartGame will destroy and rebuild clean one
I know the voip will stop while it's travelling. But it doesn't work after travel. So voip works for the first match and then doesn't for any other matches that are started via a restart.
NumOpenPublicConnections is also always returning 0 now in 4.15
Hey, I'm having some issues trying to send a decent amount of information to all connected clientes using a NetMulticast function. Whenever the TArray containing the information gets above ~50ish for a decent amount of time the replication on the client stops working and it starts spitting out this error message:
"LogNetPlayerMovement:Warning: CreateSavedMove: Hit limit of 96 saved moves (timing out or very bad ping?)"
I'm sending an array with a varying size between 0-50 once ever 16th of a second where every entry has the size of about 28 bytes which to me doesn't feel like all that much.
Would appritiate some light upon this issue or maby some form of workaround 😃
hey
If I call a Client function inside of a Server function
is is being called on the server or the client?
I think on the client, but I'd need someone to confirm that.
Yeah, it gets executed on the owning client
That's kind of the point of a client RPC: to be called from the server 😛
So some questions that I have regarding UE4 multiplayer, how hard is it to do complete server side verification of every move a user makes, including stuff like database checking etc. How resource intensive is the default ue4 server? And are there any alternative (more customizable / non ue4-specific) frameworks/platforms available? Thanks in advance!
Hmm, that's quite a loaded question, haha. To be honest with you, I'm not sure of a great resource on that that has already done testing on it, especially around a real game situation
IMO it's best to really look at what moves need verification, and past that do what you can with less info
Yeah sorry, I have been looking into multiplayer a lot and considering my options 😛
Well emagine a casual game, like a turn-based game. They have barely any data, but pretty much all of the actions require verification (or the player can cheat)
Oh, I thought you meant something like you would be checking 10s of times per second, like movement or something
You definitely wouldn't want to do a DB lookup on every single move, you should try to cache as much as possible most likely
Unless it's at a point where the checks are pretty infrequent
True, I won't be interfacing with DB's every time, but pretty frequently
You know what I'll say next haha, that UE4 is probably overkill for something like that. Maybe it has some truth, but I also see value in using it just as a learning tool. Still though, you would have to really look at the limitations
Hm, I guess I'll do some testing then 😃 I was just hoping I could avoid it as I hate waiting for builds to complete when testing 😛
heh
@brittle sinew hey so do you know how this works? Server -> Calling a cllient function
where is it called?
Server or client
im assuming client
but i want to verify
I responded up there, client
@brittle sinew do you happen to know why im unable to get a client's Transform and spawn an actor on the server from that transform
like, the player needs to be able to decide where they place the building stuff
but for some reason when i spawn it from the server and get the structures transform
its returing a ZeroVector
What does your flow look like?
Server -> Sets the Actor Class to be later spawned on server -> Client spawns the actor, and there is a variable held to the "CurrentStructure" on the clients character. Structure is spawned on the client and the structure actor is given the characters camera (for moving to infront of the player) , its also given a reference to the player and my item index. on the actor (the structure) its replicated and it does a linetrace to the ground so it snaps to the ground, then it calls my Server_Replicate_Transform() function which all it does is get the local actor transform and set it. (Basically Replicated_transform = GetActorTransform();) then when the player left clicks, it checks if you are placing and if the object is obstructed, and then calls Server_spawn_Structure(), it spawns with the Local "CurrentStructure" variable and gets the replicated transform which is set from the structure itself
does that make sense lol
@brittle sinew
Where is your Server_Replicate_Transform function located?
If it's spawned on the client, it's not replicated
but would that mean
nothing is replicated tho
like... would it not replicate the single variable?
because thats all i need is that FTransform
lol
i dont think it nees to be replicated to set a replicated variable
but idk tho
No, the client has no authority to spawn replicated actors in the world, it'll just spawn it locally
What would you call the function on on the server, if the actor gets created on the client and is local to it?
so should i be holding the FTransform somewhere else then?
like on the Character
yea that makes sense
so basically what u are syaing
is that my Server_rep_transform() function
needs to be on something else
like the Character
or the controller?
I would put it on the controller yeah, but that's what you should probably be doing
it needs to be on something that is already replicated
Additionally, something you own
ok the worked @brittle sinew I still have problems but i think i got these
@brittle sinew got another replication issue... I have a bool which I set that decides whether or not to change a material on overlap... yet its' always returning false on the client, i did a print test from the server and the server is setting it to "true" which is what i want
See
@twin juniper did you mark this variable with Replicated?
@twin juniper and add it in doreplication macro?
yeah, that thing is reason of troubles in 99%...
last time I spent half of the day because of that thing ))
@rough iron have you seen steam voip stop working after seamless travel?
Only if something happened to the session
Like some client called end session for example
Then voip, leaderboards etc are shutdown
Is it bad to have just one massive map in multiplayer
lol
DrawDebugSphere doesnt show up on clients?
Do you mean on a multicast? It's not a replicated function by default
anyone here asked Valve if it's ok to use VPN to test gameplay between countries?
I know their terms tell you can't hide your residence with proxies etc
and I know that they deny all use like that because they don't want people to bypass geolocked content or pricing
Does anyone know how to replicate a render target? I'm trying to display a client's camera view to another client. It works when simulating multiplayer on one machine, but it dosen't work over the network. I'm replicating the scene capture component and running the games from the editor using -game
You will have to send the data yourself, I would try to implement any well known video streaming protocol
@rough iron Thanks, I was hoping it would be easier than that. I think I'll try moving the scene capture component to the client that needs the render target and just update the capture components transform to match the transform of the other player's camera. That removes the need to stream a hefty texture and the other pawn's camera transforms are easily replicated.
Way better, always try to simulate when you do networked gameplay
You could have your client directly look through the camera of the other client maybe
@fierce birch you can set your Steam download location to be the same for everyone to play with different countries. I'm from Europe and set my DL location to US-NY because that's where the host is located
Also anyone know how to do a cheap scoreboard? Currently I have to send the playerstate info of all players to each client and have that info go through some UMG logic to display on the scoreboard and the server load is going up exponentially with more players in the game
Is the client always updated on player states?
Hi guys I am using dedicated server . All my data for the game is stored externally and then loaded in or saved out as needed but just wondering where the best place to keep everything is during actual play. All the documentations and threads say different things . So for example profile stats like experience points username etc i load them in from the external database then use these to create the players profile widget but where should I store them ?? On character bp, in player controller. In playerstate? Then what about let's say all the items for the in game shop . Finally what about all the game rules and stats etc like number of kills number of deaths things like that . A lot of the stuff will need ti be shared information between players and various widgets and then a lot of it is just personal to the individual player/profile Thanks . So this is how my structure works . Player logs in I load all his stats personal information etc and display it in various widgets . Then I press play it puts me into matchmaking session if a game is found I then disconnect from that server and transfer to game server inside game server the only stats I need are the ones made during the actual match . Game ends I save all the stats back to each individual profile they rejoin lobby server where I then reload the profile and all stats including the new changes from the last match . Thanks
playerstate for individual data, GameInstance on server could store data between map changes, but storing it to savegame isn't bad option either
rules by gamemode(however, it only exists on server)
and all-n-all, see pinned messages. Network Compendium is really good place to start
@night jay I'm aware of that, but it doesn't make the network connection to route through that country
which would be nice way to test actual routing in worse case scenarios (you get double ping in that case)
I'm also aware of that you can virtually generate lag and async, loss for packets in ue4 (and by using clumsy etc) but I'd want to have real life data too
@fierce birch double ping?
well, if I connect to another country via VPN, I get the roundtrip time twice
basically the VPN machine has to communicate through the VPN server in that country before it communicates with my other computer that's not connected there through VPN
If you want VPN though you might not need steam
If you have a virtual LAN network you can use OSSNull
May I ask what platform you use for the VPN
We want to make use of one too because network profiling doesn't work with Steam
yeah, I know I can make a direct IP connection too
but would really prefer to test it on target platform
anyway, I'll probably just ask Valve if they are cool about that
so, targeting steam
guys
if I replicate a struct, do I then have to replicate its members?
and if so what about the lifetimeProps function for them?
@wise depot UPROPERTY members in a struct are automatically replicated if the struct is replicated
if you don't want to rep something in a struct, don't make it a uproperty
thanks 😃
np
to complete the reply of @jolly siren, you can use UPROPERTY if you need for reflection or whatever @wise depot, but you need to add NotReplicated to your UPROPERTY()
right, good addition to my comment
okay so I have a struct that just isn't replicating correctly and I don't understand why
how does the engine check for it changing? is that server side check for change or client side?
because I have 2 structs, one works, the other doesn't, both are marked as replicatedUsing = OnRep_Function
with 2 different functions
and i can see the values in both structs changing server side however only one of the two is calling its onRep function
both are in the DOREPLIFETIME function
Is there a way to spawn/place at design time a blueprint that is only on the server? I have a monster spawner BP that spawns monsters (lol). The spawning act itself gets them on the server/client so that is the desired effect but it seems silly to have the actual BP for the spawner on the clients side when they do nothing for them. Right now I place them at design time in the editor. Basically is there an easy way to make these Blueprints server side only?
@wise depot what does the struct look like?
@summer rivet what do you mean by "place them at creation time"?
@rough iron no, I'm not ending any sessions. I'm just calling RestartGame on the server with seamless travel. And after restart voip isn't working.
I drop the monster spawner BP's into the editor at design time
There is a Net Load on Client checkbox in the Replication Section of an Actor
what does that do?
that's a weird name...
ok well cool I will have to check that out when I get home. Thanks for the help 😃
okay cool
@jolly siren start/join again, first check if the session gets ended when you restart (I think it might)
get's ended and then restarted again?
I played like 10 games in a row 3v3. Wouldn't the game die if the session was gone?
Only some steam stuff such as stats or voip
Stats will get flushed on EndSession
Check your logs
oh I see, I'm not using steam stats, I have my own system. But voip dies after the first RestartGame. So that must be it.
I don't see where shootergame is rejoining the session
It's just a StartSession call
All clients should be in the session already
Normally it should be called after a travel, who knows might be a bug?
ShooterGame is calling StartSession from ClientStartOnlineGame only. Which is only called from PostLogin
so they aren't calling it from a seamless travel
But if they hard travel it will get called
I think they are not using seamless travel
It's just a versus game
they do use seamless
yeah, I wish the code was on github
hehe really?
XD
Try to call StartOnlineGame after a travel
There is a initialization function that is called in postLogin and in postSeamlessTravelPlayer
it looks like EndMatch ends the session
Yep
EndMatch() ends a session
but if ur trying to end a server i think its
UnregisterServer()
in AGameMode
yeah I'm just ending the current game and then restarting it. so EndMatch() and RestartGame(). So I'll need to call StartSession again at some point
ExactPing in PlayerState not exposed in blueprints?
in UE4
Correct, not a ton you can do about it, the regular ping is exposed however
If you really want to make a getter in your C++ version you could though
That is, if you have one
@vocal ingot
What happens if you call start session if you are already inside of a session. Or clearing the same online sessions delegate handle multiple times without assigning anything new to it between calls.
I'm asking because I am trying to get some logging in place so I can organize my code better. Currently I have multiple "StartSession" and ClearOn"Start/End"SessionCompleteDelegate_Handles and my game works but its messy so I want to clean it up.
is GetWorldTimerManager() not accessible by the client
and if not how can a client set a timer
How was that "Replication" stream last week?
is it possible to play cutscenes / sequencers in a multiplayer game?
@native axle @rare cloud @loud sage you guys having any fun with SpatialOS? Any big hurdles setting it up at first? Easy to implement anything afterwards?
@wary willow, I didn't test it yet but I already read the doc and seem not that complex to setup, it's only boring to wait to download and compile stuff
anyone know why, when I spawn an certain actor (or place it in the level manually) for the server its in the proper spot, but for the client its like 200 feet to the left and up in the air... but when the client hits it in its proper space it moves in both views. Only the server is seeing it correctly though. and the client can see it move fine in the distance but its invisible in its real location
nvm... apparently setting a component to replicates inside an actor that is set to replicate causes it... no idea why but having just the actor replicate but not components seems to work
@wary willow Not tried it in ue4 yet, but I heard from someone else their ue4 support is picking up 😃
Has anyone here used steam with unreal? Im trying to setup dedicated servers but the name of the id of the server keeps changing
Anyone know why?
Does anyone know if you can replicate drawn debugging lines of widget interaction components?
Nobody? hmm So maybe building a spline and the replicating the spline might be better?
It is said that most computations are run on both client and server (unless they are not relevant for client). It is also said that even singleplayer (NM_Standalone) games have a server. So, does this mean that singleplayer games run most computations twice?
No
A Singleplayer game can kinda be seen as a ListenServer without any clients connected.
But he isn't really a "Listen" server, as he won't listen to any incoming connection. It's singleplayer after all.
Computations are only run once on a singleplayer game
@twin juniper You can multicast and run DrawDebugLine with passed parameters
Is there something special about the widget interaction that this is important to mention? I didn't use that yet
@mellow cipher Where do you set the ServerName?
@boreal merlin It will probably tell you that it can't start a session that is already in progress
StartSession is called by default when a Map Starts
Singleplayer games often will find the message "Can't start a Session that hasn't been created."
Cause the GameMode/GameSession etc are calling that every time you open a new map
@vocal ingot @brittle sinew The ping of the PlayerState is divided by 4, or?
is that what you mean with exact?
@thin stratus my boss asked if this is possible but currently I don't know "how". So I wanted to ask if this is possible. In our mp-experience we want each player to see what the other vr players are currently looking at with their controllers. So I use a widget interaction component to scan for widgets and draw the debug line and it would be great if I could just replicate that line without creating a spline
DebugLine is nothing you want for actual visualization
I'm not even sure if it's surviving the final shipping build
Just make a thin mesh with a 100 unit in X direction
Calculate distance between the position of the controller and the target
And rescale the mesh
Well it's not the small DebugLine you get from LineTraces, so it's a bit bigger and better to see
Debug lines in general aren't surviving if you are unlucky
they are also not that good for performance
Just swap it with the mesh
hmm yeah, scaling and rotating a cylinder might be the best choice
And I mean
you probably have the controller already replicated
So you don't need to replicate the mesh/line
yes I manually replicated the controllers so they work for rift and vive
Each client can handle that himself
If we are both clients and I can see your controllers moving, then I don't need replicated data about the line that is on them
I can just take the replicated controller position and draw the line myself
true
I replicate the location and the rotation so that is enough to create that line
Yes, i mean at least as long as you have the end point on the clients too
But that should be the same line trace
with the same settings as the actual user
as soon as you have visuals that need to be on the client, try to check first if you can simulate them on the clients
Without the need of the server
the end point would be the end of the line trace where the controller is facing already so I don't need to tweak that
@thin stratus I don't know what exactping is
Yeah, the exposed ping is rounded
But for what do you need the exact one?
If you have any C++ skills, you could utilize this:
/**
* Receives ping updates for the client (both clientside and serverside), from the net driver
* NOTE: This updates much more frequently clientside, thus the clientside ping will often be different to what the server displays
*/
virtual void UpdatePing(float InPing);
Cause the exact one isn't replicated at all
But if you only need it on the Server, then you can also create the getter that Lethal told you
@wary willow Haven't got a chance to test it out yet, too busy with uni 😦
If I join someone's server but it isn't a listen server, the client won't load the map but can I still have access to the playerstates of all the clients in that server?
and vice versa
@thin stratus I am just curious. In what way would you need ExactPing instead of Ping?
clients, ExactPing is a much better representation of your ping than Ping is IMO
also Ping is a uint8
Which is ExactPing * 0.25
being uint8 means its maximum value can be 255
therefore, the maximum ping that Ping can actually support is 1020. As soon as your ExactPing is over 1020 (which some games may support like Civ) you will have overflow issues
Also, ExactPing is already a float, so if you're doing latency compensation you get Lateny by ExactPing * 0.5 (because multiplications are cheaper than divisions)
so you could do for instance:
FVector ForceToAdd = (Foward * Velocity) * (ExactPing * 0.5f);
as a 'really' rough example
although it would actually be (ExactPing * 0.001) * 0.5
as ExactPing is in MS not S
@vocal ingot
Ok, thanks!
Hey guys, is there a way to restrict which blueprints get loaded into a dedicated server?
Currently, I have a combat system that spawns certain blueprint actors at runtime. I.e. a player does an attack, which spawns a burning effect that is attached to an enemy character for a certain amount of time. Right now I have like 100 blueprint objects, but players will only have 5 of these available per character.
How can I tell the server to only load the selected blueprints, to reduce load time and add security?
Usually you'll want to use a TAssetPtr for something like that. Not sure what your point about security is really, as this will still load it when requested, but it should alleviate initial loading times
If you're in BP however, I'm not too sure.
Well basically I want to avoid players trying to spawn Actors that theoretically could not even exist
Right now I have a list of abilites on the server that gets copied to the client, the client does a preemptive check whether or not they can cast the ability and the server checks back on that
If the server doesn't even load the asset file (the actor blueprint for that ability) it would add another label of security so that players cannot trick the server into thinking they got all the abilities etc
But really it's about load time, since right now I have like 100 abilities even though in a single match players online have ~20 or so total
Yeah, IMO that's not really a reason you would want to use async asset loading, just do checks on the server normally, could get weird trying to spawn assets that don't exist, even if you get it working correctly
Do you happen to know what happens if the dedicated server has access to blueprints that never get spawned?
Do they still take up memory space somehow?
Or only if actually used?
I'm not really an expert when it comes to that kind of stuff, sadly :/
I'm not 100% sure how it works in BP only. I know in C++, if you load BP classes in via a normal pointer, they will get immediately loaded and take up memory. That's the good thing about TAssetPtr. I don't know if there's a ton of info on deep BP memory management besides the source, which I wouldn't look forward to dig through 😛
Oh well, since they are all based on a (more or less) empty C++ class I could probably work with that anyway
@brittle sinew hey if I run a Server UFUNCTION() to save a file, it will only save the file on the server right?
and not on clients
@brittle sinew Thanks for the tip, I will look into that. 😃
It will save wherever it gets executed
(TAssetPtr that is)
@brittle sinew is there a way I can make it so that I have a dedi server which is the only one to save player data (Like im storing it as json and I want it to only save and load from the server)
in the game mode
Not really, you would have to write separate server code for that most likely
(not really as in I don't really know)
im pretty sure i can just do the saving functionality
in a server function
and it should only save on the server
lol
If it's in the GameMode, it's always on the server no matter what
I thought you meant a separate dedicated server
Like in contrast to a normal SP/MP listen server type thing
oh
noo
im just saving my data from the GameMode
and I worry the files may somehow get saved
to the client
lolol
but idk if thats possible
also do you know if its possible to get a player controller via UniqueNetID or their playerstate
I would like to know the best way to replicate character rotation
when I use SetActorRotation on server side, it's correctly replicated to all client except owning client
I read some stuff about CharacterMovementComponent
or an FRotator using RepNotify
I only want to replicate Yaw
Hi. Anyone knows where can I find an updated guide of how to make a dedicated server?
Has anyone gotten hotswap gamepads to work for local multiplayer? Like Everytime I plug in gamepad during runtime it doesn't work
And I do spawn player when new gamepad is detected btw
Input just breaks for some reason...
@dull stream where you have kept your input code?
@rare cloud use a replicating variable and set it on server. As it will update from the client
It works when gamepads are plugged in BEFORE game starts btw
Then I can unplug and do whatever. Works fine. Just when I don't plug them in beforehand it breaks.
Is there something in the engine I gotta set beforehand to let it know, okay there can be 4 gamepads
@desert breach, yeah I'm just curious if there is already a built in replicated variable, thanks 😄
Anyone have info on my problem?
Is it something I broke or something I'm forgetting to do, etc. Tips?
I got it, no worries
hey
how do i connect to a steam server
i cant type open ip_here
what do i have to type in the console
to connect
@twin juniper What do you mean by Steam server?
K, (where at exactly?)
in Registerserver()
Is this a dedicated server?
yes
im going to run it on my laptop to test stuff out
i just want to be able to connect to it with my friend so we can see if its all working as intended
void AVeritexGameSession::RegisterServer()
{
Super::RegisterServer();
//SessionName = "Veritex 1";
IOnlineSubsystem* const OnlineSub = IOnlineSubsystem::Get();
if (OnlineSub)
{
IOnlineSessionPtr Sessions = OnlineSub->GetSessionInterface();
//Sessions->GameServerName = FString("VeritexServer1");
if (Sessions.IsValid())
{
AVeritexGameMode* VeritexGameMode = Cast<AVeritexGameMode>(GetWorld()->GetAuthGameMode());
if (VeritexGameMode)
{
FOnlineSessionSettings Settings;
Settings.NumPublicConnections = MaxPlayers;
Settings.bShouldAdvertise = true;
Settings.bAllowJoinInProgress = true;
Settings.bIsLANMatch = false;
Settings.bUsesPresence = false;
Settings.bAllowJoinViaPresence = true;
Settings.bIsDedicated = true;
Sessions->CreateSession(0, GameSessionName, Settings);
/*HostSettings = MakeShareable(new FOnlineSessionSettings(false, false, MaxPlayers));
HostSettings->Set(SETTING_GAMEMODE, FString(*VeritexGameMode->GetName()), EOnlineDataAdvertisementType::ViaOnlineService);
HostSettings->Set(SETTING_MAPNAME, GetWorld()->GetMapName(), EOnlineDataAdvertisementType::ViaOnlineService);
HostSettings->bUsesPresence = false;
HostSettings->bIsLANMatch = false;
HostSettings->bIsDedicated = true;
HostSettings->bShouldAdvertise = true;
HostSettings->bAllowJoinInProgress = true;
HostSettings->NumPublicConnections = MaxPlayers;
Sessions->CreateSession(0, GameSessionName, *HostSettings);*/
}
}
}
}
this is my RegisterServer() function btw
I just need to know if I can still use console: open ip_here
I haven't done Dedicated & Steam before, but you may be looking for this:
open steam.ServerSteamID(long number):PORT
If you are still having any issues, you should check out ShooterGame
No idea, remember I've never done Dedi/Steam, only dedi by itself and steam regular listen server
And yes it does
That's like the "best available source"
for C++ networking
yea
even though its all in slate
for the UI
lol
so i dont even know where to look xd
@wary willow do you know if it's possible to mix-match BPs and C++? It's a lot easier to use the BP node "FindSessions" than it is to use the c++ equivlant
im just curious if you can mix-match them
lol
The only thing I know is that for dedicated servers is was only possible in C++ before
When doing it on Steam
There is a plugin I am looking for
To help you out
I know I've seen it before
@twin juniper https://github.com/EpicGames/UnrealEngine/pull/2135
not a plugin, but this is something I had been following
ah, you're already on there
yea
I just havent gotten that to work lol
because my partner is using the pre-compiled engine
and im using the source
I assume you looked at this before? https://wiki.unrealengine.com/Using_Steamworks_with_UE4 title is misleading
so we cant rly do that
lol
yea i already got it setup
i just dont know if open 127.0.0.1
will work or not
it works on local
but idk about steam
you haven't tried?
@twin juniper Advanced Sessions?
@thin stratus you were right, it said cant start a session thats already in progress and cant destroy a null game session thanks.
Am I missing out on anything important if I don't call OnCreatePresenceSessionComplete().Broadcast(SessionName, bWasSuccessful);
I took it out momentarily but everything appears to still be working.
Anyone here use Photon's Server backend? I'm curious as to other's experiences with it. (Please do tag me, as my status is misleading, and I am not currently "online")
@balmy plaza I poked at them a bit but never anything full. Mainly ended up dealing with in-house solutions. My recommendation for any middle-ware vender is to ask yourself what happens if tomorrow their company died or they blacklisted us or something. That said photon looks fairly good for the features they deliver. If they meet your needs there isn't anything stopping you from trialing them right?
Using them would limit your platforms as well it looks like.
What feature set do you need?
We were just trying to find something that could easily do some RPC and replicate it to two clients at a time. We don't need something permanent, but rather just looking for a quick solution to build a prototype off of, to see if the concept works. We can't test the concept without having the ability to replicate it, and the company thinks it best not to use the UE4 solution. I personally don't see anything wrong with it, aside from the 10 yr. old SSL. @Mr.Fishy (Brune)#9850 (Thanks for the reply, sorry mine was so late.)
why not a listen server?
@balmy plaza There are a lot of choices you can do. I mean for a quick solution a listen server is easy to setup which is client based not server based. But then you have host advantage.
If you are looking for a quick and easy dedicated server system then honestly photon might do just that.
but the question of SSL is what data are you protecting? 10 year old SSL isn't cool.
but if its just like player names then why?
@dull stream You should check the call back of function which triggers, when you connect the gamepad in between. What is happening is your game looks for game controller in the start. And set the input controllers accordingly, it doesn't do that check in the middle of the game
Its fine @fieol#4977 I already fixed it earlier today
I had to go into input interface, basically, and check when gamepads were getting connected and create the player after the gamepad is connected.
and also make sure that input was set to game mode or w/e
I dont think creating the player before the gamepad is connected initializes it properly idk. I could be wrong about that but it seemed to be the case.
I feel like i shouldnt have to write my own function to check for gamepads but eh guess it doesnt matter
they should really make a blueprint node and some functions for it. I think theres a function for checking if a gamepad is connected, but not checking for specific gamepads (player 1, 2, 3, etc.) have been connected
cool
Is there a way to efficiently send one-shot messages in UE4?
Like umm
I have an array of things, the length is very rarely variable
I need to replicate this array at a very controlled rate
E.g. replicate it at a rate that depends heavily on a complex rule
Previously I've simply called a RPC and passed an array into it, but it seems to carry a lot of overhead? Or maybe it doesn't and the data just ended up big like that?
@cloud ledge so you're sending huge amounts of data and you want to limit when it does it?
is that right?
don't have it marked for replication, whatever class it is that replicates it create a timer that triggers an RPC to pass the data along
i would also consider writing some compression methods
Yeah, I'm using RPC calls
But I was wondering if there was any overhead and if so, any way to reduce it
well the overhead would be how much data you're sending I guess, if its large amounts then its a bandwith issue
in which case the way to reduce would be either send it in chunks or compress it
@cloud ledge you can use the Network profiler to check if it's a bandwith issue as @wise depot mentioned
Tool for displaying network traffic and performance information captured at runtime.
if you're using steam P2P good luck with that.
it doesn't work with 4.14 and steam P2P
hmm that's true
other versions idk, but 4.14(.3), launching the network profiler gives a CTD
steam network look like a nightmare
I actually never use it but I read so many bad thing about it x)
nah its really useful tbh
steam Relay servers are great for what they do and they're really simple to use. They're just a pain in the ass when you need the profiler
I'm currently looking how the rotation and the location are replicated with Character and CMC, to search a way to force the rotation to be replicated
yeah, in the pawn's blueprint, Replication->ReplicateMovement=true
then in the extended options set the rotation ones to whatever you want
@wise depot, Replicated and ReplicateMovement are already set to true
its rotation should be replicated then?
Unless you're calling "set rotation" on tick somewhere that is overriding the replication
if you use SetActorRotation on server side, other client will see you rotate but owning client see no change
so then your owning client is doing something that is overriding the server's replication
so somewhere you are calling "SetActorRotation"
which is forcing it to compeltely ignore its replicated rotation
the rotation has a COND_SkipOwner, because CMC use client prediction I guess
to avoid replicate something that owner already know
@cursive herald Payments is what we're trying to protect. 😃 Sensitive data like passwords and the like, too. But yeah, quick and easy, and we need to avoid any client based code, the server needs to handle everything mechanical in the server, client's just going to display stuff.
@rare cloud well remove that condition if you want the owner to recieve it. However if the owner directly uses the servers replicated data then they are controlled by the server
therefor all input they use will be delayed by their ping
so, can you even kill the PIE session?
oh this smells like burning
Opening map as listen on Gameinstance Init
@thin stratus can you build a Server target without the source?
I've never tried lol
Im assuming not though
Nope
K
Question, say you had to replicate a grid of 64x64 tiles, and each tile could have 25 states associated with it. What would be the best method to handle this?
we are doinng it now, but UE4 keeps trying to send every tile state on every tick, creating massive lag
is there a way to process the data in chunks or bits, or a method to que the data up so it can process it as it goes?
Why do you need to constantly update 64x64 tiles
How often do they actually change?
well.. good point @thin stratus
so say the grid, needed to process the entire 64x64 every time, but needed a method to skip past unchanged tiles, what would you do?
some kind of recursive check for the state difference?
I assume it's set to replicate
we are making a grid, each grid spot has a state associated with it
is a plant on it, is a plant not on it
What keeps you from only changing the data of that one tile, whic hthen replicates the value?
has it been blah or has it not been blah (blah means like 10 possible sub states)
hm... not sure, i guess we could go through that route
Well you have 2 possible things here
You could have each Tile being a replicated actor with a replicated state variable
let the server change the tiles state variables
and then let the tile handle the rest itself
OR
You have some kind of manager that has a narray of these tiles. That array would need to be in the same order available on the clients
Then you can change a tile based on an index
And the manager gathers all changed tiles with index and state
hm... i think that is how they are doing it
but the issue was the sending the information was too large
and that structs holds the connection of index and changed data
Well if something changes, you add it to the change array
On tick you check if the changearray is empty or not
If not, you process all the changes with one RPC and clear the array
hm...
well i think they didnt want to go with that because of the actor cap or some crap 😛
Yeah before we were sending it all in one replicated TArray, I knew we would need to break it up
@south flare is the coder for it, i told him to jump on
I'm with riu
Well, you can do both
Actors are spawned anyway
Making them replicated doesn't hurt as that isn't actually flooding anything until you actually let them replicate something
Right now we just spawn these tile actors loacally
Then we have a rpc system that we use to call for state updates
Yeah that's the other version. Then you need to make sure that the Server and the Client tiles are indexed
On a managing actor
And you gather the changes in an array?
Yep, I'm making a system now where there is a replicated actor for a subsection of the tiles. Each of them will have a replicated array of their own tile states
Since before I just put it in as one replicated array. Obviously not optimal
I'm not directly talking about a replicated array though
The Array is only contructed on the Server
Every time he changes something, you save the change with a new entry into the array
And in tick you check if the array is empty. If not, you multicast the update by passing the array
Then you clear the array
So you are suggesting a change stack?
basically yes
Ok
Then you only have one multicast per tick
And I doubt that your states change that much
I did that with my inventory. If there were a lot of changes, the inventory was constantly pushing multicasts
So I gathered all changes and pushed them at once
They dont, I can implement a que system with the current implementation as well
Solved issues for me
I do need a way to broadcast to new players joining in the states
Which I would use my replicated arrays for
Which get replicated based on netculldistance
Well that's an issue then with Multicasts. Gotcha
Hm
An OnRep variable would take care of the joining players
Yeah
You can try it with the Array itself, without the multicast. I'm actually not sure how often an array would get replicated if it changes rapidly
Since I subdivide the grid. Based on distance you would just replicate in a certain array instead of the entire thing
Might need to set the array with itself to actually get the OnRep to call though
Some Array operations don't call the onrep
kinda annoying
If you set it with itself it still won't replicate, it does need a value change
I mean, you could also NOT use the OnRep, stick with the multicast and simply ask the Server as a new player for the updated grid
That is true
or even just let the server push it anyway
With a simple OwningClient call on the PlayerController*
Yeah
OnPostLogin
Then I can just use all the serverside array data and combine them for save and load purposes
Which is good
I could also set a repcondition on that array so that it only initially sends all the state's of that subsection to further save bandwidth
before match has even started, I doubt
there was absolutely nothing on replication when it was dropped
Ok
Did you try starting up wireshark
Setting up a display filter
Set to udp.port == 7777
Make sure it's not sending
Although other things will be sent like world time
And other little things
What kind of RPC did you try?
a structure of vector,string,enum and 2 integers
Only thing that comes to my mind is the wrong usage of ownership
Did you have uproperty on all strict feilds
aka, calling a ServerRPC from Client while not owning the Actor
Struct*
What is your problem? Sorry, I just arrived
non-reliable RPC dropped
reliably dropped 🙃