#archived-networking
1 messages Β· Page 61 of 1
and make sure it doesn't rely on any FP math
Competitive FPS doesn't need deterministic
competitive fps is almost always some form of state transfer combined with inputs
and RTS doesn't typically need "real" physics
For state transfer, close enough can work with physics
You just will get more desyncs and have to resim more often
But am I wrong saying that state transfer opens up the ability to cheat, which in most competitive FPS isn't a great thing?
Depends on the cheats you are talking about
Imagine movement.
a shader based headshot aimbot isn't going to care about any of that
the mouse input shits on all of that
since the server has to accept any value the player gives
Movement hacking you can stop with state transfer just fine
determinism isn't about stopping hackers, its about not having to state transfer a bunch of stuff pointlessly
like if you have tower defense games and those towers spawn 100 ai dudes... that would be hell to state transfer
so for games like that, determinism lets you avoid all of that, just by doing it all with user inputs only
But overwatch and such are straight up state transfer, because it makes life a lot easier
determinism is fragile, and coding to make it bulletproof is a full time career (thus fholm and erick)
But if you're using state transfer for movement as an example. (Not talking about the head rotation of a player. Just simply AWSD) then how can you make that 'cheat proof'. Aren't those solutions build around having some kind of gracefulness around the state?
What cheat are you trying to avoid there?
you make it cheat resistant by making it server authority
The server runs the sim, and produces a state
Speed hacks. So a player can't move faster than any other player.
the owner compares that state with the one it had gotten for that same simulaiton it predicted for itself in the past
if the owner finds that the server result disagreed, then the owner has to resim and try to get back into agreement
A cheater can ignore that an move wherever... but the server is going to not care. On the server that player is right where they are supposed to be.
Server authority over movement is how you stop speed hacks
Prediction on the player is just for the players benefit, it is not reality
Determinism is way overkill to just try to stop speedhacks
From what I understand in order to get those kind of results you would need to send the input from the client to the server right. But wouldn't that require determinism in order to not get a out of sync client all the time? What I thought we were talking about is having the client send it's current position state to the server.
nah, you can make it work with "close enough" determinism
you don't want to resim the entire world anyway just to correct a desynced player
that would be a hefty resim
Determinism brings with it a bunch of things you don't want to get into just for that
the big one being near constant resims
for resyncing a player predict, that just involves a second simple scene of just the basic map colliders, your player, and maybe a couple entities that might affect player movement (like nearby players)
Typically for FPS type games, the desync isn't super common. It typically comes from some other player action (like getting in your way, or bouncing you with a rocket blast), the rest of the time its just you and the static map.
So basically Unity is good enough for sending inputs without having to resim all the time (except when bumping into players and those kind of things). But it isn't good enough for full determinism? At least, that is what I understand from this talk π
yeah, try to just keep the terms clear
a deterministic engine requires 100% never disagrees results from the same inputs... on any machine
a deterministic event, like a weapon fire just means you can exploit the predictability of that shot
a deterministicy simulation, means you are going to get reasonably close results. Not idea, but with state transfer its better than nothing
To do it well, you would really want to write your own player physics (controller code) that is actually deterministic
But with state transfer, you have a built in self-correction for sims going off the rails
I don't know what your game even is, so hard to comment on what your challenges are going to be
But the typical challenge with FPS games is getting your prediction feeling good
You also have to decide if you are doing snapshot interpolation if you are going to want to have the server rewind shots
You seem concerned with hacking, so you might have to go that route, though its falling out of favor with BR type games (too expensive for the server to do that, so they just give the client more authority and rely on other anti-cheat measures)
If you start into one of your first net game attempts worried about cheaters though, you are going to spin your wheels A LOT.
I really don't have a game I'm working on, I'm just trying to understand the typical issues games run into when making game X.
Trying to understand what kind of different networking architecture's there are out there and which issues exist, and how those are 'fixed'.
Net games will fail without a marketing budget
Throw concerns about hacking out the window.
You are way too early into this to get lost in that sand trap
Make a good game, or even a game that works at all
then step back and decide if you even like making net games
I've made a prototype with PUN2 which seemed to work, which definitely was not cheat proof lol. https://www.youtube.com/watch?v=IsS6krcMc_I
Well prototype isn't the good term in this case. But I made something xD
yeah, a movement test is usually where most people start
That typically though is something most people get done on day one
Now that you are talking about determinism and actual real games, you need to start thinking about simulation
game networking is ALL about the simulation engine, and almost zero about the messaging
All of his stuff is considered a good entry point into a lot of this.
I had also found a github page which has loads of these kind of websites and talks. https://github.com/MFatihMAR/Game-Networking-Resources
Which seems pretty useful as well to me π
yup, though information overload
But you would recommend getting into simulating 'things' (players, entities etc.)?
the simulation ties into the tick engine, and how you manage time and sync in general
as well as how you internally create your own deterministic order of operations and such
The mistake most of the libs available is that they are messaging layers only, but they try to sell people on the idea that they are a complete stack.
actual networking looks like....
Messaging <-> Input and State Buffers <-> Simulation
Messaging is easy, its just serializing and deserializing stuff
The actual work of networking is in making the Input and State Buffers <-> Simulation
messaging is only there to transfer those buffers over to other machines in a timely fashion
A fancy netlib with all the RPCs, syncvars and other wrappers doesn't eliminate the need for the primary engine to be in place.
Alright, thanks for the information. Sounds like I'm going to spend time trying to learn that part. See how it all works etc. π
You can poke around my code base if you would like
Would love to!
is there an easy way to run functions on both the server and clients
You kind of have to be specific about where you want to call things, and how you want that message to propagate... and you need to indicate which net library. @toxic lintel
unet
its server based, so the server is the hub of all things
meaning if as a player you want to message people, you may not. What you do is message the server... and you can set that message type up so that the server then sends that to all clients.
Clients are not aware of one another
So typically, you use [Command] from theplayer to the server.
You then in that cmdMethod call an RPC to send a message from the server to all clients.
other way around
Player calls the Cmd. It executes on the server. Inside the Cmd method is an RPC call. RPCs execute on clients.
You might want to join the Mirror discord server, everyone there knows Unet/Mirror much better than the average person here.
@jade glacier about that rpc thing, i realized recently how beautifully simple it is to make a function pointer table work with rpcβs
The packet ends up looking like this
index of array of function pointers, offset of start of memory (what data to act upon) Index of stack the input had occurred
Gotta love it when your allocator is so solid that even the area in memory the objects are , are exactly the same
So it just looks like a vtable, but global, and completely functional in its structure
If you aren't doing any kind of variable packing that make sense yeah
Yup, the packet gets even smaller after compression
I assume then you are doing some kind of RLE compression on the whole byte[] rather than bitpacking?
RLE?
Oh im using this.. let me get the wiki page
Dynamic Markov compression (DMC) is a lossless data compression algorithm developed by Gordon Cormack and Nigel Horspool. It uses predictive arithmetic coding similar to prediction by partial matching (PPM), except that the input is predicted one bit at a time (rather than o...
It works better for data thats already very small
Zip tends to have an overhead that makes it even larger
Markov compression is part of the LZMA algorithm too
Sounds good.
I am not using any kind of allocated memory, all of my stuff is meant for not ECS scale and focuses on bitpacking in serialization - so very different animal.
Gotcha
The main benefit of hand serialization is you can inline your logic into the serialization
I know that Object is already huge, not sure if you are forced to serialize that in your stuff
so lots of 1 bit prefixes to things indicated if certain stuff was serialized or not
You should have control over what is included in your method - just a bit harder to bake in any serialization logic into the stream
bitpacking with lots of logic is going to be the smallest, but its not going to be the fastest by any measure
Ive found that if you are just smarter about when talking should happen you have more time to serialize anyway xD
Doesnt help for downloading large files to have a slow serializer of course
Are you trying to serialize a large number of states or some goal like that?
Oh that only happens once on the client, and i always serialize and pack the current tick on the server anyway
The serializer is already really fast as it is so i just touched it
Donβt touch*
If you are just byte copying from your allocated memory I would think it would be stupid fast
Well your right it is
:p
It has its own assembly subrouting that makes it even faster at copying data larger than 1mb
Using avx instructions
Subroutine*
That is kind of the backbone of the DOTS netcode stuff I think
For the server side you get a lot less CPU carnage in exchange for not as great compression
Which for like a BR, I can see that being useful
but i receive the message when the player joined the server
PUN2 I assume you mean? What's it doing?
nothing
the scripts will literally not recognize anything
using photon.realtime or photon.pun
You have no errors anywhere?
nope
Installed the asset from the store, and none of the define symbols showed up?
nope
I'm not an actual PUN2 dev, I make an extension for it -but I am curious what is up with that.
So literally made a completely fresh Unity 2019.3 project... added PUN2 Free from the store... and not a peep of any kind? So where are you experiencing the failure?
code in VS doesn't recognize it?
nopee
I made a new fresh project again and imported it
have you tried closing and reopening everything?
turns out i get this errorhttps://gyazo.com/bfed4d4ecac89fdd0b932c9cc45e0951
i feel like a noob.. this never happened to me before
Unity is a wreck right now
as far as I would guess, since that is the thing that has changed
PUN2 works fine with every previous version back to 2017
people are saying it works in the newer versions
I'm trying a fresh .6 now as well
You got to the part where it asked for you PUN appid, or failed before that?
I get that same assert fail, it shoudln't matter
Made a new script, no issues
Might want to reinstall your Unity or something
yeh..
yeah i've been using it
Any other imports of assets do that?
You can try adding the define to the symbols by hand and see if that does anything
As far as I know those symbols wouldn't matter for this
If you right click on the assets folder and force reimports and such what happens?
does it scan al the files in the photon directories?
I'm vs 2017, and its all working just fine
I would start by making your own quick namespace, and see if it respects that
next thing to look into is that maybe 2019.3 on your setup for whatever reason is not happy about the ASMDEFs in PUN2
I am trying to make a predictive multiplayer setup.
Here's how i plan my scene setup to be:
-SyncedScene (runs in past, smooth looking)
-PredictionScene (rolls back to synced scene, extrapolates inputs, not smooth looking because of internet delay)
-SmoothedPredictionScene (PredictionScene but lerped position/rotations)
My questions:
1 - Is the 3rd scene necessary, can i have smoothness without 3rd scene?
2 - How can i disable camera on 1st and 2nd scenes and only render 3rd scene easily? Or stripping renderers is the only way?
3 - If you did something similar how did you have your scene setup?
Are you writing your own simulation, or is your simulation PhysX or some other physics engine?
Because that simulation engine counts as a "scene" in the context you are talking about
@jade glacier physX, i rigidbodies and colliders
default everything
I am not going for 100% determinism
I typically just have my main scene
and then a scratch scene for resims
the main scene already interpolates, physx is built in and automatically does that for you in Update
rb.position and transform.position in Update() won't match
rb.position is the result of the last sim (FixedUpdate)
I don't know, the interpolate doesn't do it for me, i think rigidbody interpolation interpolates too fast? I mean maybe it's interpolating 0 to 1 until next fixed update frame, i want it to take longer, multiple fixedupdates.
I want the interpolation to take longer because gap is often too big to cover in one frame
I remembered there was a setting that can disable rigidbody editing the transform
Guess i'll use that tomorrow
Not sure I follow
Fixed and Update are completely tied to PhysX
how it interpolates is exactly correct, unless you mean on the client side where you are trying to recreate motion
that you will want to do yourself with your own lerps
so you're saying i need the 3rd scene?
nope. I think we are trying to type very complex concepts with generalizations
you should start with just your one scene, and get that working without prediction
then add prediction, and decide how you want to deal with resim when you get to that problem
You seem to have a lot of complex problems way too early into the process, I think you might be overcomplicating things too early in
when a player changes its input (moving left while moving right)
its prediction on other client jumps instantly to the otherside in one frame
i already did those let me show you what i got
Why are other clients predicting?
I have no idea what your architecture is then, I was assuming a standard state transfer
i send only inputs right now
Start with no prediction... everyone sends inputs to the server on a tick... server sends out state results
ill send state transfers every 2 seconds or so
everyone recreates the server state by lerping between the states it sends out
yeah, you are doing some way atypical
so I can't really comment, you are kind of out in the jungle with that
Have you made a standard state transfer with interpolation and client prediction as a starting point?
i can serialize states right now, but havent sent them over internet yet
Or at least are you modelling this architecture after a game you know about that does what you are doing?
just using that for rollback right now
Yeah, you are trying to get too tricky WAY too early on
Have you made a working networking system with standard practices yet? Or is this your first attempt?
Nothing that exotic is going to work unless you really have your simulation management buttoned down tight
55 Likes, 3 Comments - The Puppet Lord (@baranuss) on Instagram: βmultiplayer tests . . #unitygames #unity #unity3d #programming #cs #blender #blender3d #insaneβ¦β
with photon though
its got lotsa bugs
thats the clients view
What is the net architecture of that? pure client authority and state interpolation?
this one i sent?
The one above
clients have movement authority
server have arrows and healths authority
If its PUN its likely pure owner auth with state interp
yeah, that would be pretty standard
so now you are trying to make a server authority model work. Start with the standard system and get that working before complicating your life so much
standard practice is player inputs to server... server states to all
Don't be trying to send player inputs to all players unless you have a deterministic system happening. A state every two seconds is going to make some HARSH corrections
client -> input -> server 10hz
clients <- inputs <- server 10hz
clients <- state <- server each 2 seconds
yeah, don't do that
1 second state sends then
Unless this is like a turn based game... you are setting up for massing latency and harsh corrections with those values
Pick a net rate... and send inputs at that rate, and have the server send out states at that rate
trying to miser data to the extent you are is going to make garbage and frustrate the hell out of you
Get a working fixed tick state transfer going first... THEN start playing with ways to miser your data
Is there a game you are modelling this after that uses values like that?
no, not at all
Oh well, you do you. I wouldn't recommend the path you are taking, but its always good to try weird shit to learn.
@jade glacier thats what it was,
on the left prediction is smoother because applied directly
but other client recieves packet 10hz, its a little more skippy
its kinda difficult to see because of low gif framerate
The model you are making is too foreign to me to have any good feedback for you sorry.
how much bandwidth at max should be used per client do you think
how much should it cost at max per client at max:
input transfer + state recieve
typical no worries target is byte[1000] per tick
and your tick rate being in the 20-120 per second range, depending on game format
that is for UDP
you are doing TCP which is a whole different animal
and not really recommended for fast realtime 3d state transfer stuff
3d state transfer?!
you can tell them to be
just be careful mixing reliable and unreliable streams
doing that typically implies a lack of a simulation and a lack of state/input buffers
Messaging <-> Input/State Buffers <-> Simulation
That is path to sanity. Throwing messages around outside of your state and input buffers starts to invite race conditions
I do yeah, but I am doing something different with PUN2
it depends how you are dealing with lost/late packets
that would be clients fault?
fault for what?
lost packets? That is the internet
TCP automatically retries and holds up the stream at the hardware level
next state that client recieves will be more off from prediction i mean
and that will happen frequently
RUDP does it at the software level
If you don't have a tick system for state and input buffers and how they tie to a fixed simulation, you are going to just be flailing around with it.
by saying buffer, you mean server simulating in past?
I mean a whole system you should have in place before starting in on messaging at all
first you have a fixed tick... that is your simulation rate
before every tick you collect inputs for each connecton. You then apply them to the current STATE by running your SIMULATION.
That produces a NEW STATE, which is the state of the next tick
You store those INPUTS and STATES in buffers
That is your history
and that is what gets serialized
Clients that are predicting store the inputs and states they used for prediction... and serialize and send the inputs the the server, which is uses to also simulate.
the server produces a new state (all of the values of things after simulating)... and sends that to all clients along with the tick number.
The owners compare the state results for the objects they predicted to determine if there is a desync
If there is a desync, they rewind back to the disagreement, use the server state value as the starting point for the tick where they went into disagreement... and then resim back to current by applying the history of inputs. Creating a new history that should now be more in agreement with the server.
I can't really type much more about this without starting to cut and paste from all of the websites that talk about this stuff.
The owners compare the state results for the objects they predicted to determine if there is a desync they rewind back to the disagreement, use the server state value as the starting point for the tick where they went into disagreement...
Why don't client just replace its scene with server state without checking for desync?
Is it supposed to be an expensive operation?
Deserializing a state?
you still need to deserialize it to check for desync though
Because with latency you only know about the desync well after the fact
You only know that the server disagreed X ticks ago
You deserialize it every tick, you need it for your interpolation
When the tick update arrives, it has a tick number at the front of the packet. You deserialize that state in that packet into that buffer tick slot
Oh wait, client doesn't rollback and re-simulate everytime it recieves a new state.
You really should read the gaffer docs, and look into some of the standard networking stuff done for Counterstrike, Quake and Overwatch
you are basically asking questions that will take me 10000 words to explain, and will require graphics
Not really, i think i got it
You should be familiar with the standard systems before trying to do anything exotic
This architecture is understandable though thanks @jade glacier
variations on that are what most FPS games use
it is standard server authority state transfer
I guess i'll halt my architecture and turn it into this
Once you have a standard simulation in place with buffers, then you can futz with net tick rates and such
The simulation and buffers interaction though really has to come first
Any netcode pros in here that could help guide our team to a hacky p2p setup for a MP shooter?
we just need it for game play testing. nothing public. we also have a core programmer but his strengths are not in networking, he can do it but its a stressful ride. so even some guidance would be really incredible
willing to pay as well π
DM me if you got the goods please
currently trying to use photon
Is there a callback to know when the second player joins the room I created so I can get a reference to him in my scene gameobject?
I want to display and compare both the players health and show it in my Canvas UI, mine is a 2d game and I can get the reference of my player or the one who creates the room, but I have no way of knowing when the other player joins the room to get a reference of him
I'm using photon btw
Ah will check it out
Here's a sample of the car physics two of my colleagues have been working on for quantum
full 3d deterministic physics engine, here demo of the car physics
full rollback/prediction support for entire physics world, etc.
π
Suspension + tire friction models are stable already. Now it's pretty much "game design" (calibrating for different vehicle models, etc).
π Noice
this is like space age stuff compare to unity's new netcode
Pretty much. AAA titles will not be shipping using netcode any time soon.
i bet netcode won't be shipped at all
for the last couple of years my confidence in their ability to deliver is vanishing
2019.3 is in shambles.. I mean just look at this crazy bug: https://forum.unity.com/threads/physics-processing-spikes-in-unity-2019-3-0f6-universalrp-demo-scene.821082
They really should have started a new engine for the ECS stuff imo
I am wondering if anyone is aware of a github 'awesome' page for lag compensation with unet ?
It seems like this is not super difficult at first, but then when you start thinking about object occlusion and stuff
"lag compensation" by itself isn't a thing, its any number of strategies really
You are referring to client prediciton?
I was kind of looking at some code examples I could read
or extrapolating states?
no, I have that solved, that was quite easy
Or server rewind?
server rewind
yeah, its gets a little heavy
So, I can keep a list of object states in a circular buffer
For mine in the past with phsyx, I kept a layer reserved for just those operations
oh thats a good idea
But with 2018.3 you can have a separate physics scene
to check for occlusions ?
and I populate that with really lightweight copies of networked objects and terrain colliders
Then, you just move and active the objects you are testing
recreate the shot, and return the results
basically its a scratchpad physics scene
amazing thank you, thats a great lead
np
actually, I found an article I can share
that is simular
My objects are not physics based at the moment
but this solution is starting to take shape in my mind
then no need for anything physx scenes, you should be able to handle that all in your own sim
are you using physx?
not at the moment, its all code based movement and no physics
you mean not physics based meaning no sim, but you use the colliders for tests?
like all CC based
https://hatebin.com/qudcdsyhap
this is my basic ghostworld generator
oh wow, thank you so much @jade glacier
I am going to read/study for a bit
theres a lot to think about with this problem, it feels deceptively simple π
There is a bunch of other files, but that is the one that kicks it oof
I have a bunch of components that connect the real objects to their ghosts and such, for easy back and forth for the resims
and then do you resimulate at time X?
I found this as well: https://ludiq.io/chronos
I don't use time for networking, just ticks
Though for rewinding shots, you may need to come up with fractional times
But if your weapon fire all happens on a tick simulation, then you should be able to recreate things using the tick states alone
The server rewind consists of knowing how many ticks the player is living in the future in their prediction. Which makes it a very simple rewind operation.
awesome, thanks again! this is exactly what I want
In the game I'm making you're a character who can use consoles on a spaceship to control different stuff, like steering, guns etc. Currently I'm trying to give the client who wants to use the console prediction on the object it is using, e.g. one control controls the spaceship itself as a pilot. Now to predict this, which is basically driven as a dynamic body with forces, I would need to only step this object when I do prediction, comparatively to character controller which deals with collision right away in my case. Anyone who've done this or could give some ideas how to solve this problem?
I'm using the DOTS physics as well.
I don't know the actual answer for you, but I always break the problem down into who is the input authority... and who is the state authority
If you are predicting your physics locally, all the usual rules of prediction should apply. You record the inputs in a struct that is the same that is used locally and on the server. The server I assume is the state authority, so on the player side it should be recording the state results for each predicted tick... and if the server state comes back in disagreement, you resim that object.
Mhm, yeah I think my question belongs more in physics channel. I guess my question was more aimed towards if it is common you predict these types of objects or you would only simulate on server with clients input, resulting in some delay. The thing is now that (I'm using the DOTS netcode) so the prediction loop doesn't contain any physics step, so I'm a bit at square zero of how to sim only one physics body. π
I would do the prediction in the main scene if possible, unless you are deterministic there is no "true" scene on the client.
I use the second scratch scene for resimming, but I only include things that will affect the player, like terrain and such. With the new physics though they probably are trying to do a stateless thing, but that would get pretty enormous saving entire stateless physics scenes.
I only can speak to pre-dots handling of this stuff
Hmm, ok. Yeah you would need to save the state before prediction, predict everything X ticks, and then guess roll back everything except the predicted entities. What I've seen so far of what they've been doing has been with character controllers and not touching anything else except the predicted entities in the prediction. But for my case I would only care about static collision as well. But I still need to know how to deal with it in the DOTS Physics .
Generally you will want to be saving states and inputs as part of any networking system anyway
In the case of the predicted player, its really just the transform info. Specifically pos and rot you want to keep a history of with the ticks
Hi
@stray scroll i asked some question about physics in predicted objects (in my case i wanted to predict rockets/bullets which are controlled by the dots physics system) in the forums.
TimJohansson says that they are going to investigate into physics prediction (and i am pretty sure they will come with a good solution because the whole dots physics is made stateless for things like netcode).
So for now i think the best thing is to wait and run the physics on the server (and take the delay).
@weak plinth Think you linked wrong thing ^^
you are right^^
better now
hope this helps π
So for now i think the best thing is to wait and run the physics on the server (and take the delay).
Is all of this really worth doing anything at all with Netcode? That is some pretty fundamental stuff.
Seems like the whole thing is being beta-tested on people who need a working net engine.
The whole thing reads as a bit ass backwards, since a solid simulation engine is the core of real networking. And they don't have that happening yet.
So for now i think the best thing is to wait and run the physics on the server (and take the delay).Is all of this really worth doing anything at all with Netcode? That is some pretty fundamental stuff.
@jade glacier sometimes i am asking this myself, too π I was also wondering why it is not possible to run the physics systems in the prediction group of the client.
Can you not create multiple physics scenes?
Seems you can just do it the way we currently do it, just have a scratchpad scene for resimulation
where you only include the things that need to be part of the sim. It won't be fully deterministic... but as far as I know Unity Physics won't truly be deterministic anyway.
So "Close enough" resim is the best you can hope for anyway.
I am making some assumptions about the current netcode workings... I am assuming its snapshot interpolation with server auth
In DOTS you are programming everything into systems. For client side prediction they run the same system in the server and on the client. But the client runs the system several times for prediction.
I am making some assumptions about the current netcode workings... I am assuming its snapshot interpolation with server auth
@jade glacier yes it is
I assume you mean the client runs several times "when it needs to resim" ?
While not in desync, it should just be able to run the one sim... which is you pushing your player around.
yes, right know it always run its several times when a snapshot is received
The only issue being if the server comes back with a different result, and you need to rerun
that seems weird and not good then
The only issue being if the server comes back with a different result, and you need to rerun
@jade glacier they have not implemented that yet
In my forum post, i am asking this in my first question
https://forum.unity.com/threads/netcode-client-side-prediction-questions.813492/#post-5396892
desyncs should only happen if a non-deterministic event on the server side interferes with your player actions
I glanced at that article, and the answers were making my head hurt
right now they always rollback and resim
this seems like pretty basic already solved stuff
wtf for?
constant rollback and resim I expect to see in a deterministic extrapolated sim
I am either missing something, or there is some dumb stuff happening there
In the case of the player just being a single character controller... desyncs should not be that common
dont know either, but Unitys lead network developer says "We do not have any short-term plans to do this"
so i think it is ok to always resim π
Legit desync causes:
- blocking actions or physical blocking of your player by another non-deterministic player
- packet loss
end of list LOL
I suppose since this may be physics based player movement....
3) Floating point errors leading to butterfly effects
All of those should result in not so common desyncs
also wondering why it is not implemented, but for now it only costs performance π
Only thing I can see going on there is that its trying to extrapolate some other non-deterministic stuff that results from other players to try to get ahead of possible upcoming desyncs
But that is starting to straddle the fence on just making a deterministic system
It could be that the resim cost is so cheap, that they aren't caring and are just brute forcing not having to deal with any of it.
If you are running a giant space sim, that's going to end up being a lot of resim for a whole lot of nothing
The difference between what's called 'client side prediction' and 'predict/rollback determinism' is that you in client side prediction you:
- predict just a small part of the game (usually your character + a few more things)
- you get the correct state from the server, and rollback to this
With predict/rollback determinism you
- predict all or most of the game state
- rollback to a previously saved copy of whatever state is the last one which you have all inputs + previous inputs for
I don't believe they are doing a deterministic rollback... or are they for some reason?
who? unity? no
Assume what he says is true and its resimming EVERY time
resimming every time is common in both models
Trying to make sense of why netcode would always resim the entire scene with every server state arrival
That seems to make some assumptions about the nature of the game
because it leads to more accurate predictions
I can see having it as an option.Like if you want to stay ahead of the causes of upcoming desyncs
ie a rocket is heading toward your face
But if your sim isn't like that and you are just one of 300 spaceships, that kind of resim seems like something you would want to opt out of.
Though, with the ECS aspect, the resims may be so cheap they just opted for "just works" as the default path
yes, possible - i wouldn't count on the resim always being cheap tbh
That is why I am scratching my head (if its true)
the assumption about the game being made is kind of a big one there
it only resims things which are marked as part of the prediction group
it doesnt run the whole game X times
ahh, so it does have some degree of culling in this system
i.e. the systems which are part of the ClientPredictionSimulationGroup
it's not the entities which are culled
Then you have some decent control it sounds like
it's which systems are part of the ClientPredictionSimulationGroup which controls what you re-sim
if you put everything in there, then you predictr everything
That should be enough to make it manageable
Even our deterministc engine does prediction culling....:)
I would expect, since the prediction is outside of the deterministic part of the system no?
Its the cosmetic 'best guess' to show the player no?
yeah, but its not meant to be 100% the final word, its just the best working guess with what is known
Since its predicting
Yes
But this solution is decoupled from the SIM engine
I mean, the culling is done on the ECS API
The prediction/rollback network model does not no we are actually culling
We are quite happy with how elegant the solution for this ended up like
I'm fuzzy on the details, but I think I have a pretty good big picture idea of what is going on
It's one of those thing that just make sense and fit like a glove
It pretty.much removes the overhead of the resimulations
So that is not a problem at all...
prediction culling just means only entities which are within X radius of somewhere (usually where u looking) is whats predicted
and then only the entire sim runs during 'verified' frames (ie,. where u have all input)
Makes sense. I assume the final history though is always done with a full sim (when all inputs are in)
correct
Exactly
I see all of the prediction stuff being "whatever works and is fastest", since there is some flex there
It's the details of how we implemented this that imho ended up so clean
Because of the decoupled nature of the several layers
Of course, not trying to minimize your work at all
just trying to mentally draw an accurate picture
Tbh, the culling was not a lot, lol
It's a massively important and cool features
Feature
I assume you give the devs all kinds of options on how to handle the predictions
anywhere from everything, to nearly nothing
But implementing it just made sense after everything else that was put around by Fredrik
One day I hope to use it
Yes, besides the area of interest "automatic" culling, we also give options to flag entities as not cullable at all, options to manually full out based.on other things, etx
My "Build your physics based space/air fighter and duel with it" game would love that system
Lol,.funny you say that
Working up to that yourselves?
Or just making some premade flight models to go with your vehicle sim
We have a pretty nice model similar to Eve's
That we iterated a lot over a couple of months
I started there when fredrick was making his space thing, and then I added airfoils
This was.personal
and ended up with a complete flight system and building system... but no networking that would be good for it
Fun stuff. Too bad I will never actually get to make a game π
you guys are confusing the two projects
I think he was just mentioning the other one
though the vehicle stuff seems like it should be included
- i have an old (late 2017/early 2018) space sim project thing - what @jade glacier talks about
- erick and i have built a space flight eve thingy recently
ah, three things
Just for kicks, or is the eve thing to help build up some library stuff for devs?
nah personal project MMO thing
excellent
It's to be given to all customers
Any plans to make flight model stuff as well?
Like an asset
We have a few studios working on that
But no plans to make a default flight model for now, no
Looks a bit too much game specific IMHO
Was a lot of fun building mine, learning how to properly deal with drag and angular momentum an such
Though that is more just about making a more proper physics lib
PhysX cheats on rotation in ways that makes sim kind of garbage
Like the space eve thing, we ended up with a custom physics model (both very specific and also simpler solver)
Yes, exactly
Does the eve flight model use something of a Star Wars physics model?
(sort of like there is air... but not)
We did not use quantum default 3d solver
yeah, that looks like Star Wars physics
"thick" space LOL
yeah
That was where I started, and then factored in face area, and distances from center of gravity to create virtual drag and lift
Yeah, it has "ether"
ended up with basically an unstallable wing
Yeah, although we used AOA, not with a wing model, etc
But it was enought to render a standard drag solver useless
The wing code ended up being reasonably cheap.
The benefit of it vs just a prepacked "value" for drag is that it responds to wind direction
it will weathervane and such
and center of gravity changes the flight character
No wind in space in our case, lol
Of course
Different use case
mine was more for making your own PlanetSide2 type dogfights
So it consists of engines that aspirate or are rockets, and the option for manuvering jets in conjunction with wings
Interesting
It was an offshoot because of the model I made to do the starwars stuff
but once I added the plane surfaces lift and drag, it became fun to explore
So I messed with gravity and air density and it made for a very interesting game idea
some of the earlier tests with it, but I had it working with a vtail
Is it local?
on this guy the red cynlindars are rocket engines, so like the ones on the wing tips let you "slide" and the rear engine is thrust vectoring.
This should work with quantum turnkey
Yeah, that's local. I didn't touch the networking because it needs to be server auth
OR quantum yeah
I pretty much stopped work on it. Fredrick was just releasing Quantum and I was like "fuck this, I am NOT writing netcode for this thing when something can just be used for that"
Yes, you'd be able to just port it as it is
yup, that was my expectation when I stopped work.
Then I got buried in this SNS stuff
I had a rudimentary workshop view as well for placing the servos, motors, wings, etc. That part requires no networking, since its all offline.
with GUNS
The real goal is a mech warrior type game, only with flying machines
Though I am not dumb, I will never make it. A game like this needs half a million to be real
Then it has to be slow, don't use a real flight model, lol
Its totally not real
a real flight model would make creating working planes WAY too hard for the average person
and the speeds would be too great
So it largely is based around low gravity, and high air density
Similar to what Planetside 2 flight feels like
lots of hover duels
yeah, not touching that
Try to understand bike counter steering...
Way smarter people than me out there like you guys doing that
And I simply use an interpolated movement from high thrust less rotation, to less thrust a and and more rotation and planar movement (based on velocity) x)
:)
I am just a pilot and grew up on flight sims... so I get flight models. Vehicle models are too much voodoo
Do you have a license?
For basic stuff, the PhysX model is fine. But it does get in your way if you try to start adding proper angular moment and forces
Yeah, though haven't flown in like a decade
I got up to my Multi-engine rating
Oh, cool
I just did the first initial experimental lessons, enought to put my hands on a single engine rv9
fun fun
Tons of
I recommend a flight lesson to anyone. Its not that expensive, and they let you do a LOT if you come somewhat prepared
I took one heli lesson, and he let me do it all
Exactly my experience, I studied a lot before
i wont even set foot on a plane unless my life depends on it π
Why would I risk someone elses life like that xD
No need... that's why we make games π
just look at the drama over spain right now
Lol
as in literally right now this very moment
Oh, not informed
boeing 767 lost a landing gear which flew right into an engine, and now they need to make an emergency landing with 1 engine down and not all landing gears
Year off to a bad start for Boeing
they can not catch a break
It already landed?
no its circling
I would love to see that video, to see how a landing gear comes off... and then manages to go forward and up into an engine
and the sun is now down?
or one of them, or parts of them
My news source says it landed 19.10 from a source of Reuters
oh its alraedy landed? swedish news is out of date then
I just watched the vid on independent
you swedish?
Yea
had no idea
Fucking swedes are taking over
@stray scroll which part of sweden?
Sadly couldn't attend the Meetup at Game Habitat, just moved to Spelkollektivet
The landing gear seemed to be intact anyway, just something came off of it and that hit the engine
@stray scroll oh you moved in there?
ur not "that" far away from me
like 200km i think
Yeah, previously lived in Karlskrona, but now staying for a year at least. Ah, what city?
i live on the eastern part of vastra gotaland
little shit town in the middle of nowhere
Woodcity
@stray scroll https://www.youtube.com/watch?v=jkYEASWiZ4Q same general region as these guys AFAIK
so yeah farm country π
but i like it out here
https://www.youtube.com/watch?v=F7dITQS8zn4 other good song
if redneck music is your thing
gonna remove that thumbnail lol
Haha, how have I never seen these before
@stray scroll they have a show on SVT even, "uti byggda"
Will check it out π Can't say Spelkollektivet is in the middle of somewhere either, but it's cheap and dev people around^^
yeah i know where it is, it's really in the middle of nowhere
how many ppl in that town like 2000 ?
π
think like half? x)
lol
So is the entirely of Exit ever going to all get together an put out a playable for profit tech demo? @graceful zephyr @gleaming prawn ?
Alone, no
We do not have any expertise in game design, meta gaming, etc
It's not what we do
Yeah, that would be the catch. Would require a lot of non-networking peeps
Yep
Seems more like it would take a joint venture with some indy group good at everything but netcode.... but then it just becomes a distraction.
However, the upside if done correctly is massive - per titles like Fortnite. But the risk is also pretty high for all that distraction.
And a hard case to make to any indy group, because they already get the Exit tech at a reasonable price... why give up ownership for the tech they already have access to.
fholm should try make quantum for unreal, if its good enough tim sweeney will buy him an island
better then making games
I dont think Unreal has a good deterministic engine. I would expect an eventual UE release of Quantum
@weak plinth lol
Does this island help with solving entity traversals?
If not, I bet Fredrik will pass
@gleaming prawn too much of an internal joke lol
Yes
I implemented this:
client -> inputs -> server buffer (waits) -> server (10hz)
client <- state <- server (10hz)
When client recieves a new state, checks if its newer than latest state and replaces (i didn't think a buffer is needed here?)
.
But i've been thinking about this example:
In a realtime fps game:
- clientA clicks and shoots one bullet
- server recieves multiple inputs in last tick, simulates, sends state
- on clientB, in the recieved state, input of clientA shows that clientA didn't click that frame
- either clientB doesn't render gunshot effects or some spagetti code has to be implemented to render the gunshot effect
How would you know when and where to spawn the gunshot effect?
That sounds like you are using an unnumbered Queue for your buffers
you will want a ring buffer or some way to number those if you aren't
Only glancing at your block of text, but it implies you aren't strictly controlling your ticks
whatever exact inputs you use on the server, you use locally
applied in the exact same way
queue holds inputs with their time values
server gets inputs at time = t uses them, dequeues them
t is a frame in the past
..
whatever exact inputs you use on the server, you use locally applied in the exact same way
yes
No idea what t is in this context
but you will be dealing with the players history
The servers timeframe is the only true timeframe
and players will have to correct if the server comes up with a different result
server runs a scene at T, everybody tries to render T + 10frames
That's a bit nebulous what that means sorry
that 10 frames of delay is when the server gets to pick up all the inputs players sent
I keep having to guess what people mean in here, and I keep guessing wrong
so unless I fully understand the question, I'm going to avoid answering
Players should simulate with whatever tick makes sense based on their buffer size
Server does not immidently act when its recieved an input,
I made pretty much sure of this:
Clients local simulation will be the same as servers* simulation
They can tell the server which server tick they were using as the world around them
But that is mostly just so the server can send back its state results using the same numbering
Server does not immidently act when its recieved an input, That is correct yeah - you want that buffer
The clients simulate with whatever tick... it doesn't actually matter
i do have that buffer, but though different means to what you are thinking i'm guessing
Are you rewinding shots on the server or doing any server resim?
thats the only such buffer i have and its on server when recieving inputs
If the server is doing no rewind, then it doesn't care what timeframe each player is in
if we are not talking about predictions and whats displayed on the screen,
server does not roll back and resim
It just pulls inputs from the buffer and lets players know its results
yes
You will want some way to sort out on the player which frame the server was using for that player
umm
players send inputs with frame number attached
server state also is sent with frame number
yeah, then the server just needs to attach that number to the returning state sent to the player
nobody is lost in time
In a realtime fps game:
- clientA clicks and shoots one bullet
- server recieves multiple inputs in last tick, simulates, sends state
- on clientB, in the recieved state, input of clientA shows that clientA didn't click that frame
- either clientB doesn't render gunshot effects or some spagetti code has to be implemented to render the gunshot effect
So, do you render that gunshot or leave it be?
Unless you are trying to sync inputs to all, you would just go with whatever the state is from the server
since that is the only actual "fact"
I don't get on clientB, in the recieved state, input of clientA shows that clientA didn't click that frame
why is there an input in the state?
inputs are inputs... states are states
its a single input
input = cause
state = results
1 frame input
Your server state should reflect that the gun is firing that tick
i serialized current inputs of characters in the state
Sounds like a path to hell
ah, tick based approach
you should pick a lane... you are using inputs... or you are using states for server -> clients
you can do hybrid stuff, but it gets a bit advanced - and should be for good reason
just serialize the weapon with a 1 bit bool. ( assuming you are bitpacking) that indicates "Fired"
or like a byte, if you subdivide your net ticks, to indicate which which subdivisions bullets fired on
if i send a state for every 5 frames, i have to look at each frame if gun had Fired==true?
Then you may want to subdivide things that need to be subdivided
like use a byte as a bitmask with each bit indicating which subtick you actually fired on
I still think you keep trying to outsmart yourself here
[from server] maybe i could send something like these each tick instead of sending state
inputs0, inputs1, inputs2, inputs3, inputs4, state0 tick 0
inputs5, inputs6, inputs7, inputs8, inputs9, state1 tick 1
all of these attempts at saving data are adding layers of difficulty in getting a basic working starting point
Why are you sending inputs to all clients?
nevermind that
its already working, i have the base point you said i should have first
just no graphics and game build on it
Why are you sending inputs to all clients?
@jade glacier
because in those frames there will be the information when the client fired its gun
Which again... is blurring the lines between input and state
.
projectile will be replaced with new info in server state just after all these because projectile is going to be something that gets to be in the state
but gunshot effects, knockback effects, everything will be there
while otherwise they would require spagetti
I wouldn't recommend that, you are starting to make spagetti before you even have a working engine
I'm not sure what the question is at this point?
How do you go about making a complex mix of inputs/states and skipped transfers? With a lot of tangled code.
[inputs since last sent state] + [state] 10hz sent by server
State should be the only real information, it is the complete result of the last simulation
be it in one memory block, or scattered across components in ring buffers
Nor should you
effects are the results of the state
if the state inidates "I fired my gun", then the effects responds to that state
A trigger pull is not a state
it is an input... it may or may not result in a fire event
the packet may get lost, the gun may be out of ammo, the player may be dead before it fires
the input itself is meaningless
The gun firing is a state
Can you suggest me any source code to read a little bit that does these stuff?
Creating states that can serialize these instant events
No source code I know of, but there are lots of videos and pages on the topic
https://youtu.be/W3aieHjyNvw is pretty close to your current topic. Anything on CounterStrike or Quake as well. and gafferongames.com
Particularly interested in how a character serializes
you serialize the transforms and the animator mainly
For the serializaton stuff you can look at the stuff I am doing for PUN2 with SNS
from where does the information that "a fire effect should start" gets in the state?
https://docs.google.com/document/d/1ySmkOBsL0qJnIk7iN9lbXPlfmYTGkN7JFgKDBdqj9e8/edit#heading=h.np2ejk33mpya Discord link is in that doc
Added a link to the pre-beta to the doc as well
main code of interest there would be in SyncTransform and SyncAnimator @high night
Keep in mind that is NOT server authority code. That is all client to all state transfer
But the serialization of the states are the same as they would be for server auth
from where does the information that "a fire effect should start" gets in the state? When you consume the state that has the flag for "This gun fired"
Or more accurately, when you finish the interpolation of that state
If you want your shots to line up correctly with the shooter
And in the case where you have subframe ticks, when that subdivision tick occurs
public class SceneController : ISerializable
{
public int sceneTime;
public int sceneIndex;
public Scene scene;
public PhysicsScene physicsScene;
public SyncedObject[] syncedObjects;
public SceneController(Scene scene, int sceneIndex){}
public void ApplyInputs(List<InputWrapper> inputs){} // inputs objects in the scene at scene time passed in
public void UpdateScene(float deltaTime){}
public void Serialize(BinaryWriter writer){} // write self into stream
public void Initialize(BinaryReader reader){} // read stream, become that state
}
Control flow in a scene flows trough this class
4 methods control everything, publics are only for read
Initialize and Serialize calls Initialize and serialize on scene objects.
.
SceneController.Initialize creates a state at current "sceneTime" of that scene
public class Character : MonoBehaviour, ISerializable, IExternallyUpdates ,ITakesInput
{
CharacterInput input; // in here trigger holding info is stored for current frame
public float health;
float maxHealth = 100;
public void Initialize(BinaryReader reader) // called from SceneController.Initialize
{
input = new CharacterInput();
input.Initialize(reader);
health = reader.ReadSingle();
}
public void Serialize(BinaryWriter writer) // called from SceneController.Serialize
{
input.Serialize(writer);
writer.Write(health);
}
public void TakeInput(BinaryReader reader) // called from SceneController.ApplyInputs
{
input.Initialize(reader);
}
public void SyncedUpdate(float deltaTime) // called from SceneController.UpdateScene
{
health += 1 * deltaTime * 50;
Vector3 movementVec = input.GetMovementVector();
movementVec.y = movementVec.z;
movementVec.z = 0;
GetComponent<Rigidbody>().velocity = movementVec * 250f * deltaTime;
inputvec = movementVec;
}
}
Not sure what the question is?
You see how state can only store what happens in one frame?
And I try to use 1 state to recreate what happened 5 frames
You will need to create masks/arrays or whatever if you want your frame to represent tick subdivisions
What timing does your gun actually fire on?
CharacterInput.shoot : bool ?
and the gun is likely going to need to be its own serializable thing, unless the gun is a permanent part of the player
think of it as permanent
or in this cast BitArray or something if you are subdividing
How is the actual gun fire initiated though
typically that will be on the tick
or a Fixed or whatever your sim timing is
your state result will contain weapon for for that tick, or some subdivision
you then would deal with that in your interpolation/snapshot code
if all weapons fire on the tick, then just when you hit the end of interpolation (when you pull a new frame, you execute the events in the state of the previous target frame)
snapshot interp involves always having two frames you are interpolating between in Update()
And you consume new ones in Fixed
if all weapons fire on the tick, then just when you hit the end of interpolation (when you pull a new frame, you execute the events in the state of the previous target frame)
@jade glacier
I think what you are saying is essentially what i was saying here:
inputs0, inputs1, inputs2, inputs3, inputs4, state0 tick 0
inputs5, inputs6, inputs7, inputs8, inputs9, state1 tick 1
Except i called "input" to some of the data you call "state"
as long as those aren't just a copy of the player input structs
because those aren't confirmed weapon fire, they are player "requests" to fire
its like a character state, but i call it input
character.firing = true
on client;
client can set character.firing true, can send it to server
on server;
server simulates, character doesn't shoot because out of bullets
sends out state that contains the info that character can't shoot and still tries to shoot (character.shooting = true)
.
I think it will be fine
I would avoid using that term then, because that's going to confuse anyone you are talking to.
Inputs are inputs, states are states
so clients directly set states* in your terminology
If it came out of the simulation... its a state
states i mean
They are just states then. You just have subdivisions
probably a character stores a movement vector where its walking now
you call that state
and its owner client can directly set it
and send to server?
.
What do you exactly call inputs?
The information that client sends server most likely
.
in my case it's
Character.input
which contains
bool shooting;
Vector3 movement;
Vector3 look;
.
and i also have that as a state
these values are used for extrapolation too
That's sounding a bit more like player authority
unless you mean on the server
you can store your state as whatever you are making use of
where is that from? No clue what they are trying to say there
move vector I think they are referring to the asdw inputs
look you generally take from the client at face value, no point trying to treat that as a regular input
and this is the thing i believe will fix my issue
and also believe is pretty much same as your solution
i made this on paint
.
look is where client is facing, moveVector is ASDW
its not actually a vector though
its a get/setter that controls bools
.
@jade glacier
if you remove the text "inputs" from this second picture
i believe it becomes what you were telling me
that bitmask / subdivision stuff
Depends, it might also just be saying it sends the 5 previous inputs
to make it loss resistant
for UDP its standard to send a short history in case a packet got lost
nah not about loss resistancy
inputs are usually pretty tiny, since each input is 1 bit
i mean if this is what server sends at 10 hz
and clients send the blue box at 10 hz
all the information needed will be recieved
.
everybody will be able to reliably recreate what happened every tick (including gunshot effects that you don't serialize)
every 5 frames
if deteminancy doesnt break in 5 frames
even if it brakes, important stuff are included in state
Give it a shot
https://www.youtube.com/watch?v=SGLHaMSFQFU fully deterministic mobile fps built in Photon Quantum (no state sync, only replicating input between players).
you have a special gift fholm, too bad quantum is out of reach for most devs, must be fascinating source code
@weak plinth thanks... do note that i didnt build the FPS, obv i built a substantial part of quantum itself, but FPS done by two colleagues of mine
I wouldn't say Quantum is out of reach of most devs. The monthly pricing is way less than any team would end up paying for a developer to build and maintain their own custom netcode.
It's just out of reach of hobbyists who aren't trying to make an actual product or have any kind of business plan or expectations of actual paying users. It eliminates the need for what most people in the networking channels are doing, which is spending months to years trying to create a working mp game and become proficient at making networking themselves.
@weak plinth you can try quantum one month for free just chat with the photon team, maybe you get access. So you can study the fascinating source code aswell π
I am one of those people, and I only keep doing dev work because I happen to be making some stuff for Exit now as well. But if I make my own game, I will be using Quantum for it if the architecture makes sense.
I think the problem Quantum has is quite simple.
It's a marketing problem. The technology is fascinating and should be presented to a similar extent on youtube and co.
Only gameplay is not enough to see what is going on under the hood.
A good way would be a playable demo were you can simulate the network delay ... that would be fun to watch :)
And cats π
@round yarrow We've purposefully kept it as a premium product, and we're already drowning in requests so π
@jade glacier most of unity base are hobbyists, indie, none AAA, so its would be better for exitgames if this premium asset was in unreal engine where the top dogs are if that's where they going with it
not that easy π
Most of the Unity base if they want to do networking need to learn finances to be honest
must be dreaming the day they will add C#
you can make a hobbyist SP game and stick it on a store and move on. MP games require constant cashflow, as they have constant costs. MP and Hobby don't play well together.
I mean, nothing wrong with building hobbyist net games, just for the point of pride
thats unity's problem for not providing the netcode they need, but the base expect everything out of the box
But the model isn't conducive to zero cash projects in ANY way.
Unity isn't really about hobbyists. They make their engine accessible to hobbyists as a money loser in the hopes that a percentage of those devs come up with a winner and become paying studios.
And they REALLY are banking on the asset store
quantum and unitys netcode solve two different problems tho
also, one being ready and used in production the other... not, well.. different problem
Unity wants networking in the engine so they can check off a box for their IPO imo
doesn't make sense why they do subscription model if that the case
Not because there is some glorious future in making a generic networking component for Unity
ECS once done, can and should make networking problems easier
they are betting hard on dedicated server hosting because it will make them money
But they are trying to solve networking problems on a moving target
which is why its the 1st one they went for
I suspect the only one they could sell as not being a massive waste of time yeah
they own multiplay, multiplay hosting unity games with 1 button click means people will use it and pay for it, etc.
They are going to get lapped (and are being lapped) by independents like Exit
3 (?) so far
The concept of what they are doing is fine on paper IMO
its another engine within an engine
but the whole netcode thing is now tied to DOTS development, so they are stuck in the slow lane while that gets unborked
Meanwhile, you can pay like $1000 a mo or whatever Quantum goes for now and have a working title out before the end of the year.
additional benefit you dont actually need to write any networking code for it to work in multiplayer...
it's not a small benefit
Its massive
build a split-screen game which works online automatically
I have been writing networking code for like 4 years now, and I would still drop it all overnight and use Quantum for any actual products I planned to make for real.
i'm afraid the ecs stuff won't take off.. less then 1% of devs uses it ? they will add shiny new features only with support for it
and just leave the rest of the engine dying like a dog
pretty much what they are doing atm
and you know it won't work
i mean the ECS stuff will probably 'work' in the end
but it's like... they took it one step too far with the performance by default, burst, etc. IMHO
that is why there is a lot of talk among devs about Unity likely having seriously borked itself for a long time to come
in 6-8 years ?
performance in ECS is not good without Burst
And you cant make all code 'burstable'
debugging 'burst' code is horrible, etc.
yes performance in ECS w/o burst is better than MonoBehaviour, sure
but that's not a high bar
And meanwhile all of the low hanging fruit fixes that could be done to make MonoBs better are off the table.
i've stopped looking at examples they put my pc to crawl
i've mostly given up because it's constantly being sold 'as the next big thing that's ready', but whe you go to use it and build stuff
you keep running into "oh this isnt ready", "oh this is broken", "oh this package is incompatbile with this other package", etc.
so I just gave up
if they spent the money on converting to .net standard it would be much better, no need to use dod for everything
I can't even imagine trying to write an networking asset for the store based on any of it
Which means the asset store is going to be fragmented
any ecs assets at all in the store ?
mono/il2cpp need to die, its so much work dealing with them
there are rumors floating around
about them moving to .NET 5
eventually
if any worker left not working on dots stuff
lol
I would not want to be working there
the chaos right now when it comes to feature expectations and promises vs the fractured state of the engine, it must be like more meetings than coding trying to decide on how to proceed with most things?
every package update destroys another package, so its obvious there is chaos
i think this man said it best
@mkaech ECS is fast, but is primarily suited for particle-system-like constructs rather than ordinary gameplay code, in which updates an entity can freely read and write anything in the scene in an atomic, isolated, consistent, and durable way.
yeah lmao I noticed
he is smart as fuck, don't know what they can answer to that
"I make an engine... no one is asking for that shit"
lol
Talking ECS or DOD?
Its some pretty good shade
also FWIW i have built a system which ensure full thread safety without the programmer having to do anything, and every entity having access to all state of every other entity, etc concurrently
using it for my prototype MMO backend
it doesn't require explicit threading via jobs or similar, everything is automatically run in parallel
amazing
That would be a useful part of the engine π
also state it doesn't require crazy packages
this is not for quantum tho
this is for a backend for an MMO im working on privately
sounds it came long way since slimnet days
lol yes
thats almost a decade ago
goal is 20k Players and 512k NPCs in a shared world on one machine
.net core 3.1, server is not in unity
π€―
30hz update rate
a thing like that eliminate spatitalos's business model
so far all tests have worked out
can have 20k simulated players moving around in a full world with their CCD character controllers in ~1.7ms
also simple interactions with NPCs like shooting 'bullets' at them and shit for now
making a game or selling to photon ?
i don't make games, i make tech and sell to people
it uses a custom 'physics' engine i made also, and such
all 100% multi threaded, without any locks, semaphores, etc. and just a few interlocks (5 total interlocks per thread per update)
thats better then wobes network sample with 5k moving players
will be fun to watch videos of tests
saw that thread, seems smart
oh no i mean discord π
must be crazy talks in private
we have a discord server that a lot of networking coders hang in
really there are few people in unity community who are very talented, unity should have drop money on you guys to fix their stuff, even only in a form of c# packages
600k in/out, combined 1.2 million per second
mind boggling
goal is to do 600k in on one core, and 600k out on another core
so reserve 2 cores for the sockets
but not fully decided on all here atm, current work target is the socket layer
@jade glacier I'm sorry to bother you again, but how do you update your ghost scene when a player joins or leaves ?
I have a component I put on objects that should have lightweight copies that ties them to their ghost counterpart
When that "Haunted" component awakes on the object in the main scene, it handles telling the ghost scene to make a lite copy of itself.
And when it gets destroyed tells the ghostworld to destroy its ghost
oh nice
you can look at the code for it in my PUN2 stuff
and then you perform rewinds on your ghost world?
This one currently does nothing, its there for future use. In the past I have used it for server rewinds as well as prediction resims on clients
I came up with a DOTs type solution, but it doesnt handle player player collisions with lag compensation
This is all MonoB and PhysX based
I was afraid a full resim for every fire event, or player-player collision would be computationally expensive
but your solution also allows for simulating slow projectiles into the future
https://docs.google.com/document/d/1ySmkOBsL0qJnIk7iN9lbXPlfmYTGkN7JFgKDBdqj9e8/edit# There is a link to the SNS for PUN2 beta. If you inport that you can just import the GhostWhorld folder in emotitron/utitlities I think and look at all of my junk for it
amazing, thank you so much
For my previous work, server rewind only involved the player shooting, and any players it claimed it hit
and sorry for all of the questions, I'm slowly figuring this out
hopefully I can return the kindness some time
It was a little extra data to have the client send the ID of the person it claimed to hit, but made the server work a lot less since it knew exactly what to rewind
nice
Its very likely those files will have dependencies on my networking, so I doubt they will just work without producing a wall of errors on import.
MIRROR 9 IS LIVE ON THE ASSET STORE
Download: https://assetstore.unity.com/packages/tools/network/mirror-129321
Change Log: https://mirror-networking.com/docs/General/ChangeLog.html