#multiplayer
1 messages ยท Page 78 of 1
Yes
Then look into Fast Arrays.
You will likely want to setup a light weight struct that you use to replicate some sort of ID or sync data to Clients this way
Not sure if GameplayAbilitySystem already has a built-in solution for this, you may wanna check @red musk
last documentation I read about it said no, but it was from 2019*
You maybe able to use PredictionKeys to help. But GAS itself does not deal with this.
You will likely find more effective solutions in the Mass system.
Or a custom one of your own.
Niagara may even be a better alternative.
Another more wild alternative would be to make your own ECS framework. but that probably will be a very time consuming task
That doesn't really help with prediction. Fast replication or processing of entities can't overcome network latency.
The general solution is to spawn a projectile on the client for prediction purposes while waiting for a server response. When you ask the server for a response you send along an id (prediction key in GAS terminology, as DevilsD said) which the server assigns to its "authoritative" version of the projectile. The server's projectile's initial spawn position may also need to be offset based on client latency.
When the client receives the server's version of that projectile, it can then interpolate its local version to the server's version (which it correlates based on the prediction key).
This assumes that the projectiles aren't so fast as to make interpolating towards the server's result completely pointless (for example, simulating actual bullet speed would make interpolation pretty much useless).
I've shipped games that do similar things. So it's not entirely wrong. But I think some of the other suggestions are worth looking into.
Is a TSubclassOf<> parameter valid for an RPC? Rider didn't show any UHT complaints but I haven't actually tried yet.
The reason I have doubts is because the value could refer to a blueprint class which I feel could act funky due to minute differences between the client and server versions of the theoretical blueprint. Would it work fine regardless? Let me know if I'm being paranoid.
If it is not valid what is the proper way to communicate something like that?
My use case is to get the server to tell the client to spawn an actor of a specific type (not replicated). The only other thing I have come up with is to maintain a hardcoded map of some key to class instances that can be looked up on the client, which I'd rather avoid.
Wouldn't doing interpolation based on server position effectively make it a regular replicated object from a network traffic perspective? I.e. constantly replicating down its position for the client to do correction on?
Assuming you do literally nothing else to optimize network traffic, sure. The interpolation is to handle moving towards the server-authoritative position in case the client mispredicted something. After that it's less likely for a misprediction so you could probably get away with either having a very low network tick rate for the projectile, or not using an actor at all and using a single RPC to "confirm" the server's position a single time. The single confirmation is probably good enough if the projectile is fast.
Or, if the projectile is so fast that you can't really get away with the roundtrip to the server, then you just accept that the client will sometimes mispredict. See "blood shots" in basically any competitive shooter - there's no solution to them.
If your projectile hits a target faster than the roundtrip time for the server to correct the client then you cannot physically correct a misprediction.
Thank you!
One more question (thanks for your patience); a replicated actor by default doesn't do client side simulation and correction right; that's a unique element of the CMC. Does the projectile movement component do anything to that degree? I.e. any chance I can simply just lower the net tick rate and call it good with out of the box projectile stuff. My understanding was that no, PMC doesn't do client correction/interpolation from server authority, but figured I'd double check my assumption
Classes should replicate and RPC just fine, since AFIAK all its doing is sending over the netID of the class CDO anyway
That's the feeling I'm getting. The blueprint editor doesn't have any issue with a replicated event having a class as an input, which gives me a good sense that it should be okay to do. Just trying to make sure I'm not doing anything hacky.
IF you're using different versions of the game, then you run into all sorts of problems. You should assume they're on the same version and types are identical.
Any clear reasons why animations work fine when playing netmode client but in standalone everyone is TPosing ?
This seems to be a lyra specific problem, If you dont set their invisible skeleton to "Always Tick Pose & Refresh Bones" animation standalone wont work. This is actually a problem though. Since playing as standalone is essentially the server then does that mean that the server will have all players in a tpose? How would server side hits work if thats the case since the players animation move things like hit boxes or physics assets that are being traced again?
True. But in my case its needed. since i have limb damage multipliers
does anyone know how to make one widget appear for all users, im trying to make a chat room for me and my friends cause I got bored but the main issue im running into is that the users all have separate chat boxes so they dont see the messages. would anyone know how to fix it?
Widgets are not and not meant to be replicated. UI just is meant to show things.
So if you want to have a chat, you will need some backend system that sends and receives messages, that then are shown with you UI.
One approach could be to use the player controllers to send a message via a RPC to the server, the server then distributes it to all players.
Hey guys im trying to spawn a floating damage text to players when dealing/dealt damage but im having problem finding referense to the target player.... or the editor is... any tips ?
anyone ?:/
That's bcoz, no pc on the server, add check NO dedicated server
Or use is valid player controller before the widget creation
@elfin echo but it is a dedicated server ?
i tried changing to a valid player but i was unable to :/
You can't create widgets on a dedicated server, so you should check if(!IsDedidcatedServer()) before creating widget
On server only gameplay logic, no visuals, no widgets, no effects
aye but im creating it on the client arent i ๐ฎ ?
Multicast calls on all clients and server
oh so the error is from the server not from a client
so if im creating in a multicast i need to check if "server" so it dont spawn on that one
i c
Yes, for visuals logic
I think
ah ok
i want to read up on how server instancing works but i dont know the terminology.
"server instance" is a lobby that takes x users
if more clients are connected than the lobby can hold, it opens up a new instance.
i dont want to create this specifically. I just want to know what the parts are called so i can study the topic.
For this you should create a master/matchmaking server(backend), or you can use services like Amazon AWS or Microsoft PlayFab
just so i dont get confused later. if i have a trigger in the lobby that enables any member to launch them into a personal dungeon. Would this dungeon instance operate on the same base principles as the lobby instance?
im gonna study master/matchmaking server(backend) either way
thank
hi all
I've noticed when playing as a client in an MP environment, sometimes when debugging I get a view as "Simulating" and sometimes "Client-Simulating" - what do these mean? Looking online there doesnt seem to be a good explanation - so hoping someone here knows?
Personal dungeon only for one player?
For this case you can use just an open level, but if other players can connect to this room, you should tell the master server about map creation
its arbitrary, i just want to communicate that from a lobby, more gameplay related sessions can be created.
i guess i could just as well ask what its called when WoW movies players into separate layers to balance teh numbers active network agents
i suppose the differences lies in persistence server vs needing players to exist. which perhaps is the same thing.
ill just start googling and get my feet into every part.
hello im kinda new to writing my own code (Without following tutorials) can someone tell me how to get the FUniqueNetID from a friend?
im trying to get a statistic (like a level) from a friend
im reading this article that basically answrs my question and takes me further than that in describing multiplayer game architecture
The lessons learned from building and evolving the dedicated game server architecture for The Maestros.
That's big boy stuff
Without a hard loading screen it'll be very difficult
at that point when i wrote that, i didnt know what i wrote.
If anyone has any ideas on how to join a server without a hard load (wow or elden ring style) I'm all ears but idk of it being done in Unreal
what could be the reason for gamemode to spawn default APlayerController instead of a custom which is set in the gamemode properties for a spectator after seamless travel?
upd: i've checked the logs and I can see that after seamless travel a correct PC spawns for client, but soon after it seems that it is being replaced ๐ค
[2023.04.21-10.47.47:533][630]LogWorld: StartLoadingDestination to: /Game/Levels/MyLevel
[2023.04.21-10.47.47:535][630]LogWorldPartition: New Streaming Source: BP_MyPlayerController_C_0 -> Position: X=800.000 Y=550.000 Z=204600.000
[2023.04.21-10.47.59:360][632]LogNetTraffic: Sent RPC: BP_MyPlayerController_C /Game/Levels/MyLevel.MyLevel:PersistentLevel.BP_MyPlayerController_C_0::ServerNotifyLoadedWorld [33.4 bytes]
[2023.04.21-10.48.02:620][ 65]LogWorldPartition: New Streaming Source: PlayerController_0 -> Position: X=7433.895 Y=18731.148 Z=1261.895
Can I setup my UPoseableMeshComponent to be automatically synced from Server to Clients, replicating all bone movements?
Trying to understand "Find Sessions" (blueprints) and the documentation simply says "Searches for advertised sessions with the default online subsystem"
What is the "default online subsystem"?
I need some advanced explaining, why is that for sprinting the "correct" way is replicating a Boolean instead of replicating a new value for the max speed?
https://www.youtube.com/watch?v=RtQRMcupJs0&ab_channel=ReidsChannel
Support the channel through donations. Crypto accepted!
PayPal: https://paypal.me/reidschannel?locale.x=en_US
Patreon: https://www.patreon.com/reidschannel
Bitcoin: 1JFwWHr4X6uAeoZadukzqKjzFBj3Qjy7Sk
Ethereum: 0x2B2Bc108F1Cc0fF899959dEF3226637787d8C3dE
Dogecoin: DNQ33YnhpWoTBokBNVkZP5ub8KTLkpyjpv
Join our community discord!
Discord: https://dis...
Is the point that by replicating a Boolean in that bitflag manner we somehow store the change in the prediction/correction chain?
Here is the same thing, but I don't understand why ๐ฅฒ
https://github.com/Vaei/PredictedMovement/
This isn't something we can answer in a short message. Google client side prediction
There are in-depth explanations out there
Its an incredibly complex topic, I tried to find some resources for a newbie a while back but it's something that you'd want to research yourself if you want to make multiplayer games.
https://fabiensanglard.net/quakeSource/quakeSourcePrediction.php
https://fabiensanglard.net/quake3/network.php
https://docs.unrealengine.com/udk/Three/NetworkingOverview.html#Player Movement and Prediction
https://gafferongames.com/post/what_every_programmer_needs_to_know_about_game_networking/
Introduction Hi, Iโm Glenn Fiedler and welcome to Networking for Game Programmers.
Have you ever wondered how multiplayer games work?
From the outside it seems magical: two or more players sharing a consistent experience across the network like they actually exist together in the same virtual world.
But as programmers we know the truth of what i...
I understand the basics of prediction and replication, what I am not sure is the setting the flag in that bitmask ties in to the CMC replication or why is it better than just setting the variable for speed in the client and firing an rpc in the server to do the same
by setting the flag there we make sure that we land inside a predicted/replicated frame? ๐ค
that's why we set the bitflag instead of just creating another replicated bool?
so setting the bitflag is a "saved move"? ๐ค
Anything that governs the movement parameters must be part of the saved move stuff
If it's not, you can't replay moves properly
Anything that dramatically changes movement parameters should also qualify as an "important" move
Whether two moves can be combined also relies on this
CMC shouldn't rely on external properties or RPCs, otherwise you break it's determinism
The affects of this aren't obvious until you're in a "real" game where packets are dropped, clients misspredict etc.
ok, then I am on the right track, We use those bitflags since those are replicated as a "saved move stuff"
if we were to create another replicated bool into our CMC it wouldn't be inside the saved move
I will try to digest the info from everything and try to make a smaaaall explanation
thanks to both โค๏ธ
Guys, does anyone know how to replicate a component that I have extracted from a database? I am setting up a system that has an id; I extract a component from a database that is a skill; then I use it with some interfaces to execute code on the server, but this component only exists in the client that has it, how can it be replicated to the server?
what do you mean by "extract a component from a database"?
The only way clients can send information to the server is by calling RPC functions on actors they own (their controller, pawn, player state, etc).
Pretty much yes
the state of Sprinting needs to be incorporated into the CMC's move / prediction system
the component class will exist on server, as will the ID
so client can just tell the server the ID or the class of the component
I am setting up a skill component from 0 and all my skills have an identifier in the database where there is a field containing the class of the skill
then my user passes him an id of the ability that he wants to execute, it will look for it in the database and it will become a component of the ability that is the class of the ability but of course that only happens to me in my character on the server I get none
Here I extract what ability I want to execute and I save it in a variable, then I execute an interface if that variable has it in the client, it works perfectly for me. but when I run the code on the server it gives me an error
solved ๐
it already works on my server
it was easy actually
how on earth is there no, "that was easy" emoji?
Because that almost never happens here
check out delgoodie's tutorials on YT on the CMC, really good for learning how the CMC works
exactly why we need one
I second @dry pebble's recommendation.
Delgoodie's CMC tutorial series is the most awesome and concise (yet detailed) dev guide I have ever seen.
He also has a discord which you could join.
You can find it from his YouTube videos.
I am watching now and it seems very well thought out, thanks โค๏ธ
What plug-in would you guys recommend for multi-player in UE5. I have previous experience using photon and normcore with unity, but never tried multi-player in unreal. Also, can it be done in a blueprint project, or would I need to have a c++ project.
I don't know of a plugin that does multiplayer, it's more like all of stuff that needs to replicate should be setup to replicate as efficiently as possible and to only update when necessary. There's also concepts such as authority and ownership which have to be learned so that the flow of logic is properly understood. It's a mix of blueprint and c++. You can try going 100% blueprint but you might find that one day you'll want to extend some of the classes or create a new parent class with some c++ in it which all of your characters in your game need for example.
Unreal has a very solid built-in networking solution. There's no need for anything external to get networking up and running like you do with Unity.
I see. Yes, I've used those for local, I was just wondering if I NEED a plugin that handles a server, I guess then, so I can connect people outside my house! xD
If you want to use a cloud server like Playfab, then you would need to integrate that. But if you're just doing dedicated server with clients that connect to it (or listen server), then you simply run the game/server.
And make my PC the server?
?
If you run either a dedicated server or run a listen server on your machine, then it is a server for your game.
I mean, lets say I build the exe. I want to connect in the game with my friend from, lets say, Australia, but I'm in Antarctica.
make sure the proper ports are open and connect via IP
Ah! I see... Ok, thank you! I'll try that. ๐
there might be details I'm missing, but that's the general way you do it
I've heard steam can also be used to do the server part?
I'm sure there are approximately 17,000 youtube videos of various qualities walking you through setting this up.
Quantity is not always quality, unfortunately...
I haven't personally integrated steam stuff. I don't believe steam hosts the servers themselves.
Running servers costs money. You can host them yourself, let players host their own servers.
Hmm, that's alright, I'll try the earlier suggestion. Thank you!
What kind of game are you making?
Hmm, I suppose it falls under category of a simulation.
How many players? How long is a session?
Of a town, where I'm hoping people can join as their own characters.
Around 10, I guess.
persistent world across sessions?
Session is more like an MMO or minecraft one. You connect to see others in your world, and you save progress and disconnect.
yes.
sounds like you probably want one person to run a dedicated server (if you want it to be available 24/7)
if not, they could run as listen server
That's what I was thinking. An old PC perhaps.
Well, a spare. not "old" old
xD
I haven't dug deep into UE5 yet, I've been using UE4 for ages. Have you got experienc with multiplayer in UE5?
I know graphically there is quite improvement, is it easier to handle these things now? I mean, it was already pretty easy with local setup in UE4, but I was wondering if there are extra features you'd suggest?
I don't know that I've seen a lot of changes from 4 to 5 in the things I work on, including writing network code. Doesn't mean there aren't things though.
For me, 4 to 5 was mostly a different editor UI. :/
Oh... I guess it was more graphics focused.
It's all I saw heavily advertised anyways. Oh, and a new input system.
lots of cool new features and tools and editors and some systems rewritten
why isn't this working with steam?
Since it came out I've mostly been working on networked gameplay systems and not much changes with that.
Steam requires 2 accounts to test, how did you test on a single device?
I used PIE
@thin stratus I agree that some explanation is needed for newer users but I don't like the explanation, I think it could be summarized a lot better with a few links, what do you think
https://github.com/Vaei/PredictedMovement/pull/2/commits/a9214831540323dba08723e79ce45b678a9043a9
Hello ๐
I think the two links explain the whole point pretty well
I added some explanation in case you know the theory but didn't manage to link it to the practice
But maybe the links are enough ๐
(also, my way of writing/explaining is pretty conversational which might not be the desired tone) ๐ฌ
@frank birch Instead, I have added a FAQ, because there have been other questions so I think it is a good time to cover everything
https://github.com/Vaei/PredictedMovement/blob/main/README.md#frequently-asked-questions
I also cleaned the readme up a bit, I had a few headers #'d wrong, reordered a couple too
Didn't like how the description for Sprint was "Well, it makes you sprint", it is obvious but I could have still been a little more informative, now its "It makes you sprint by changing your movement properties when activated." -- I was probably just in a hurry there and had other priorities
@frank birch Give that a read and let me know if its clear or not
Btw for me to accept a PR it would have to be indistinguishable from how I write (or how I code), this is for readability and consistency
When I write this stuff I'm thinking about how I can deliver the necessary information without making it a chore to get through (nothing beyond the necessary information)
Wait what are we talking about
Last thing I pinged you on was the Timestamp reset
Or not?
Nah someone posted an Issue on git saying its hard to understand and tried to PR their own explanation into the readme
Ah. I was missing context haha
Instead I added a FAQ to the readme
Makes sense
are p2p solutions wildly different in UE compared to dedicated server instances?
UE has no P2P. Only ListenServer and DedicatedServer
yeah i ment listenserver vs dedicated.
i guess my question is if the job from listenserver can be applied if moving on to dedicated server solutions
Epic very much believe in client-server models
Listen isn't p2p but fair ๐
Most systems are compatible with both but you do need to build it with both in mind
fair
@flint hollow This can't be answered in detail but in theory nothing stops you from it
If you support both then you might need to write extra code in some situations
and not for proof of concept
I build my stuff for both because its a very minimal amount of extra work that rarely requires much, mostly just need to make sure to test with both
mmmhm
the actual work to be done is unknown at this point. im mostly doing the puzzle of the broad picuture. pfc vs more intended visions.

Ah in that regard. I mean code wise it's not too much different. You should be able to write your actual project post poc with dedicated server just fine. It's just some smaller parts where you need to keep in mind that the server is not also a client
ah yes yes
i was going deeper into dedicated host structures and i just cant motivate paying for it
An example are things like a Multicast that spawns an explosion vfx doesn't need to spawn it on a dedicated server
oh right
It's shit ton expensive so can't blame you
yeah those details i expect to learn about in the actual phase for making the network... work.
Hosting should probably also be done on linux
Cause most of the providers are more expensive on windows
@elfin echo hi man i got the error to dissapear when checking if not on dedicated server but it dosent display on the clients either got any ideas why
what are the cpu/memory or general hw requirements for a dedicated server
i cant seem to find it anywhere
You won't really. The requirements vary far too much.
i assume in its least complex implementation it has some baseline functionality
Some games only need a server that ticks 10 times a second, and updates very light data. You could run it on a tablet basically. While others require 120fps updates for 20+ players
I got this from unrealcontainers
so could i theorycraft this ?
or is it purely a handson research process
Maybe if you could get your hands on some statistics you could get a rather vague approximation.
what are the statistics in this case?
I'd start with trying to find the servers used by the games closest to your target. You might be able to get an idea from what.
good idea
But even that is iffy. Implementations matter a lot. Bad programming can lead to memory bloat or extra server CPU use. And whether the games you check have that issue or not is another factor.
yup
all in all, i can approxivague some ideas but i will learn most of it hands on, unlocking all the knowledge tiers.
Mostly. In general the only real correct answer in the end that has any merit is.. Profile it. ๐ฆ annoying, but true.
its just that i have my own 1000/1000 connection and plenty of hardware
i got some nice older small desktop stations that run silent and solid
even have a surplus desktop with XEON/ECC
which would run silent without GPU
only thing im lacking is a a public IP range
Handson research with actual players playing tbh
I cannot, at all, suggest a paid Dedicated Server setup unless you:
- Are 100% certain you have players to support it
- Have a monetization model to actually support this in the long run
- Shit bricks of gold that you can throw at it in the first few months that you are fine with never recovering
- Have a bigger development team
Smaller studios and single dev should stay away from paid DediServer hosting.
Make a game that is ListenServer or allows users to host the DediServer.
And yes I'm aware that removes all competitive game ideas.
If you are fne with all of this then yeah, develop your game, setup the automation to at least simplify the upload to the paid instances. And when the game is alpha/beta, do tests with players and monitor the server usages
i saw that i should not use components for perfomance in multiplay, should i dissolve components for future?
11: Minimize the amount of components with replicated variables (Multiplayer)
Unreal engine networking works by gathering what objects are nearby the player, and then it checks them for changed properties. The cost of checking the changed properties depends mostly on the number of objects, and not on the amount of them. It is much faster to have PlayerCharacter with 100 replicated properties, instead of having Player Character + 9 components, and 10 replicated properties each. This goes against good architecture, but there is no good way around it until PushModel networking is stable (unreal 4.25 and forward)
until PushModel networking is stable (unreal 4.25 and forward)
:P we are at almost 5.2. C++ and PushModel would be a good start
Also that is a very generic explanation. Your game might never reach problems by having replicated variables in your comps
thank you eXi!!
@thin stratus all those points are very good and i feel more comfortably forced to explore listen servers. im not making an mmo but i do have coop focus. which would suffice with steam stuff.
It's relatively easy to answer I guess:
- Does your Game have Competitive features (such as Ranked Matches) and should never allow cheating? -> Dedicated Server (hosted by you)
- Does your Game have any form of progression (e.g. MMO like) that should not be cheated? -> Dedicated Server (hosted by you)
- Does your Game profit from players hosting their own Servers that stay active while they don't play (e.g. a Survival Game where players want to leave over night but still have their crops grow) -> Dedicated Server (hosted by player)
Most other situations probably don't need a Dedicated Server
Very good advice. I wish I could produce bricks of gold
Don't we all
great explanation. i think my most central functions would be RPG-like progression tracking. Possibly data driven only (will know more at a later stage). For now i mostly needed to figure out how the broad picture stuff.
tremendous help so far!
yes
If you don't care about cheating, you can do the RPG stuff with a ListenServer too. You just need to store the info locally and send it to the Server on connection.
That's basically what we did on The Ascent
i do not care about cheating for as long as nobody is paying for the experience.
This x1000
my game structure is straight forward.
co-op roguelike
Permanent homebase (public lobby) with a door that leads to adventure
Adventure is session with friends only or alone
Progression is tracked and linked to the user.
I wanted competitive features but I'm going to launch without them, if the game is wildly successful then it'll come back on my radar for a future release
And if I wanted to make a competitive game, I'd do the same thing, make a non-competitive game to start building a franchise from which to spawn it
Thats the call i have to make. If do not make something that reaches various points of interest, there is no idea to invest in infrastructure.
@thin stratus Just on the topic of the PredictedMovement, I've never really been particularly involved with public repos despite having a few of my own, how am I meant to handle issues like this?
Do I just tell them to ask on Slackers and close it
No, I would ask them what Engine Version they use and what the errors are.
:P You'll have to support it a bit if you post it public
Fair enough
I don't think there will be an issue with that example project so it'll be user error, wasn't sure if thats part of it or not
I usually handle that by simply ensuring the user didn't alter the project files
And to get all info required
Also helps having it there in case someone else runs into that issue
They probably didn't follow the instructions https://github.com/Vaei/PredictedMovementExample
If it's a common issue you can add it to the FAQ :P
Fair
I.ove it!
Thanks a lot for your time โค๏ธโค๏ธโค๏ธ
And I really love the tidbit about RPCs in actors Vs components ๐ฆพ
It came up at one point so made sense to add it
I think I meant to write replication in this context but I'll look at it later
when running the network stuff. whats best setting here to choose to simulate the players rubbish ping? id think "client" but i want to make sure lol
Is it very complex to have gameplay replicate over a listen service solution and have statistics and progression logic run on a dedicated service?
Like craft results and logic be handled in the dedicated service
The expect behavior is:
Left mouse button pressed spawn actor and start rotating according to mouse position
Left mouse button released stop rotating actor
Current behavior:
Left mouse button pressed spawn actor and start rotating according to mouse position (But only on server, on client it spawns but doesn't rotate)
Left mouse button released stop rotating actor(But only on server)
You might want to open a SQL connection
Sure. SQLite i hear will help me alot. Mostly a question if the separation is complex or trivial in such a case
Perhaps not more complex than addressing different externals and sorting the async like anything else
There are a few things wrong with the second event, you can't just set a timer and have it read old data
Each player would have to continually send the location of their mouse over the network
Preferably as a location coming from the mouse cursor hit result
There's also a question as to whether or not the created frog will be replicated to clients before the multicast arrives, in which case the reference to the frog would fail
Also you cannot send controllers in multicast events
Also, you probably want the local client to not have to wait for the server to set the value
Also, you should specify which object this code is running on cuz that matters too
ohh, ok a bunch of changes.. I'll try again
Try this. The owner of the frog will set a timer, within this timer he determines the location of his mouse, sets the rotation of the frog, and sends an event to the server on his controller which has a reference to the frog and the location of where it should be facing. This event on the server controller will set a replicated variable on the replicated frog which will be an on rep variable. Other clients use the on rep event to look at rotation of the location
What do you mean with "progression logic" though? Statistics are definitely possible. Plenty of listen server style games and even single player games collect statistics for their game. That's just a matter of either finding a service that allows you to do this or creating something of your own and sending over some requests with data ๐
Progression logic would be crafting i guess. Or calculating whatever needs to be done to advance in any system
It doesn't matter I'll find out the hard way
is there a way for a client to move their controlling pawn locally? I made my own custom component to handle movement and im trying to implement client side prediction, but as a client i can't call SetActorLocation
Hello everyone, I am making an Interaction System and would like to know how do you protect key spaming? Is this something I need to take care of? Right now I have On Pressed and On Release events RPC'd every time the client use the key.
It is a server RPC with no parameters
So I know "get player character" is bad. I am running into an initialization delay here. The widget attempts to create itself before the Player State Character is ready and this always returns a "None" unless I add a delay. Should I use an event dispatcher or something similar?
Delay is def bad. Cause if the ping is higher, the delay won't catch it anymore.
Your best bet is as usual some C++. Basically a callback in the PlayerController in OnRep_PlayerState and OnRep_Pawn (and if ListenServer then also in the Server functions) that you can bind to in the Widget.
With a little bool logic to only do whichever one hits first?
Well they are for two different cases
One is for Pawn, the other for PlayerState
depends on what you need in your Widget
The smooth sync plug-in will handle that for you, it allows the client to set the location locally and the smooth sync plug-in component will automatically send that information to everyone else on the network and smooth it
Also, If I remember correctly, the character movement component has two booleans that you can set to true, something about allowing client authoritative movement and ignoring location corrections
Try setting those to true and you should be able to perform client authoritative movement
hello i was wondering on how can i retrieve my friends UniqueNetId's to a blueprint since TArray<TSharedRef<const FUniqueNetId>> can't be used for return type on the function
what does tshared ref is for? is it necessary?
yes it is necessary, no removing it wouldn't give you access to FUniqueNetId in blueprint
so how do i access it then?
you can't access it directly from blueprint
you can either wrap it in a struct that is accessible from blueprint, or you can do whatever you need from C++.
When is it best to use NetMulticast versus Server? Is the former good for things that are tricky to replicate?
For example, right now i'm trying to figure out what to do with a function that makes characters go ragdoll when they take too much damage and die. ragdolls are one of the things that various sources say not to replicate
Is Blueprint, I'm trying to make a Projectile Play a 2D "Hit Impact" sound when it hits a player. I can do this just fine, but the issue is that I only want this sound to play for the person who shot. I am using Listen Server, and have issues with clients getting the sound to play twice, even when "run on owning client" and a Switch Authority node to try and get it to only play on Client. This code runs on the Projectile though, so I'm not sure if it knows the owning client of the projectile since it is created on the server.
Any help would be Appreciated as I am a bit stumped.
You could make shooter become owner, then it's a simple check if the owner is shooter using a branch
Yeah sounds like it could be an ownership problem, if it's spawned on the server then the client would be the owner. You can try setting the client as the owner before playing the sound.
So I'm doing some research for a client who are interested in creating a (very simple) cross-platform multiplayer game for iOS and Android. We've been trying to figure out the best solution before we start diving in to development, and have been looking at either EOS (via the Redpoint plugin) or something like Photon Engine. Can anyone give any recommendations on this?
From what I've found so far it seems that things like Google authentication is going to be a bit of a pain, would using a platform like Photon be easier to set up? Or does it come with its own difficulties? Obviously we'd need to justify the cost if we went with something like that.
Note that I've worked on multiplayer projects before using both EOS and Steam, but only for PC, so cross-platform is new to me ๐
Would any know why after moving project to 5.1.1 from 5.0.3 not migrating but complete rebuild.
When client is walking animation looks in slow motion from other clients and server but not from players pov all exactly the same settings I had in 5.0.3
Both EOS and Redpoint to lesser extent are still pretty new
EOS works via EOSAppUser, so it should work for iOS/Android
I didnt make a full cross platform implementation yet, but it has no oroblem connecting PIE instance to packaged steam
Yeah as far as I'm aware EOS is platform agnostic, so should work fine with iOS and Android. I think the tricky part is getting the player logged in with their Google/Apple accounts.
I may just have to bite the bullet and jump into it but figured some other people may have done similar projects and could give recommendations
It has per platform auth code too
The Redpoint plugin?
If you go EOS, i definitely recommend redpoint
it seems to be getting more love of the two
I think that code is EOS, which redpoint it built ontop of
Yeah redpoint seems to be the general recommendation for this stuff, and we'd prefer not to pay for something like Photon if possible (I'm not even sure if Photon integration is any easier anyway)
Unlike EOS/RedpointEOS, which caused fair amount of headaches
Redpoint Matchmaking just
.... worked
Is this correct for a random mesh system?
Not quite, not stateful
I see, I'll keep that in mind, thanks
Go fof a variable with onrep
Just expecting the setup to be a little painful, even the Redpoint documentation has this warning ๐
Anyone joining later or out of relevant range wouldnt get that Mesh change
I am interested in rehosting; I'd like it so that, if my server player suddenly disconnects, someone else is picked to be the new host, everything transfers over, and the game continues with minimal disruption.
Broadly speaking, how difficult is this, and where would i start?
Documentation is a little dodgy
Extremely, and even done perfectly it would not be smooth
You need to transfer entire levels state, along with any ai and other server side logic before server dcs
How would I do that? sorry still kinda new to replication lol
well, "minimal" is not specific about how much disruption there should be ๐ Whatevere will be, will be
Then youd have to pick someone else to host a new session, load that data, and connect everyone else to new host
Connecting snd liading phase unavoidable here
could i maybe just send a serialised copy of the gamestate to everyone once a minute or so, that they can use to load from in that event?
And you font have unreal networking to help ftom the moment original server dced, you have to use backend service
Its not just gamestate
As for where youd start
cant clients save a list of each others IPs and attempt reconnecting to them? I would like to avoid needing a third party computer, if at all possible
Is system rhst can save and restore state of the game from mid play
You can use party system below the hood
If leader dcs someone else gets autopromoted, snd that is your new host
party system is a thing that natively exists?
what is OSS ?
ohh i see, alright, thank you
Also, you cant do much of this from bp
i hate blueprints so thats fine, all code ๐
Basically you want to save your game in a POD
pod?
alright, this is lots to think about for now, thank you
going out, i will ponder it on the train
would I do it like this?
No
Set var on server
And let it replicate, no multicast
Onrep calls setmesg on component
I'm sorry for being confused, but do you mean mesh_body or the events?
You call server event
It carries your meshbody as playload
Server assigns that value into meshbody variable (replicated, rep notify)
Then onrep_meshbody sets thd mesh on bodymesh component
this is what I did, it's working for the client but not the server
@winged badger what did I do wrong?
was it that simple?
Is "BodyMesh" a component? If so then that's also wrong
ah ok
how would I set the skeletal mesh?
In the RepNotify/OnRep function that your variable comes with
I mean how would I set the component
If you have more than one MeshComponent, then you either need multiple Mesh variables, one for each Component
Actually, there is no either
You gotta have one per Mesh
is it possible to change who the host is?
so if the host leaves, it makes another client the host
Why is that question coming up so often lately
xD
There is no Host Migration in UE
rogey
There is a plugin on the Marketplace that says that it adds Host migration
But it's terrible
It's not actually migrating anything
Depending on size of game, if you don't mind a loading screen it's semi possible. But anything large scale is going to be a reeeeally huge headache. And it's already going to be one of those. ๐
I just have one mesh component
would these work?
If you only have one Component then you only need one Function and one Variable
yeah ill just go with dedicated servers once i get up to it then
i dont need anymore headaches xD
Yeah, you'd need to somehow catch the point where the Host leaves/crashes/disconnects. Ensure that all Clients always know the full state of the game (even stuff they shouldn't know about). Save that all to the disk, leave the match. Let someone host again, restore the state from Disk, and somehow also ensure that in that one frame you also communicated who will be the next host so the rest can connect again
i feel like i wrote host migration instructions 15 minutes ago
Yeah. And all of the data validation to make sure the new host actually has correct data. ๐ฌ
sounds like youre about to make a plugin ๐
100% nope
๐
definitely not
Yeah that's fine, now you need to go into your OnRep function and set the Mesh of the Component
anything that is generic enough to be a plugin is shit for your game
Even if I could make it work for "every" game, I would rather spend my time staring at drying paint or so
like this?
No
In the OnRep function of your Variable
If you mark a variable as RepNotify (which your MeshBody 1 is) it auto generates an OnRep function
Which is being called when your Variable is set
You should however ensure you aren't renaming your variable after that
plugin would have to literally save every single difference between the packaged level and current level, since it has no way to determine what is important, or what can be restored from other data
Otherwise you'll have to unset and reset it to Rep Notify
That or some really clever way of letting the user select the data
user as in dev
it could use integrated SaveGame archive, but even that is... ugh
also @keen hound since you are struggling with the basics, please read the Network Compendium
3rd pinned message in this channel
Yeah I also think that Host Migration is not really needed in 99% of cases
it's a remnant from CoD fwiw
yeah not needed. but it is a nice to have
If you have player hosted games, it's usually not a thing that a player just quits.
Most games that have Listen Servers have periodical saving etc.
If you have anything more competitive, you use Dedicated Servers anyway
or you if just have enough budget
CoD did competitive gameplay with player hosted servers
or you what?
im glad i didn't write anti cheat code for that
That sounds like a living nightmare.
things that keep you awake at night
Air stuck under my ribcage that causes a sting like feeling in my chest
Or close to having a heardattach
50/50 chance
Spoiler, it was air
thanks
ahhh those ones are nasty
tends to be, thankfully
Hey there guys, I got a problem with server travel that has to do with netmode checks. It seems that when transitioning to a new map, the client begins to consider itself the server as if it's standalone. I assume it has to do with the transition map.
The issue with this is that some actors have logic that differs between server and client, and clients start trying to perform serverside logic on these actors which leads to a crash since the data needed for this is lacking.
Any clue if there's a condition I can check to prevent this?
this authority switch seems to happen before the map changes, which results in serverside logic executing on actors which were just simulated before then
How can I make an AI have a random scale in a range, and replicate it properly? Struggling to replicate random values.
It's an AI, and the AI already exists on the server along with all it's information, right? So I should maybe just Multicast the information, but that's giving me inconsistent server/client random values too
I don't think you need to be using RPC for init unless this is a human player controlling the character because if its an AI then the server owns it. So when you have event OnBeginPlay you can just set the replicated random variable and the clients should get the same result because the server sets the variable on the replicated actor.
Then maybe on a repnotify you can use set world scale
It does look like you're randomly setting it on the client and then trying to send it to the server?
The way I like to think about a server/client model is that the server does EVERYTHING. It creates everything, it controls everything, it moves everything, it shoots everything, destroys everything, etc.
But then you obviously want your clients to be able to see/hear this. So you replicate what they need to see: actors, attacks, hit reacts, music, etc. Some of this doesn't actually need to happen on the server, like player face effects, that's fine.
And then you probably want your clients doing something and controlling something, so you send their instructions back to the server to be processed, simulated, and then replicated back down so you can see it.
This isn't the completely solution, but it's a better basis for starting than, "do stuff on the client and then do some stuff on the server." Assume everything is on (and only on) the server unless there's a reason for it to not be.
i have a question, my enhanced inputs work perfectly on the editor but when i test on my development build as a multiplayer client, the inputs dont work, do you know why?
What consumes the input?
My Character
First guess is something related to setting your contexts on a wrong event.
im setting my context in the begin play, filtering by only locally controlled pawn
your character directly? not the controller? is it at least filtered through input actions and not listening to button presses directly?
ah
You should do contexts in the controller, not the pawn.
There are a number of best practices you could adopt that will simplify your life in this area.
i will try this
bind the inputs in the controller, not the character (only player controllers need to bind inputs, not AI controllers, which will save you some work)
no need to check context in that situation I don't think... unless you support local multiplayer
are you using C++ or BP or both?
both
the more strange is what the inputs works on editor but not in the package, im using a dedicated server local
What do you mean by binding inputs in the controller and not the character?
Is there a reason when I Call an event from Server to Owning Client, it runs twice?
Doing this from a projectile Event Hit, which has the Owner and Instigator properly set up.
this dont worked too
You have contexts added to the enhancedinputsubsystem in the beginplay of your player controller. The pawn is possessed, and you're not getting inputs in a built game but are in editor?
im adding the input context in the begin play of the character, filtering for only localcontrolled paw, in the editor works but dont work on my package build
Understanding the division of responsibilities between controllers and pawns (characters in this case) has subtleties, but is invaluable.
The pawn is responsible for managing itself. Doing things, maintaining state. But it's not responsible for decisions making. The controller is responsible to figuring out what to do and then telling the pawn to do it. Thus an AI controller runs its AI to decide what to do and a player controller listens to input to decide what to do.
and in the editor dont work when i execute the command open myip:myport and connect to my dedicated server
virtual void SetupInputComponent();```
I override this to bind inputs in my player controllers.
You said you changed it to the controller, and that it didn't work. Did you actually try this?
yes
i'm trying to resolve it now
if (UEnhancedInputComponent* EnhancedInputComponent = CastChecked<UEnhancedInputComponent>(InputComponent))
{
// UInputAction* is a property that I set in blueprint
// void SetTeamTo1Completed(); handles the input
EnhancedInputComponent->BindAction(SetSpawnTeamTo1, ETriggerEvent::Completed, this, &AMyPlayerController::SetTeamTo1Completed);
}```
basically the input doesn't work when i connect to the dedicated server using a command
im doing it like that
I would switch input binding from your character to your controller, then worry about how it networks
in SetupInputComponent()?
on your PC?
That's a lot of words for not answering the question. You absolutely should never put controls related to a specific pawn in a controller. The controller exists to house the InputStack which is an array of InputComponents. These delegate input to any actor, possessed pawn included. Putting them in the controller undermines this entire system and forces your controller to care about the pawn in question. Is the pawn a ship, or a character, or a vehicle, or a plane? Why would the controller need to care about this? It never should, and putting code related to the pawn in the controller goes against that and just causes extra boilerplate coding.
I always go back and forth on how much best practice I should give to equip people vs simply debugging the current problem. :/
eh
I had thoughts, but decided I should refamiliarize myself with things first. It's been a while since I've been responsible for managing input.
And I have only barely used the new input system, so I don't know the intricacies of that.
It's not about the new input system. The old one worked the same way. The only thing that Enhanced Input does is extend the component itself.
You should probably pay more attention to what Authaer is saying than me, Gabriel.
but why dont work when i connect to dedicated server? and work perfectly in single player
Would have to see where you're binding things.
Are your context mappings still in the beginplay of the character?
The issue you're facing is that Beginplay runs before the client knows the pawn is possessed. This is why I said you should move your context mappings to the controller.
Ah, I see what you're saying @kindred widget . Yes, binding inputs directly in code and not through data is not ideal. You don't want to see what else in my hobby project is hacked together until it becomes a higher priority.
I find my hobby projects often get tangled up in doing things at the scale I would do them at work and then I get bored. Trying to go faster and only design things to be as robust as I need the, while hopefully avoiding TOO much massive rewrites down the road. It's always a balancing act.
Move it to SetupPlayerInput or whatever the pawn method is called, it doesn't need to be in the controller.
Yeah, that would be a better place.
This is why there's a specific method for setting up player input
sorry, it's SetupPlayerInputComponent
Pawn.h
/** Allows a Pawn to set up custom input bindings. Called upon possession by a PlayerController, using the InputComponent created by CreatePlayerInputComponent(). */
virtual void SetupPlayerInputComponent(UInputComponent* PlayerInputComponent) { /* No bindings by default.*/ }
Actually going to move mine there now. I hacked mine together in the controller. Lyra throws theirs from data assets.
I don't think I knew this existed before.
given that it's been in every template and sample project since the engine came out, I'm not sure how. You probably just forgot.
I'm at a studio that switched to UE halfway through a project and none of us had used UE before, so we were scrambling to figure things out live. Lots of misunderstanding about how UE wants things to be done from back them. Also not something I've focused on much at work.
but forgetting is also a very reasonable theory
I might actually want to extend my project's character to call a BIE from that.
Actually. @hollow eagle You know if there's a client version of that for a controller leaving the pawn?
it shouldn't be necessary
Unfortunately, this bit of knowledge won't help with my current project as there are no player possessed pawns.
input components don't stick around afaik
Was more thinking about adding and removing pawn specific context mappings.
looks like the input component is destroyed on unpossess
Yeah but the mapping doesn't live in the ic
Yeah.
So if you add mappings in your pawn you gotta remove them again
At least if they are pawn specific
I mean I don't really care I don't think. I was already planning on just blobbing all of them in at once.
But might be nice to learn to handle them specifically.
That's fine too if there are no pawn specific ones
You could just override the event that inits the input stuff
And maybe the one that destroys it
Not sure if they are virtual
Even waiting a few seconds afther the character spawned and possesed, the inputs dont working ๐ฆ
is this in beginplay still?
move it out of beginplay
there is a dedicated function for this
override that
ok
Blah. That all looks like server code. ๐ฆ I wonder if I could reliably catch that by just binding delegates to the pawn and input component's destroyed events in SetupPlayerInputComponent
Actually how does that even work on a client? Is the InputComponent replicated? O.o
It's not.. UnPossessed is client side then?
No.. It's server side. How in the shit does a client normally destroy the input component then?
I am also curious, but this is distracting me from my own stuff. Keep me updated.
input components are client side
I'm not sure why you think anything is happening related to input on the server
Unpossessed calls DestroyPlayerInputComponent
this is running on my client side, and work perfectly in single player and with dedicated server only on the editor, but dont work if i connect to any dedicated server, super strange
For listen server probably
Should also be called client side
Hmm.. I'm not seeing anything killing this on the client anywhere. Need tests.
does the function you overrode get called when you play as client?
yes
Lol. It doesn't destroy the input component on the client. ๐
and what are the action/axis mappings after that runs?
as long as it pops it from input stack thats fine @kindred widget
All but one of these prints are in a single frame and are from a pawn the client either is possessing or did possess. The NoValid component print is the server's Pawn.
It's just funny that the server kills the component but the client doesn't.
What led here was looking for a reliable event on clients to remove pawn specific context mappings. And realizing that the clients never actually remove their input components.
Any idea what can cause this?
Lots of things. You'll need to correlate that with server logs to know what.
are RepNotify events are also being called from the server as well right now ? It was being called only by the client before.
Is this not the case anymore
it depends, C++ only client, BPs client and server, except for arrays
more info here: https://vorixo.github.io/devtricks/stateful-events-multiplayer/
it was
Iโm using these in Lyra and for some reason the server is updating them but the client isnโt getting the updated value. The only differences for me is Iโm using a RepNotify instead of just replicated in order to fire off a delegate in the UI to update ammo. Another is my actor is dormant until fired. What is confusing is that all of the other rep notifies are working fine.
Basically what is happening is both the client and server start with 10 bullets and client runs firing logic locally then server runs it, subtracts the bullet and flushes net dormancy. Next time client fires it should in theory get the updated value of 9 but it doesnโt it stays at 10.
Another weird thing is even with net dormancy turned off it is still not receiving the rep notify so Iโm lost
Gameplay Tag Stack Container โ The Games Dev https://www.thegames.dev/?p=109
Why would you be using a RepNotify for a FastArray?
It literally provides you functions for such things.
PreReplicatedRemove
PostReplicatedAdd
PostReplicatedChange
These are your "RepNotify" functions for a FastArray.
If you want the UI to understand when these happen, you may need to expose a delegate for each of them on the FastArray itself.
Which external systems can bind to
I changed it to rep notify after replicated wasnโt working.
Did you follow the guide correctly? I would double check everything.
This is a pretty simple usage of a Fast Array.
Youโd be surprised at how much in unreal I have no idea about lol. The code looks 1-1 with whatโs in Lyra.
Iโll give it another look and will try out binding to those functions
@fathom aspen I had a look but couldn't find what I was after. Does it say somewhere in your compendium what happens to replicated actors when a client travels away from a level? I'm a bit naive when it comes to world changes so I'm trying to check whether the server will continue to try and replicate actors to the client even if it has changed level.
Is there a way to have an Event on Begin Play be for the client only? Even when using a Run on Owning Client event, it still affects other players clients.
My example is refreshing the Health Bar in the player UI. It will refresh everybody's. This is an issue when 2 players die close to one another, when the other spawns in, it updates the UI of the person who is dead and still awaiting respawn.
You could try the "IsLocalPlayerController" or "IsLocallyControlled" nodes (depending on what blueprint you're calling the events in)
Sadly doesn't work on Listen Server at times.
Show your code
Hello, anyone is having or has had problems with the replication of the projectile in the FirstPersonCharacter? I new in the multiplayer so, i really dont know what i have to do
im running that on the character that gets killed, it destroys them before respawning, but it seems to remove the widgets for all my clients. is that only because im playing as all of them through the editor? trying to stop widgets from doubling up on respawn, but too many to find all the references haha
The issue just being that I believe Begin Play runs on all clients. I had the Update Health Widget Values set up to a Run on Owning Client Event from the same connection there, but it didn't change anything.
I'm just curious to know the best alternative to trigger this code on something like a respawn where the client needs to get their HUD updated.
Branch on Is Locally Controlled
hi i looking for a map travel fix my player keeps booting player 2 when teleport to other map i tried few codes but this fail always
Been looking into RPCs + Delegate functions
Is that correct, that I can send a delegate as an argument to an RPC, and have the other side (client or server) callback on that delegate?
no
Delegates have no network functionality. I doubt sending one as an RPC parameter will even compile
I see
How can I implement a callback from that RPC to the same client then?
You can't - you need to call a Client RPC
And perhaps send an ID to the server which it sends back, so you can identify the call
Of course the server will, because that is part of the flow of replicating actors: https://docs.unrealengine.com/4.27/en-US/InteractiveExperiences/Networking/Actors/ReplicationFlow/
I didn't cover that part per se, but I somehow showed a working example that persists a replicated actor: https://wizardcell.com/unreal/persistent-data/#example-usage-4
The replicated version on clients will be destroyed on map leave, and will be instantiated again on map join
Ah, interesting, so then if I just want to send a client back to like a menu area where they aren't connected to the server is there a travel that does that?
There is UGameInstance::ReturnToMainMenu()
does the remove all widget node affect every player?
im trying to only call it on one client but it removes the others too :/
I'm struggling to find a concrete answer since it's all tutorials popping up in search but is that just a predefined widget that goes in a generic level or can it be like a full level as your "main menu"? We need to render 3d stuff as part of the "menu" so if it's widget only that won't work.
Nevermind!
I found it in the source comment. Back to default map. That's wonderful news.
Is mp support basically the same in 4 compared to 5 (downgrading versions)
I think so, for most cases
Yeah almost no difference. At least can't name any from the top of my head
Learning a lot on character saved moves and I have a question:
Say the character runs into a trigger that is supposed to launch them (i.e. a spring)...
Can I trigger on both ends (autรณnomos and authority) a launch character? Or do I need to somehow make it a saved move? Do I need to launch character on fully simulated proxies or do I let the server launch them?
You can just launch on overlap
Cause both are supposed to step on it the same timestamp anyway
And launch velocity should already be stored in the SavedMove
And if not then a rollback will walk over the launchpad again anyway
โค๏ธ
Alright thanks
Just trying to do a simple sprinting function. Works for the client (although a bit jittery) but wont run for listen server. Any idea why?
Tried a few different ways, same results
Oh boi, you are in for a world of realization
I was a lowly chump like you half a week ago
The short answer, you can't alter any variable that affects the character movement component outside a saved move
The long answer... Lemme Google it
Start from the FAQ and then dive into the rabbithole
@hollow swallow
Any good resources on how to create good multiplayer compatible shooter AI? The ones i'm finding are not great..
You need to set it on the client and the server separately
i found the issue, i had a running backwards bool that kept overriding the speed when not running backwards... doh!
Is there a practical way to disable character movement replication for a non-local character from client temporarily?
Example: Client player A hits NPC B, causing knockback. The knockback movement should happen on client immediately, regardless of server response (we can trust the client due to a non-competitive game), and server will catch up after receiving info of the hit. But because client has no authority over NPC B, the knockback movement gets corrected until the server sends info back.
My impression is that ServerAcceptClientAuthoritativePosition and IgnoreClientMovementErrorChecks both seem to be intended to be used on server side or in advance(?), and am not sure what the correct solution here would be. Any info appreciated! :)
In case you didn't get an answer to this yet; yeah, this should remove widgets on all clients, as the Event Destroyed will trigger on every machine that has that actor. If you only want to remove widgets for the player controlling this character, you could try adding a "Is Locally Controlled" check before the Remove All Widgets node?
Cheers mate I hadn't yet. Even with that still clears them all. Think I'm gonna have to find every widget I create and remove them that way... won't be fun haha
Actually I missed that event destroyed triggers on all, maybe that's why
hmm, that doesn't sound right ๐ค with the "is locally controlled" branch it should only trigger the remove all widgets on the local player
Yeah, this worked great. I'm surprised because I've had issues with the Listen Server returning false for this check before, but I think my Validity check fixes that.
Thanks for the help
@hollow swallow & @subtle peak
nobody read what I wrote? ๐ฅฒ
No matter how you trigger your rpcs, you can't change the max walk speed in an rpc and have your network not break ๐ฅฒ
Network is hard, if you are not the reading kind, watch the video version on how to extend the CMC correctly https://www.youtube.com/playlist?list=PLXJlkahwiwPmeABEhjwIALvxRSZkzoQpk
Thanks mate. havent touched c++ yet so ill save the link and put it on the back burner for now hahah
you wont get far in multiplayer without c++ ๐ฅฒ
sad but true
(don't take my word for it, listen to the network gods ๐ )
i mean, ive got a lot done already, and im always the host in my group of friends that will play. so rip to them ๐
Yeah, C++ is definitely the correct way to go, but depending on what kind of game you're making you can definitely at least get away with blueprint shenanigans, if perfect replication isn't mandatory.
...now, if you're making a pvp shooter or something of that sort, uh. good luck with that without c++ :P
yeah, if it is coop then you might aswell go client authoritative ๐ค
it should be simpler but I am not sure how to implement that, I am diving into server auth ๐
yeah, i'm currently in the process of trying to figure out how to get client auth to collaborate, and most things work pretty cleanly :) but there are some odd cases, like applying movement to a non-locally authoritative NPC
am probably gonna have to dive into proper server auth at some point for another game, but gonna enjoy this while i have it.
Is there a way to set "WantsToCrouch" in blueprint? I'd like to use this for crouch since I heard it's already properly replicated across multiplayer.
i my brain there has always been a "crouch" and "uncrouch" in the character blueprint that you can use ๐ค
Oh yeah, I see that. I assumed that was an incorrect method, but I was wrong. That worked just fine
For multiplayer games I can just let people host listen servers right? Or would I need to create servers for them
pvp rpg ๐ ill get there without it
On a side note. Do I need the source build to make a dedicated server or can you do it from inside the epic launcher build now?
last time I checked, you needed a source build to package a dedicated server, but it might have changed from 4 to 5?
Think I might jump into that rabbit hole tomorrow ๐
it didn't
I created a working multiplayer testgame with listen server and clients. Now i want to transfer data from the player (like player name) through the next map (next map after lobby). For this i was thinking of using the game instance. Each character has a struct with its data (right now only the name). on joining the session the game instance struct (similar to the player character struct is filled) and then i want to transfer that data to the player character.
Is this the right way to doing it?
I figured out that client and host has their own data. The host has both player in the struct array (for each player a struct). the client has null.
I could really need some help to work this out.
I recently did this.
Look into Seamless Travel. A small number of actors persist. Player state is probably the best place for your use case. I found that seamless travel is disabled by default in PIE and I had to enable it every time I ran with a console command. AND it's not terribly stable and PIE crashes about half the time after I do such a travel. But it worked. If you figure out how to do it without the instability, let me know.
I overwrote this function to copy what I needed.
virtual void CopyProperties(APlayerState* PlayerState);```
https://docs.unrealengine.com/5.0/en-US/travelling-in-multiplayer-in-unreal-engine/
erhm my sourceCode folder is 180 gig dose that sound an alarm for ppl x) ?
Thanks. I fixed my approach and can now access my data via the server. now i just need to find the correct player and put the data into the character ๐
I found a very interesting animated explanation of rollback netcode (not unreal specific, just the rollback concept in general)
Leaving it here for anybody that wants to understand the concept or rollback netcode
https://bymuno.com/post/rollback
How can i make that morph targets also work when in standalone mode? I think it got something to do with multiplayer because i set the project up in a way that the player gets spawned in gamemode. Idk if anyone knows the youtuber Kekdot but basically with his vid
and i got the entire ui from my character bp to the player controller bp
everything is working besides that basically
I solved it with this
hello, how reliable child actor components are for replication?
or should i kill it with fire?
actor components? good for replication
kill it with fire
child actor components?
yes, to spawn actors inside a blueprint
You can spawn actors without them being childactor components ๐ฐ
i know, just asking out of curiosity
child actor component is not very well-regarded around here
you're much better off just spawning actors
I wish you could nest actors though, that'd be great for editor time
I have a widget component but i can only seeing it on each player. i would like to be visible for both.
I marked it green. there should be the name of the other player. or have id do it via a widget on the hud?
It probably is visible for both, show how you're setting the text on it
On begin play i do that.
And on the widget i bind the character name to the text.
Why are you doing RPCs here
just do that stuff locally everywhere
also widgets aren't replicated
If what you care about is the widget knowing what character it's on:
Begin Play -> get widget component -> get widget -> tell it to care about self
That's it
I thought maybe it helps when its rpc. i changed it back.
What do you mean with "tell to care about its self"? sorry i dont get it.
Just do this on begin play everywhere
btw widgets don't replicate so CharacterReference being replicated is doing nothing
thanks.i removed the replication because its not needed. i have to update the data. without it i cant pass the text created on session join too the widget
repnotify
maybe i understand it wrong. My UpdateName function is not updating the name directly. its more update data. that data i get from my game instance. so on begin play (transition form lobby to map) i move the stored data from the game instance into my character (right now only the name). if i would change the name on the character while playing i could used repnotify to call all other the changes. i am very new to networking so i could also be very wrong.
is it the SERVER's game instance or the CLIENT's that holds that data?
Client can change whatever they want on their end but the only things that affect the server state of the game are all done by the server
Security comes into play when you make the client -> server RPC call.
Instead of client telling server they got XP or killed the deer, client should tell server they want to attack
I got a quick question, i want to make a round based multiplayer 1v1 match, with magical items. Is lyra the way to go, or should i only use the regular mutiplayer of UE5?
Im asking because the lyra documentation seems very poor, and its huge
Dependsโข๏ธ
Rock paper scissors is round based
so is Counter Strike
depends on where you are on the spectrum between them
it supposed to be a third person 1v1 match in a 3d environment
With different kind ob abilities
You still haven't said anything about the pacing of the game or if it's turn based or real time or slow paced or super twitchy
Its like elimination, with the expception that if one of those 2 players dies, the next round will begin.
Its realtime and very interactive, they fight in a environment and cast spells to try kill each other.
So basically they fight, until one of them die, and then the next round starts, whoever wins 2 of the 3 games is the winner.
You can think of a gladiatorfight, but instead of gladiators, you have wizards
You still haven't said if it's turn based, realtime, fast paced (needs a lot of prediction), or slow
it is realtime, and it is turnbased, not turnbased like pokemon, turnbased like a boxmatch, The only way players will be able to damage each other is through projectiles (no hitscan)
Hello everyone. I have a small issue with the Lyra animation system and replication on a clean project. My client experiences animation lag while strafing. It is seen on the server, not on the client. Do you have any ideas to help me solve this problem? Video : https://streamable.com/8i1uxd
Thanks!
what is the easiest solution to store player name / stats / items on a database or something so all players keep their stuff no matter what server theyre on? havent touched c++ yet and this is probably going to be a bit out of my depth but want to get onto it and start learning. if anyone has any good tutorials to follow or recommended ways to do it would be great
I have an actor that is loaded in as part of the level and has a Server RPC.
I would like for this Server RPC to be called from any client, but I have come to find that since the actor is loaded by default, it has no owner, and thus any attempt to make the RPC from a client is dropped. I don't want this actor to "belong" to anybody, since I want all clients to be able to call the RPC. Is this even possible, or do I need to come up with a different scheme for this?
When I think "database" my brain defaults to aws dynamodb but that might just be my dayjob brain talking
Thanks mate ill have a look at it
yeah think im out of my depth here ๐
if you want a simpler solution, could always look into SQLITE 3
evening
Hey guys quick question, Iโm creating a third person shooter game. But require a system for lag compensation on line tracing for weapons to be cheat free as Iโd rather not deal with client to server line trace. Any popular/well known lag compensation plugins / systems or c++ packs that I can integrate into my blueprint game for the line tracing system? Cheers guys.
As most published games have some sort of lag compensation system for doing shooter games. Trying to get the core of the game set up to be replicated correctly and no client reliability for these main components
Iโd rather not deal with client to server line trace
what do you mean by this?
The cheating. Client side can hit something that takes 1 second to send that info to server about the hit actor but that actor may not be in that position anymore from ages ago. Causing issues like hitting people that are behind walls or obstacles already and what not.
doing client trace in general without any lag compensation for multiplayer shooter game use is looking for problems with fairness.
Prime example. ARK 
Lag compensation is to make shooting feel better, it's not for anti-cheat
I wrote the lag comp and verification for HLL. The gist of it is pretty simple:
2) When a player hits something, rewind that players capsule position by the shooters RTT (ping * 2)
3) With a tolerance, redo the entire line trace from original shot origin->client impact position.
4) If the trace passes near to or hits the capsule, accept the hit.```
You also don't need to move the players for rewinding. Doing that is pointless, you can approximate the capsule for the server-side trace with a point-line intersection test
We had travel time so the replay was more complex, but for hitscan it should be easy
The anti-cheating part comes in many forms. You need to make sure the client isn't sending hits too fast, isn't sending hits for shots they never fired, isn't shooting through walls etc.
The lag compensation in theory hides the latency so players don't have to "lead" shots to account for it, ideally lead should be the same regardless of ping.
hey guys this is a serious question my scoursecode folder is 180 Gig of that normal ?
Sadly yes
Obvs when you build it won't be anything like that large, but all those extra build products from a source build and symbols make it massive
aye the builds are on another drive
so i get that it was more if i did something wrong and now ih ave 10x sourcecodes etc something
but i guess its worth it .P
Do i have to Remove the packaged build each time or can i just rebuild and it will overwrite the existing one ?
It'll overwrite
ah coolio
but i would always have to rebuild both server /client each time riught ?
Can you run RPCs on an actor you own?
Cheers for the input. Greatly appreciated. So this isnโt really doable via blueprinting. More so in C++ I guess. As it wouldnโt be the best system to make in Blueprint.
There is plugins on Marketplace IIRC on this, I may have to look into.
Yes, only those actors in fact
how do i turn of my "dedicated server" :/ ?
I wouldn't do anything multiplayer in BP honestly
Understandable. But itโs quite powerful and efficient, itโs there for a reason, you know. Hard to explain, but I DO know where youโre coming from.
Thanks to fortnite. And I am aware that fortnite is based off C++ for most things.
Multiplayer in BP is everything but powerful or efficient
You have maybe 5% of the available tools for multiplayer in BP, not to mention that things like rep notifies don't even work properly
We use BP as a scripting tool only. Core logic belongs in code where it can be properly debugged etc. Also you don't really have the chance to not ship code to clients when it lives in BPs
BP is a great tool but it's not the right fit for everything
Thatโs surprising, and upsetting to hear that rep notifyโs are still buggy sounding. Very saddening
I wonder why theyโre still broken.
Itโs crazy. IN UE5 Especially. Itโs a powerful engine core
They aren't properly implemented. What they really are is a callback whenever the property value changes. The problem is that's any change from anywhere, not neccesarily a replication update.
So you change a property on a client, the rep notify fires 
The more you know.
Change a property on the Server.. the RepNotify fires on the Server tableflip
My goal is making a blueprinted TINY shooter game.
Iโm wanting to use all my blueprinting knowledge of several years to finally make a game.
You can do what I described above in BP I'm fairly sure, just wouldn't be particularly optimal
Some stuff is easier to build in native code
We did 50v50 before all the fortnite stuff came so I have experienced raw pain
People who try to pull off battle Royale games in pure blueprint is bound to have forever issues, lag especially.
BP just isn't the ideal platform for inherently complex systems, it's ultimately an outrageously powerful scripting tool
And all those kits online of survival game kits. Building, stats, weapons, inventories. My lord. Itโs a mess of spaghetti that is all over the place. You cannot keep up and not only that. Itโs just visually hard on the brain lmao.
And you can do great stuff with it, but once you get started in CPP it's like you're Keanu and you've been given the Kung Fu floppy disc treatment
Going way off topic now but BP makes it much easier to dig into C++, especially with all the template projects from Epic - you can slowly pull things apart and see what's what.
If you've spent lots of time in BP, you're already halfway there
Nice. Yeah well I definitely have. I just donโt feel like Iโll get it and learn it easily without months of practice and watching videos lol. But that was the same with blueprinting! I started blueprinting and picked it up within months and now making my own projects from scratch.
Years later.
C++ just seems to be way hard. Just thinking about it and seeing it, instead of being visual nodes. I thought Iโd have no hope
Just takes patience and time. I started out in BP with no programming experience in like 2014, now I'm a senior. Granted though I had the opportunity to focus on it and nothing else for a lot of that time, so I was fortunate.
Well weโve started out in the similar situation. No knowledge / experience, jumped into BP, now itโs time for me to move into C++. Not to mention, itโs so much cleaner having base blueprints with all the core code you write in them and not in graphs.
Just start out simple (i.e, not multiplayer) - convert some of your simpler BP's to code, and keep going from there
Exactly. Would love to keep a clean base blueprint to expand upon.
Iโll try to find some good courses.
@gaunt crown
Will give you a small anti-headache starter package.
โขTurn off reinstancing for livecoding.
โขLeave livecoding on.
โขGet used to reopening the editor after changes to C++ files.
โขIgnore the Error List in VS, focus only on compile outputs.
โขYes vanilla VS is slow and clunky and intellisense rarely works.
trying to think of a way for players to keep all their stats between servers. databases are looking pretty confusing, is there a way to use save files and only retrieve certain info from them?
A backend data base is the only way to do that properly
If you store it client side players could send anything
im not toooooo fussed about that, preferably not, but i cant see myself actually releasing the game, more to share with friends as a hobby, and none of them would be capable of editing the data haha
all the backend data base are either really expensive, or seem really complicated. Are there any really straight forward simple tutorials on it?
Unlikely tbh, backend management is a whole career
You might be able to use some service offered by the online platform you're using
Steam has a very very primitive per-user stats system
Unreal doesn't expose it very well though
yeah im currently using steam at the moment
have you got the name of that system by chance? and im guessing its going to be quite limited?
so far im trying to learn 50 careers to make this game ๐
Just google Steam Stats
Steam users can have per-game stats (ints and floats) tied to their account, which you can lookup
It's far from a flawless system but it gets the job done
rogey cheers
What's would be the way of lying to the engine that my object has a dynamic net guid without replicating the object? 
Basically I want my multicast RPC to create the missing object on client without the engine ranting over me
/**
* Associates a net guid directly with an object
* This function is only called on clients with dynamic guids
*/
void FNetGUIDCache::RegisterNetGUID_Client( const FNetworkGUID& NetGUID, const UObject* Object )
{
check( !IsNetGUIDAuthority() ); // Only clients should be here
check( !Object || IsValid(Object) );
check( !NetGUID.IsDefault() );
check( NetGUID.IsDynamic() ); // Clients should only assign dynamic guids through here (static guids go through RegisterNetGUIDFromPath_Client)
Sadly last check fails, since the object is only created on the server and is not replicated
Well I completely forgot that IsNameStableForNetworking exists, so overriding it might do the trick
But my other question now would be: How safe is it to create a replicated component at runtime and fire a reliable multicast on it? Is there a race condition here? Is the multicast guaranteed to reliably fire on clients?
IIRC, the order is undefined (or at least inconsistent between reliable vs unreliable)
Unreliables + Properties go into the same buffer, reliables have their own
So in times of packet loss, you could maybe drop it? Not sure..
Yeah I would expect unreliables to go the path of replicated properties and to get the effect of the multicast by the time the actor component get spawned. But still I have seen times where that wasn't the case, and making the multicast reliable will only guarantee it to be there by the time the actor component spawns on client (prolly due to the retry mechanism)
I have a replicated UObject with a TArray of UObjects that should also be replicated but in the OnRep the array is just filled with nulls instead of the object values, if I have a replicated property of the UObject alone it replicates fine
why's that
Only if Iris was around
In iris they enhanced this behavior, such that it's safe to call a multicast as soon as BeginPlay fires on an actor/actorcomponent
My understanding of replicating uobjects is also quite limited since I can't find good documentation on them
OnRep doesn't fire after all the entries are valid
On array I mean
That's just not how it works
I see
alright that makes alot of sense
so OnRep is called multiple times for the different stages of array replication?
Right
what are these stages?
it sends the size then it calls for every element one by one or does it call after all elements are sent?
Every time an element replicates
I see
I mean if it can combine two elements in the same packet
Then you would get replication callback with two elements that are valid
So it's not strictly calling the OnRep by the size of the array
yeah makes sense
@thin stratus (question from our last convo a few weeks ago) do you need a third party relay server for ue5?
is doing this enough to guarantee UObject replication? other than this my UObjects have IsSupportedForNetworking() returning true and other functions overriden for RPCs
this eventually gets called with an Actor's ReplicateSubobjects
Yeah should be enough
Just in case you forgot something Jambax has an article on that
Goes by the name "Replicating Objects: Building a flexible inventory system"
lmao
tbf it's easier to use the subobject list now
how would one do that?
I've had too many problems so I'm thinking of refactoring it all to use structs
For what specifically?
Hosting and joining games
Like if I make a multiplayer game will listen servers just work off the bat
would I need to call AddReplicatedSubobject for subobjects of a subobject?
You need something, unless you want to just use join via IP
Yes
Also runtime spawned replicated subobjects should use the actor as the outer
been painful getting this to work lmao
Otherwise problems
yeah that's already the case
does the UObject need to have IsSupportedForNetworking and all that?
yea
Hi guys for implementing multiplayer the engine must be a source build?
seems to be causing more issues than the old system :/
Only for dedicated servers.
Thanks Daekesh, read for android builds the V2 iap doesnt work heard need source build to modify some line to get the variables
Ah for that I don't know.
It does work but cant get the text variables somehow. To set local currency text
Hi. Can I somehow specify a game mode to use when opening a map? (in c++)
In general you pass that along as an option
?game=shortcode
shortcode being something you set up on your Project settings under maps and modes
No. None of the popular engines would require that. All a relay server is, is a way to get around the NAT stuff of modern modems. It's not engine related
If you port forward and then share that info with your friends, they can join you without using a relay server
Is this type of system implemented in unreal by default that I won't have to port forward? I'm not exactly sure how all of this works
No
Port forwarding is something you do on your router/modem
Relay servers or Master Servers are hosted outside and aren't relevant to Unreal at all
You either need to code that yourself or use a provider like Steam for it
Out of the box UE only provides direct IP Connection or LAN. And LAN might not work if your Router doesn't like you using the broadcast IP iirc
one of our programmers is working into adapting Valve's source code for multiplayer and sockets, to get around the NAT issues
it is a very cool library
is it possible to use VoiceChat in NullSubsystem without having session ?
i remember voice chat needs session otherwise it wont work , but im using NullSubSys and connect by direct IP
Yes but iirc you need to fake the session entry locally
Otherwise it won't send the voice packages
4 years ago I faked that s*** by editing NSS, I cant do that for a simple project anymore
I just need a easy fast way
You don't need to edit though. You should only need to call addnamedsession manually
I feel like they added this function recently
๐ค
there was not such thing at that time, most of them were private ๐ค
my data asset isn't replicating properly for some reason
it's a subobject to a replicated uobject
i think I know why actually hold on
your data asset shouldn't be replicating, it should have static data packaged with the client build
Hey everybody, I'm a student in Scotland and working on a project researching the indie dev industry. I'm wondering what tools people use to bring multiplayer to their games? Basically a friend has developed a project to bring MMO-scale hosting to indie dev with a few lines of code. Is this something you would find useful/interesting? Would really appreciate people's thoughts/feedback ๐
Basically a friend has developed a project to bring MMO-scale hosting to indie dev with a few lines of code
Already I am skeptical
Scam alert ๐จ ๐
haha - genuinely curious why skeptical? not baiting, just an actual explanation would be very helpful ๐
Just that MMO's are bafflingly complex to build - and Unreal generally isn't an MMO-oriented engine.
Not that people don't do it, but they're pretty few and far between
I've no idea if there are even any moderately successful ones, but depends on your definition of MMO
yes - very true! basically my friend wrote his university computer science thesis on how to solve this for indie developer's. and trying to figure out if it is something indie developers actually want to be solved...
IMO, I doubt it
If you're going to invest in an MMO at all, you'll invest in your own tech
And only enormous companies have the capacity to deal with it
A backend is one thing, actually making an MMO is another
Indies don't have the resources
because of the need for content/assets etc as well?
all of this is super helpful thank you ๐
Also the general complexity
yeah well i guess the idea it least is to create an open source tool off the back of the thesis that handles all of the complexity for indie dev's, but i suppose it's more a question of whether building an MMO style game goes against what indie devs actually want
First step tbh would be finding an indie who actually wants to make one and asking them
The complexity of MMOs is not hosting, that's only a very small part of it. That's why you're going to get pretty much nothing but skepticism around it - it doesn't solve a problem that "indies" have when building MMOs.
https://gyazo.com/79c983563eae1da6133ec83eaf52e831
erhm so brand new project from the fps template and all im doing is spawning the "projectile on server" but it crashes the clients ??
really replicating from client to server/client(listenserver) bugged ๐ฎ ?
MMO-scale hosting meaning..... what?
That a game could have hundreds of thousands of players in the same server.
Oh like a chat room
I suppose that counts
the connections aren't the problem, the game logic that doesn't need a supercomputer to run is
Hundreds of thousands of people playing Chess is not the same as them playing For Honor
Yes of course. The thesis is effectively around how you distribute that compute load in an effective way that doesn't require a supercomputer as you say.
Here's a similar company for example: https://www.ycombinator.com/launches/IGu-rivet-heroku-for-multiplayer-games
Why is it that you need to code it yourself? Why can't it just exist in unreal
Because it's the type of thing that's gonna be totally bespoke for every project.
and also, not really the engines domain.
Wdym by bespoke
it's an infrastructure problem
custom
WoW will have a very different system from New World or EVE or Destiny
If you have to ask, probably impossible.
I mean not impossible, but very impractical
You aren't going to make an MMO from your basement by yourself.
Big teams spend hundreds of millions of dollars on MMOs that fail instantly.
Something like ROTMG, sure
but you'd have to be pretty damn good at backend stuff
It'd look more like a webapp than a game
Providing MMO solutions for indie devs feels like going to someone who's working on a kit car in their garage and telling them you can make building an aircraft carrier easier.
Help, still trying to wrap my head arround extending the CMC
I see that when we use bitflags from the saved move, we are super happy because those are always replicated from saved move to saved move. Yay.
Now... when we need to replicate extra values (or we don't want to use the bitflags) we have a FCharacterMoveResponseDataContainer that replicates the other variables but I have no idea how it works ๐
Researching unreal says that it's the aknowledgeing package for a move and that it copies the FClientAdjustment and some extra stuff โข๏ธ
I don't unterstand how the FClientAdjustment becomes the FCharacterMoveResponseDataContainer but let's say I belive in my heart of hearts that I will get my corrections inside this data container... the example for stamina (https://github.com/Vaei/PredictedMovement/blob/main/Source/PredictedMovement/Public/Stamina/StaminaMovement.h) only implements the "filling" part of the data container: FStaminaMoveResponseDataContainer::ServerFillResponseData
Where/How does the correction data gets applied to the client? ๐ค
(there are variables inside the FSavedMove_Character to represent the variables inside the correction Data Container but I thought the SavedMove wasn't replicated ๐ค How/Where do we get the Correction Data?)
Self Answering, I think it comes in the UCharacterMovementComponent::ClientHandleMoveResponse ๐ค ๐
yeeeep, that's it ๐ฆพ
thanks for coming to my ted talk
@grand kestrel sorry to ping you, I have reached the bottom of the rabbit hole I dug in and I am at a loss ๐ฌ
Analyzing the stamina movement I understand how the UCharacterMovementComponent::ClientHandleMoveResponse realizes there has been a missprediction and corrects it (I even understood the comment about having to override the entire client handle instead of just the adjust client position) buuuut....
In none of your SavedMovement you implement FSavedMove_Character::PrepMoveFor, you only implement FSavedMove_Character::SetMoveFor.
If I understood correctly (and I might not have) I think that FSavedMove never travels through the network and is only used locally to re-predict the movement (replay) when the server corrects. Without the PrepMoveFor, saving with SetMoveFor is useless.... right?
cc @thin stratus. If I am getting banned for pinging network gods, let's ping everyone at once ๐ฌ
I don't think you're going to get banned for trying to learn so long as it's not inconsiderate (which it's not) ๐คฃ
This is something we discussed in detail at an earlier point, it would just end up being sent twice and out of sync if we put it there, its already being sent through FStaminaMoveResponseDataContainer::ServerFillResponseData
@frank birch
But when I correct I get one correction from the past (that fixes my wrongness in that frame) and from there onwards I reapply my locally saved moves...
Don't I need to reapply my saved moves for replaying them?
or do I assume my saved moves have wrong values and don't bother?
I found Exi's explanation, for reference: #multiplayer message
Unless the idea is something like spatialos (which isn't just hosting - it's a full tech stack that handles transitioning players across multiple servers to create a "seamless" world) then it's also competing with stuff like GameLift and PlayFab. They may be "big" but that doesn't mean they don't cater to indies, and it means you'd have to be able to explain why such a service is different or better. So far it sounds like "just" another server autoscaling service which there are a number of already.
YEAH! I was right ๐
#multiplayer message
In regard to why PrepMoveFor and SetMoveFor shouldn't set stamina, Exi said:
Cause let's say the server corrects it to 5 and your move still has the old value of 50. Your saved moves will continue sprinting longer and cause another correction
Cause instead of running out of stamina you will probably have enough to keep sprinting and then send a new server move with a location that the server can't reach
The boolean also comes from the server. Doesn't sound right to override it with the saved move
And for saving it into the saved move, the InitialPosition function should be enough
But what if the correction is for something else? Say a small bump into a server authoritative object that performs a small correction on my speed. Shouldn't I replay my stamina correctly? ๐ค
Beware SpatialOS, they couldn't give us any indication of pricing and all we could gather is that it was going to be significantly more expensive compared to Google Compute, which they run on. That was a few years back now though, they may have improved
I'm not saying they're good, or suggesting them in any way.
Just using them as an example of something that isn't just auto-scaling.
Yeah just mentioning since it came up ๐
I always warn any indies away from them, if dedi server hosting is too expensive then they're wayyy too expensive
AutoReply, again: If the movement correction is for something else, the server still packs the correct information for stamina and should get applied correctly ๐คฆโโ๏ธ
I am dumb
then... putting my stamina in the SavedMove at all is silly ๐คฃ
only the "wants to" goes there and we good
I feel like I've leveled up, thanks again โค๏ธ
I'll add to FAQ
I knew that info was there but its a pain to look for, makes sense to have it available on the readme
Getting to be a pretty complex FAQ, usually FAQs tend to be simpler questions ๐
complex topics, complex faqs ๐
I rarely meet anyone, living in NZ ๐คฃ Trying to move to Spain in ~18 months tho, or whenever they finalize their new digital nomad visa
But sure ๐
I do want to try to actually ever attend a GDC
Same!
I am from a Argentina.
I am going to the BIG festival in Brazil. So I am technically getting closer ๐
It costs thousands to fly to/from US from NZ - flying anywhere other than Aus costs tons when you're so isolated (and small and therefore lack competition amongst airlines). Getting off-topic now
is there a way for my ReplicatedUsing to only call once the entire object is fully recieved?
or is that what it already does
I know it doesn't do that for arrays just want to be sure for objects that contain arrays
It's not - since a reference TO an object is replicated independently of the object itself
That OnRep will only fire when that object pointer value changes, it won't fire when that objects' internal properties change
Don't rely on it, it's impossible