Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2011
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 17.44 KB | None | 0 0
  1. [9:42:20 AM] ViperMaul: By the way Jaynus, you have been doing some outstanding work on Arma Performance programming. Do you do any ongoing time syncing in JayArma2 pbo where I can learn your advanced methods?
  2.  
  3. Or for other topics any successful JIP syncing of anything where you think your methods could be a great example for the community to follow?
  4. [9:42:46 AM] jaynus: Hrm.
  5. [9:43:00 AM] jaynus: Jayarma2lib is capable of getting actual system time, which technically is more accurate for time syncing for in-game things but
  6. [9:43:08 AM] jaynus: diag_ticktime extrapolation is just as accurate - just more difficult
  7. [9:43:13 AM] jaynus: uhmm
  8. [9:43:45 AM] jaynus: as far as JIP syncing goes, thats all been ACRE-intensive as far as fixing sync-bugs for the two major CITs I have right now:
  9. 1. JIPs at a distance dont exist to other players
  10. 2. JIPs randomly do not get proper variable syncs
  11. [9:44:19 AM] jaynus: JIPs at a distance we fixed via propigating the objects manually via CBA events (e.g. all players send their own player object every 10 seconds or so, and everyone else adds them to a manual player list we mantain, and we dont use allUnits/playableUnits)
  12. [9:44:27 AM] jaynus: JIPs randomly not syncing we fixed by persistant setVariable updates.
  13. [9:44:43 AM] jaynus: E.g. for anything we do a setVariable on, we actually cache that locally on the client, and it gets "re-set" every 30 seconds
  14. [9:45:01 AM] jaynus: e.g. every 30 seconds, each client automatically calls player setVariable ["foo", 12345, true]
  15. [9:45:07 AM] jaynus: so as to make sure it re-propigates to JIPs
  16. [9:45:55 AM] ViperMaul:  and we dont use allUnits/playableUnitsInteresting.
  17. [9:46:08 AM] ViperMaul: No trust in those two?
  18. [9:46:35 AM] jaynus: They are verified broken
  19. [9:46:40 AM] jaynus: major ones are two scenarios:
  20. [9:46:53 AM] jaynus: 1. the "Domi bug", which is that if you dynamically assign groups for units, they do not appear in allUnits/playableUnits
  21. [9:47:08 AM] jaynus: 2. The JIP at a distance. If you JIP at > 7KM away from another player, you do not appear in the lists
  22. [9:47:30 AM] jaynus: actually #2 let me rephrase
  23. [9:47:32 AM] jaynus: if *YOU* jip
  24. [9:47:44 AM | Edited 9:47:50 AM] jaynus: you do not appear in the *other* players lists, until you come to within < 7KM of them
  25. [9:47:57 AM] jaynus: Both of those we solved using our own playerLIst
  26. [9:48:09 AM] jaynus: which is basically all players, every 10 seconds, do a CBA_fnc_globalEvent; sending their player object
  27. [9:48:19 AM] jaynus: which then we use a acre_sys_core_playerList global object to track (our own version of playableUnits basically)
  28. [9:49:27 AM] ViperMaul: This makes sense actually. BIS must be using a trigger that only covers 7KM.
  29. I onced used a trigger that dynamically covered the size of any island. At least I think I did.  I am guessing this is how you did it with your own PlayerLIst
  30. [9:49:49 AM] jaynus: naw our playerlist is literally an XEH_post_init spawn
  31. [9:49:51 AM] jaynus: that is just
  32. [9:50:50 AM] jaynus: [] spawn {
  33.     while { true } do {
  34.          if(alive player) then {
  35.  
  36.                ["acre_syncPlayer", [player]] call CBA_fnc_globalEvent;
  37.          };
  38.          sleep 10;
  39.      };
  40.  
  41. }
  42. [9:51:13 AM] jaynus: Then all other clients receive the event, and manage their own local player list
  43. [9:52:15 AM] jaynus: Oh. and we decided on just persistant 10-second messages instead of on-demand cause then JIPs in high-count scenarios would desync the server
  44. [9:52:33 AM] jaynus: cause then youd have someone jip, send a "requestAllPlayers" event, and then the network would get spammed with like 70 CBA events on every JIP
  45. [9:52:52 AM] jaynus: So we opted for a delay-based system instead, where we can garuntee a JIP has gottan all player objects after 15 seconds in game
  46. [9:53:23 AM] jaynus: All of that is still not as bad as the setVariable issues with JIPs though :/
  47. [9:53:31 AM] jaynus: You can have players in your player list that still dont propigate their variables to JIPs
  48. [9:53:39 AM] jaynus: hence why we also had to do a bunch of persistant setVariables for random shit
  49. [9:53:49 AM] jaynus: cause literally just randomly, in the A2 engine, the setVariable just "wont" propigate to a JIP
  50. [9:54:17 AM] ViperMaul: To reduce net traffic, Have you experimented with this from XENO
  51. http://dev-heaven.net/docs/cba/files/network/fnc_setVarNet-sqf.html
  52. [9:54:22 AM] jaynus: yah
  53. [9:54:28 AM | Edited 9:54:33 AM] jaynus: thats what broke ACRE 1.3 / 1.3.1
  54. [9:54:40 AM] jaynus: because of...
  55. [9:54:45 AM] jaynus: [9:54 AM] jaynus:
  56.  
  57. <<< cause literally just randomly, in the A2 engine, the setVariable just "wont" propigate to a JIP
  58. [9:54:51 AM] jaynus: So for example, inside acre, we do
  59. [9:55:05 AM] jaynus: player setVariable ["acre_sys_core_ts3id", 12345, true];
  60. [9:55:22 AM] jaynus: when we switched it to [player, "acre_sys_core_Ts3id", 12345] call CBA_fnc_setVarNet;
  61. [9:55:24 AM | Edited 9:55:27 AM] jaynus: it broke
  62. [9:55:40 AM] jaynus: Because in all the scenarios that object variables didnt propigate for JIPs correctly, setVarNet never resent it
  63. [9:55:43 AM] jaynus: so JIPs are basically fucked
  64. [9:55:59 AM] jaynus: which made us move back to enforced setvariable[true,true] calls
  65. [9:56:03 AM] jaynus: forcing network propigation every single call
  66. [9:56:14 AM] jaynus: General symptom being:
  67. [9:56:20 AM] jaynus: If you have JIPs, setVarNet is fucked and dont touch it
  68. [9:57:02 AM] ViperMaul: Hmm...
  69. [9:57:10 AM] jaynus: Basically what setVarNet does is
  70. [9:57:22 AM] ViperMaul: It makes me wonder how long a JIP remains classified as a JIP player.
  71. [9:57:25 AM] ViperMaul: You know what I mean?
  72. [9:57:36 AM] jaynus: it checks *locally on your client* if you've already set that variable on the object. if the variables dont match, it propigates it again (setvariable true true) otherwise, it doesnt.
  73. [9:57:47 AM] jaynus: Well, A2 doenst do persistant updating so what you run into is.
  74. [9:57:47 AM] ViperMaul: a JIP player is only a JIP player for the first X seconds right?
  75. [9:58:02 AM] jaynus: 1. Player A is already in game, does setVariable "foo" on themselves
  76. [9:58:11 AM] jaynus: 2. Player B JIPs, and because of random A2 bug, does not propigate the "foo" variable for A
  77. [9:58:26 AM] jaynus: 3. Player A calls "setVarNet" again on "foo", but never does a netowrk propigation because player A sees the variable as already set
  78. [9:58:42 AM] jaynus: End result: PLayer B never gets the variable "foo" because it didnt sync correctly, and A never re-sent it after B joined
  79. [9:59:00 AM] jaynus: Basically a JIP player is a player that JIPed
  80. [9:59:03 AM] jaynus: theres no "sync time on it"
  81. [9:59:13 AM] jaynus: Theres so many bugs surrounded JIPing, that you need to consider a JIP player throughout *everything*
  82. [9:59:32 AM] jaynus: basically, *ALL* actions that were performed prior to a player JIPing, need to be considered to resync on the JIP
  83. [9:59:51 AM] jaynus: Prime examples: building destruction, variable syncing, distant objects disappearing, etc
  84. [10:00:28 AM | Edited 10:00:39 AM] ViperMaul: Can we put in a hack for the "setVarNet" that check for new JIPers and if new then send one normal setVar [true,true]?
  85. [10:00:42 AM] jaynus: Your doubling net traffic for that basically
  86. [10:00:55 AM] jaynus: Because then you'll need to send "Yo player b, did you already get X value for player A?"
  87. [10:01:02 AM] jaynus: "yo player A, NOPE, send it"
  88. [10:01:03 AM] ViperMaul: But you are doing it any way by using setVar[true,true] every 10sec right?
  89. [10:01:13 AM] jaynus: correct
  90. [10:01:14 AM] jaynus: so instead of the above
  91. [10:01:17 AM] jaynus: its just
  92. [10:01:22 AM] jaynus: "PLAYER A SETTING VARIABLE AGAIN K THX"
  93. [10:01:22 AM] jaynus: every 10 seconds
  94. [10:03:06 AM] jaynus: That all make sense?
  95. [10:03:16 AM] jaynus: Basically once your needing to "verify" a sync, its pointless
  96. [10:03:20 AM] jaynus: may as well just force a resync
  97. [10:03:45 AM] jaynus: Then you have the issue of the fact you cant identify a JIP really from remote clients, only the local client knows hes a JIP
  98. [10:03:59 AM] jaynus: so the JIP needs to send "HI IM A JIP"
  99. [10:04:03 AM] jaynus: then you get a massive sync flood
  100. [10:04:13 AM] jaynus: (already exhibitied in red/yellow chains on JIP > 30 players)
  101. [10:04:41 AM] ViperMaul: Exactly, I just read your last msg after typing the following....
  102.  
  103. Is there any way to find the best of both worlds?
  104. Where the Sync module uses setVarNet method to reduce traffic but when there is a JIP player detected then pulse one reg setVar [True,True] then go back to the net traffic saving methods of setVarNet until another JIP comes in?
  105. [10:05:37 AM] ViperMaul: But there is a way for detecting the new player with adding a broadcast of the "Hi IM A JIP" right?
  106. [10:05:54 AM] ViperMaul: You said you solved that problem with XEH
  107. [10:06:07 AM] jaynus: Yah, but just with a persistant sending of variables
  108. [10:06:21 AM] jaynus: Which overall increases bandwidth usage, but overall *decreases* desync
  109. [10:06:35 AM] jaynus: Because we are distributing object syncing across a 10 second - 2 minute wiindow
  110. [10:06:44 AM] jaynus: Rather than a "ON JIP, FUCKING FLOOD BITCHES!"
  111. [10:07:01 AM | Edited 10:07:08 AM] ViperMaul: Well that is what we want most in the end anyway.
  112. LESS DeSYNC
  113. [10:07:19 AM] ViperMaul: Cool
  114. [10:08:16 AM] ViperMaul: I am working for Dslyecxi and ShackTac doing research for how to add weather sync function for JIPers as well as existing players.
  115. [10:09:02 AM] ViperMaul: And I don't want my inexperience to cause problems. Plus you know how Dslyecxi is with allowing new features to desync our ST Sessions. :)
  116. [10:09:25 AM] ViperMaul: So I figure I research the best minds in Arma that I know.
  117. [10:09:57 AM] ViperMaul: My first thoughts where You and Nou, and Xeno.
  118. [10:10:42 AM] ViperMaul: So your methods here should work well with Weather Sync right? Any thoughts or caveats you can think of that I should be concerned with?
  119. [10:11:14 AM] jaynus: afaik nou already wrote weather sync into ACE tho
  120. [10:11:17 AM] jaynus: may want to check with him on that
  121. [10:11:35 AM] jaynus: But yah, its the (generally, in our experience) 100% best possible way to handle JIP syncing
  122. [10:11:41 AM] jaynus: since it distributes it and spreads it out, so shit doesnt fall over
  123. [10:12:15 AM] jaynus: anyways afk gotta bolt for a meeting
  124. [10:12:28 AM] ViperMaul: Thanks for your VALUABLE TIME jaynus!!
  125.  
  126.                                     ***
  127.  
  128. [2:43:32 PM] jaynus: Back by the way if you had more questions heh
  129. [2:43:57 PM] ViperMaul: welcome back
  130. [2:44:30 PM] ViperMaul: Let me think while I finish this late lunch on the stove.
  131. [2:44:41 PM] ViperMaul: SB says Nou did a ACE Wind Sync.
  132. [2:46:00 PM] ViperMaul: GlobalEvent is probably just another method of working with addPublicEventHandler if I dig in the CBA code right?
  133. [2:46:17 PM] jaynus: Yah correctly, its pub event handlers for all the events
  134. [2:46:33 PM] jaynus: think of it as just an event system like any other language. cept it works, and thankfully suffers from no other engine bugs
  135. [2:48:37 PM] ViperMaul: old methods used SVIs. Are SVIs considered evil now and we should seek them out in our old code and destroy them?
  136. [2:48:54 PM] jaynus: correct, SVI's are a big big no no because they propigate all changes on JIP
  137. [2:49:01 PM] jaynus: so if you do 3 SVI's, those 3 different SVI instances sync on JIP
  138. [2:49:21 PM] jaynus: well lemme rephrase that
  139. [2:49:33 PM] jaynus: If you do 3 SVI's during the course of a game, then someone JIPs, that person gets all three SVI's in order
  140. [2:49:47 PM | Edited 2:50:03 PM] jaynus: while PVEH is just "during the course of being in the game you receive current changes"
  141. [2:50:47 PM] jaynus: Hope that makes sense. its basically just dont touch SVI
  142. [2:51:37 PM] ViperMaul: oh yes it makes sense
  143. [2:52:16 PM] ViperMaul: and that one command never works removeVI
  144. [2:52:31 PM] ViperMaul: at least I have never seen evidence that it works.
  145. [2:52:49 PM] jaynus: Nah, never seen it work and really overcomplicates it from a usage perspective
  146. [2:53:21 PM] jaynus: Cause you either wanna run things:
  147. 1. on init (XEH pre/post or mission init)
  148. 2. on events in game (XEH handlers, addEventHandler)
  149. 3. on scripted events (globalEvent/remoteEvent/localEvent)
  150. [2:53:38 PM] jaynus: oh, or
  151. 4. whenever the fuck you want (script loops)
  152. [2:54:00 PM] ViperMaul: Actually it is called clearVehicleInit
  153. [2:54:29 PM] jaynus: afaik it suffers from extreme locality issues
  154. [2:54:37 PM] jaynus: cause of driver ownership of vehicles and all that fun jazz
  155. [2:55:39 PM] jaynus: but really, from as far as I can tell, the only modern (lulz) reasons to use SVI is either for inits (replaces by XEH inits and mission init lines) or for cheating (broken in latest server versions)
  156. [2:55:58 PM] jaynus: e.g. cause all replaced by either CBA XEH, mission init crap, or some other custom init handling
  157. [2:57:22 PM] ViperMaul: The only reason why I wanted to use it was to run code on the server. For example, back in the old days if I wanted spawn an empty vehicle on the server so that it is synced to all players.
  158. [2:57:50 PM] ViperMaul: That was 3 years ago.
  159. [2:58:49 PM] jaynus: Yah now you'd want to have 2 portions of code, one on server one on client, server is a CBA_fnc_addEventHandler; and the client sends a CBA_fnc_globalEvent calling the event
  160. [2:59:02 PM] jaynus: assuming you are willing to use CBA; can accomplish what it does with PVEH
  161. [2:59:28 PM] ViperMaul: I heard you can just spawn it on your client and do a setPosASL getPosASL on the object and it will sync for all nodes.
  162. [2:59:45 PM] jaynus: shrug, maybe you can, I wouldnt trust it tho
  163. [3:00:04 PM] jaynus: Cause your client doesnt *actually* own a vehicle unless your a driver (example for vehicle anyways)
  164. [3:00:10 PM] jaynus: or your client doesnt own AI unless they are in your group
  165. [3:00:12 PM] ViperMaul: ACE uses it for bullets
  166. [3:00:24 PM] ViperMaul: I cannot remember the total context though
  167. [3:00:28 PM] jaynus: Ah yah
  168. [3:00:35 PM] jaynus: that was the grenade/grenade launcher problem
  169. [3:00:39 PM] ViperMaul: yeah!
  170. [3:00:43 PM] ViperMaul: That was it.
  171. [3:00:46 PM] jaynus: with off-sync landings for HEDP/smoke rounds
  172. [3:00:59 PM] jaynus: that was cause projectiles behave different
  173. [3:00:59 PM] ViperMaul: that was a funny site to see
  174. [3:01:02 PM] jaynus: They are local for all clients regardless
  175. [3:01:08 PM] jaynus: e.g. when you shoot
  176. [3:01:16 PM] jaynus: all clients actually spawn a different object (local only)
  177. [3:01:35 PM] jaynus: with vector data and (configs obviously), which then means it has a deterministic end state
  178. [3:01:36 PM] jaynus: heh
  179. [3:02:19 PM] ViperMaul: ah that triggered a thought. I hope Arma3 AI are more realistic and less superhuman about seeing you and shooting you through forests and trees.  But I digress.
  180. [3:03:10 PM] jaynus: Yah im excited about that cause physx should cover all that
  181. [3:03:21 PM] jaynus: as long as they basically turn on the feature, it automagically does LOS and shit for complex terrian
  182. [3:04:32 PM] ViperMaul: very cool
  183. [3:06:14 PM] ViperMaul: Have you ever tried to measure how much net traffic is cause by using 10 second setVar verses at 1 second and tried to extrapolate for the number of players on a server?
  184. [3:07:05 PM] ViperMaul: If you know what I mean.
  185. I tried once but I either don't have enough debug info or I don't have enough skills to do so.
  186. [3:08:47 PM] jaynus: ugh a long long *LONG* time ago
  187. [3:08:49 PM] jaynus: Rommell actually
  188. [3:08:55 PM] jaynus: ran a bunch of benchmarks on massive setvariable stuff
  189. [3:09:04 PM] ViperMaul: Ha! it would be Rommell. I miss that guy.
  190. [3:09:07 PM] jaynus: turned into something like 10,000 setvariables over 10 clients a second before we desynced
  191. [3:09:16 PM] jaynus: some insane number like that
  192. [3:09:28 PM] jaynus: Either way its one of those things that either way, its on-demand
  193. [3:09:30 PM] jaynus: so you hvae 100% control of it
  194. [3:09:35 PM] jaynus: so if it breaks things - you fucked something up
  195. [3:11:32 PM] ViperMaul: So with respect to Desync, there should be less worry about creating too much net traffic through setVar Publics which are probably just another version of PubVars and more worry about something esle, whatever that may be. I am at loss to what to call it currently... right?
  196. [3:12:12 PM] jaynus: Yah with desync, usually your #1 issue is going to be server-side script performance and number of objects
  197. [3:12:41 PM] ViperMaul: And something to do with how JIP is handled as well?
  198. [3:13:05 PM] jaynus: that all ties into object numbers really, thats where your desync will happen there
  199. [3:13:22 PM] jaynus: So like at 50+ players, you'll get JIP desync regardless, its unavoidable
  200. [3:13:29 PM | Edited 3:13:34 PM] jaynus: even with *just* 50 players, no objects, no AI, you desync
  201. [3:13:47 PM] jaynus: (Which is really because your running into a n ^ x sync issue)
  202. [3:14:49 PM] ViperMaul: can that be improve with improvements in the net code by BIS if they worked at it?
  203. [3:19:16 PM] jaynus: Yah I've got a few CIT's about it, and been using a few of the channels to try to filter things through to suma/fireball about it
  204. [3:22:22 PM] ViperMaul: aye
  205. [3:22:40 PM] jaynus: Right now seems a lot of it though we are still on the "fix whats broken phase"
  206. [3:22:46 PM] jaynus: before they can get to the "optimize whats there"
  207. [3:22:46 PM] jaynus: heh
  208. [3:23:19 PM] ViperMaul: heh
  209. [3:24:11 PM] ViperMaul: and yet new features are what sells the next offering of games. Its hard to get them to give wholesale focus on fix what is broken.
  210. [3:25:32 PM] ViperMaul: I wish they would add timestamps to the client side log so it makes it easy to match them up with server side logs so we can troubleshoot better.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement