« first day (3245 days earlier)      last day (1760 days later) » 

6:20 AM
What kind of game are you making?
 
 
2 hours later…
7:51 AM
Good morning, any unity experts at hand? (and Arcore)
(Also, no I cannot write specific questions that I have on the mainsite; I don't have specific questions, I'd more like to discuss and further my understanding of the subjectmatter if anyone has some time)
@person27 in general: UDP is faster than TCP, because TCP does need to guarantee packet delivery. That means each sent packet has an overhead to make sure it arrived, or it's resent - IN ORDER. Thus your network traffic will stall (okay for websites, not okay for games with miniscule updates in nanosecond ranges)
 
 
2 hours later…
nwp
9:57 AM
Can't have network latency in nanosecond ranges.
And no, UDP is not magically faster than TCP. Once you reimplement the TCP features that you need anyways then it's likely slower.
Also TCP has an unfair advantage because lot's of routers consider dropping UDP packages fine and dropping TCP packages not fine.
 
 
1 hour later…
11:23 AM
actually that's the whole point. You usually don't want TCP features for gaming network traffic. Or at least not for every packet.

E.g. a general usecase is that the game for each player sends a packet with every action a player takes to the server. The local computer will calculate your own action's result; the server will calculate and verify the actions it received and send them out to everyone. You won't want anything remotely like TCP for this - imagine having a complete signalroundtrip for every single one of these packets(?)
Where you want TCP is somewhere once every 100ms or even once a second (really depends on your game, etc..) where you send out the whole seralized gamestate to all clients so they can update and make up for lost packets
 
Why does Unity hate my vector icons so much? I solved the issue with antialiasing, and now a panel with only 10 icons lags when one of them changes scale (lags increase as number of icons increases)
 
@trollingchar bc they got to be calculated and rendered as rastergraphics every frame(?)
 
but why ALL of them if I change only one?
 
I don't know enough about how unity decides what to render together, but to me it sounds like they are all part of the same texture(atlas) or something
 
Unity's vector graphics are supposed to be rendered as simple triangles, but since it lags as I described, now I'm not sure anymore
 
11:40 AM
so it translates the vectorgraphics into triangles once, then caches that? maybe you trigger a recalculation of all graphics?
 
 
1 hour later…
1:02 PM
lovely
 
1:31 PM
Anyone up for Unity ArCore stuff?
 
@dot_Sp0T Mmhmm, I did lots of research. TCP and UDP seems okay if not being used at the same time as TCP will cause UDP to drop packets due to its increase-decrease latency correction thing. I'm failing or sending redundant packets if correcting every second. Actually I queue per-client so I won't send a message to all clients normally, except in e.g. matchmaking.
 
@person27 interesting
 
2:22 PM
And what about using TCP in cases that does not require speed (user spends skill points between games) and UDP during the game itself?
Players will be surprised if find that their skill points are not assigned after they clicked on them
Or if you avoid TCP, you should write you own mechanism to ensure that certain packets are delivered.
 
nwp
2:37 PM
Which brings us back to reimplementing TCP on top of UDP, so you get TCP just worse. May as well just use TCP.
 
@trollingchar again, these are different use-cases. Although I wouldn't even then really use a mechanism that ensures packet-delivery. I'd rather implement a mechanism that polls the user-state from the server and either A) overwrites local state ; or B) highlights discrepancies and automagically resends the requests to the server
Assuming that the client is the only actor and the server is mostly a data-repository, a simple rule of thumb might be:

Client sends data to server (any actions/interactions) -> UDP
Client requests data from server (gamestate, ...) -> TCP
Regarding the skillpoints example: Naturally this scenario lends itself to the use of TCP connections. It's something that takes time and needs to be correct. Similar goes for monetary transactions.

What you send per UDP is stuff like movement information in the big 3D world, etc
 

« first day (3245 days earlier)      last day (1760 days later) »