Advertisement
Guest User

Untitled

a guest
Jan 16th, 2018
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.19 KB | None | 0 0
  1.  
  2. derrick - Today at 12:02 AM
  3. I may have asked it wrong... I am used to there being a main as I do simple game programming... Being able to iterate time or have the main check your object or list versus some time that should happen in the future
  4. What is the equivalent of main within ACE
  5. I am at the point of applying spell effects to targets and trying to get them to expire properly
  6.  
  7. OptimShi - Today at 12:04 AM
  8. ¯\_(ツ)_/¯
  9. ElonMad1
  10. ElonWink1
  11.  
  12. derrick - Today at 12:04 AM
  13. lol
  14. will do some digging into the code
  15.  
  16. Rawaho - Today at 12:06 AM
  17. Every world object has an update method with the last server tick, you want to decrement the tick from the remaining time of the spell effect every update
  18. ACE1
  19.  
  20. derrick - Today at 12:06 AM
  21. Thanks Rawaho, I will look into that!
  22.  
  23. floater - Today at 1:37 AM
  24. no idea how ACE code is laid out but typically better to set an expiration time, rather than constantly decrementing a value
  25. if (GetCurrentTime() >= _expirationTime)
  26.  
  27. Ripley - Today at 1:38 AM
  28. i went that route for the generator queue
  29.  
  30. floater - Today at 1:38 AM
  31. the "time" value is a real thing too, a double value, shared with the client
  32. the same one that controls the seasons
  33. err
  34. time of day rather
  35. lil things may not seem like much but can add up i assume
  36. if (GetCurrentTime() >= (_startTime + interval)) is obviously slower than just doing a one time _endTime = _startTime + interval; if (GetCurrentTime() >= _endTime)
  37. but if that level of granularity matters the project has bigger issues haha
  38. i just generally do things that way just because
  39. sometimes i dont when there are scenarios that the interval might be dynamic
  40.  
  41. Rawaho - Today at 1:41 AM
  42. Decermenting a value is ALOT quicker then constantly querying the server time
  43.  
  44. Ripley - Today at 1:41 AM
  45. there's likely an issue with the main loop tbh, going through an spawning a town full of generators can cause the client to be "frozen"
  46.  
  47. Rawaho - Today at 1:41 AM
  48. DateTime.Now isn't quick
  49.  
  50. floater - Today at 1:41 AM
  51. the server time is a double value stored in memory
  52. not a system pull of the time
  53.  
  54. Rawaho - Today at 1:42 AM
  55. ACE doesn't use that value for updates
  56. But it could be changed to do so
  57.  
  58. floater - Today at 1:42 AM
  59. any game should always have some sort of floating point time variable
  60.  
  61. Rawaho - Today at 1:42 AM
  62. That is what the server tick is
  63.  
  64. floater - Today at 1:42 AM
  65. if ACE doesnt have one it should get one
  66. not just a delta, an actual time value
  67.  
  68. Rawaho - Today at 1:43 AM
  69. It's not really needed if you have the last tick
  70.  
  71. floater - Today at 1:43 AM
  72. the time can be pulled once per tick, generally speaking at least, and the value stored as a floating point
  73.  
  74. Rawaho - Today at 1:44 AM
  75. ACE pulls the current time at the start of a world update and calculates the delta, the actual time value is discarded at that point
  76.  
  77. floater - Today at 1:45 AM
  78. it kind of is needed... sort of silly to explain why, but try finding a game code that doesnt reference a global game time variable, it doesn't exist
  79. there are even parts of the AC code that are designed specifically to triggers at certain times
  80. delta wont give you that
  81. furthermore
  82. weenies store time variables
  83. not deltas
  84.  
  85. Rawaho - Today at 1:46 AM
  86. Well if you need an event to trigger at a certain time you just calculate the time till that event and still just decrement from the delta
  87. In such case the calculation only needs to be done once(edited)
  88.  
  89. floater - Today at 1:46 AM
  90. so if you have a million objects all decrementing memory every tick you dont think thats bad?
  91. when its unnecessary?
  92.  
  93. Rawaho - Today at 1:46 AM
  94. It's not
  95.  
  96. floater - Today at 1:46 AM
  97. it is...
  98.  
  99. Rawaho - Today at 1:47 AM
  100. At most a single server tick will only have a few hundred objects to update
  101. Not millions
  102.  
  103. floater - Today at 1:47 AM
  104. this is a silly conversation
  105. i hope you know that
  106.  
  107. Rawaho - Today at 1:48 AM
  108. I know how game server performance works, I am not exactly a novice in the area
  109.  
  110. floater - Today at 1:48 AM
  111. cool, make something better than PhatAC
  112. physics took me two weeks
  113. have fun
  114. ill wait
  115.  
  116. Rawaho - Today at 1:48 AM
  117. lol
  118. I work on game servers that handle 40K plus players
  119.  
  120. floater - Today at 1:49 AM
  121. and?
  122.  
  123. Rawaho - Today at 1:49 AM
  124. My point is I understand how you need to optimise
  125. I have physics on my private ACE fork ))
  126. I have for 8+ months(edited)
  127.  
  128. floater - Today at 1:49 AM
  129. no, you don't
  130.  
  131. Rawaho - Today at 1:50 AM
  132. The Physics in AC isn't overly complicated, you aren't the only one to have implemented
  133.  
  134. floater - Today at 1:50 AM
  135. my guess is you RE'd some of it
  136. just like you made cachePwn as if looking at a few functions in phatAC in IDA is a big deal(edited)
  137. then anonymously post reddit asking me to "comment"
  138. your ego needs a check
  139.  
  140. Rawaho - Today at 1:51 AM
  141. LOL
  142. I know who that person is
  143. It's not me
  144.  
  145. Ripley - Today at 1:51 AM
  146. i'd agree with that tbh
  147.  
  148. floater - Today at 1:52 AM
  149. the purpose of obfuscating cache.bin actually wasn't to stop someone from doing it, or i would have virtualized the code
  150. it was to slow anyone down initially and/or prevent ACE from reversing it
  151. because it took me less than 10 minutes to obfuscate things
  152.  
  153. Ripley - Today at 1:52 AM
  154. :cry:
  155. but we wanna play with the pretty data too..
  156.  
  157. floater - Today at 1:53 AM
  158. there's the comment you wanted
  159. you spent hours to reverse something that took me 10 minutes
  160. glad your time is less valuable than mine
  161.  
  162. Rawaho - Today at 1:53 AM
  163. I only worked on CachePwn because someone told me ACE already had it and I didn't want to be left out
  164. I did take a few hours
  165. Maybe 5 or 6
  166. Was a slow work day :stuck_out_tongue:
  167.  
  168. floater - Today at 1:53 AM
  169. also, the largest contents of cache.bin is mostly public
  170. voluntarily released
  171.  
  172. Rawaho - Today at 1:54 AM
  173. Eh, I had fun working on it regardless
  174.  
  175. floater - Today at 1:54 AM
  176. to a handful
  177. good, we all should have fun
  178. i dont taunt your projects though
  179. so don't be an idiot
  180. and act like you are hotshit
  181. you are a nerd
  182. i am a nerd
  183. we are here to enjoy this
  184. not to outnerd each other
  185. damn this is #development my bad
  186.  
  187. Rawaho - Today at 1:56 AM
  188. I never said I was trying to out do someone
  189. If anything it's you that is thinks that you are the only one with the skills to RE the physics
  190.  
  191. floater - Today at 1:56 AM
  192. checksum RE'd physics first
  193.  
  194. Rawaho - Today at 1:56 AM
  195. I couldn't care who did it first, I only mentioned I had done it and you shot me down
  196.  
  197. floater - Today at 1:57 AM
  198. then show your work
  199. i dont doubt you reversed some of physics
  200. and that said, you would know, physics entails more than just collisions
  201. its animations, and everything else tied in
  202.  
  203. Rawaho - Today at 2:00 AM
  204. There are actually people that have access to my work, I don't have any plans to release it publicly at this point
  205. I don't really have anything to prove, I only work on AC emulation because it's something I enjoy(edited)
  206. 💅1
  207.  
  208. Ripley - Today at 2:01 AM
  209. :raised_hand: can i take a peek? :stuck_out_tongue:
  210.  
  211. Rawaho - Today at 2:02 AM
  212. I never even played AC, I only found the game through Reddit when I decided to work on an emulator
  213. HellsW̶r̶a̶t̶h̶ - Today at 2:02 AM
  214. There's a community of people looking for something stable and extensible :wink:
  215. The game means something totally different for you than it does for us. It's a lifetime passion for most here. I spent 17 years of my 28 in this game. ISO working server :ok_hand:
  216. 👌2
  217.  
  218. ChosenOne - Today at 2:04 AM
  219. Can’t believe I’m gonna agree with Hells on something...
  220. :nauseated_face:
  221. HellsW̶r̶a̶t̶h̶ - Today at 2:04 AM
  222. we broke it. reality is dead.
  223.  
  224. floater - Today at 2:04 AM
  225. just a little tip for anyone who might be trying to emulate physics
  226. Morosity (Spazmodica) - Today at 2:04 AM
  227. hey, i applaud anyone that has working physics for AC. that takes effort, brains, and a lot of creativity.
  228.  
  229. floater - Today at 2:04 AM
  230. ive mentioned this privately to a few people
  231. consider this to be a goal, it will allow you to focus on the steps necessary to really have physics: the goal should be to be able to spawn a monster, tell it to move somewhere (move to position, move to object commands), and have the server know exactly where the monster is in sync with where the client thinks it is
  232. if you focus on stuff like the player itself, you're missing important things like that the animations themselves need to be part of physics implementation
  233. Morosity (Spazmodica) - Today at 2:05 AM
  234. baby steps. :smiley:
  235.  
  236. floater - Today at 2:06 AM
  237. so dont worry about players, worry about monsters
  238. once you can do monsters
  239. players are already done o.o
  240. players are just autonomous monsters
  241.  
  242. Ripley - Today at 2:06 AM
  243. or vendors even..
  244. its all derived from the same weenietype
  245.  
  246. floater - Today at 2:07 AM
  247. one problem with focusing on players is that, sure, you may be checking collisions to verify client movement i suppose, but ultimately, you are still relying on updates from the client
  248. Morosity (Spazmodica) - Today at 2:07 AM
  249. holy cow, im yellow now. just noticed
  250. ACE2
  251.  
  252. Ripley - Today at 2:07 AM
  253. congrats :smiley:
  254.  
  255. ChosenOne - Today at 2:08 AM
  256. It’s 2018 bro, we don’t look at each other by color.
  257. 😜1
  258.  
  259. floater - Today at 2:21 AM
  260. we look at each other by the content of our emulators?
  261. 😂2
  262.  
  263. Ripley - Today at 2:23 AM
  264. oh look.. another failed test.. :rolling_eyes:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement