Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.66 KB | None | 0 0
  1.  
  2.  
  3. ////////////////////////////////////////////////////////////
  4. /// Network Traffic
  5. ///////////////////////////////////////////////////////////
  6.  
  7.  
  8. /// x 2500 Network Socket Connections data / event
  9. ////////////////////////////////////////////////[W,A,S,D,1,2,3,45]///////////////////////////
  10. /// UDP << - keystrokes input [0,1,1,0,0,1,0,45]
  11. /// UDP >> - player state [alive/health/x/y/facing]
  12. /////////////////////////////////////////////////////////////////////////////////////////////
  13. /// UDP >> - nearby bullets [bullet,x,y,s][acid,x,y,s][bullet,x,y,s]
  14. /// UDP >> - boss data [id,x,y,rot,s,threat,enrage,target]
  15. /// UDP >> - nearby enemies [id,x,y,rot,s]
  16. /// UDP >> - nearby party [id,x,y,rot,s]
  17. ////////////////////////////////////////////////////////////////////////////////////////////
  18. /// TCP >> - party broadcast [SHARE]receive,rep,exp,buff,gold
  19. /// TCP >> - drops notifier [DROP]lootmode,id,class,item
  20. /// TCP << - you roll [ROLL]item
  21. /// TCP >> - server reply RNG roll [LOOT]won, item, exp
  22. ////////////////////////////////////////////////////////////////////////////////////////////
  23. /// TCP >> - drops notifier [DROP]loot,chest,mine,water,etc
  24. /// TCP << - solo farm/mining [ROLL]item
  25. /// TCP >> - auto win the item [LOOT]won, item, exp
  26. ////////////////////////////////////////////////////////////////////////////////////////////
  27. /// TCP >> - open trade [TRADE]id, init
  28. /// TCP >> - offer / offer [TRADE]id, propose
  29. /// TCP << - accept the trade [TRADE]id, accept
  30. ////////////////////////////////////////////////////////////////////////////////////////////
  31. /// TCP >> - party invitation [INVITE]partyid, guild, person
  32. /// TCP >> - whisper direct [WHISPER]message
  33. /// TCP >> - talking in channel [PARTY]message
  34. /// TCP >> - someone said [GUILD]message
  35. ////////////////////////////////////////////////////////////////////////////////////////////
  36. /// TCP >> - zone chat (filtered) [CHAT]public,city, message
  37. ////////////////////////////////////////////////////////////////////////////////////////////
  38. /// TCP << - set away/back/busy [STATUS]away/back/busy
  39. /// TCP << - server block list [BLOCK]person true/false
  40. /// TCP << - server friends list [FRIEND]person true/false
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47. ////////////////////////////////////////////////////////////
  48. /// Database Setup ?
  49. ///////////////////////////////////////////////////////////
  50.  
  51. /// SQL SB QUEUE - TradeEvents
  52. //////////////////////////////////////////////////////////////////////////////////////
  53. /// - super fast writes
  54. /// - A journal of events, playerid, itemid, bossid, groupid
  55. /// - For recovering the most recent significant events
  56. /// - Older backups of player state, auction state,
  57. ///
  58. /// - items have been received or traded
  59. /// - group/guild/raid achievements occurred
  60. /// - player data can be saved
  61.  
  62. /// Order of priority for this queue
  63. /////////////////////////////////////////////////////////////////////////////////////////
  64. /// 1 ) Events like [LOOT] - raid id, item id, player id
  65. /// 2 ) Completed [TRADE] - playerid, item id, accept
  66. /// 3 ) Events where[SHARE] - raid id, exp amt, rep, gold, etc
  67. /// 4 ) Events [DROP] or [ROLL] - raid id, item id, player id
  68. ///
  69. /// 5 ) RaidLock members - raid could continue, or delegate the item
  70. /// 6 ) Snapshot of dungeon._entities - 3/4 mini dragons dead, raid id, leader id
  71. /// 7 ) Snapshot of dungeon._entities - players alive/health/xp/level/reputation
  72. ///
  73. /// 8 ) Snapshot of world players - those not captured from the raid data
  74. /// 9 ) Snapshot of world entities - the rest of the entities where they last were
  75. ///
  76. /// 10} Player inventory, currency, equipmeny
  77. /// 11) Auction house and pricehistory snapshot - essentially trades that never happened
  78.  
  79. /// Sql Tables
  80. /////////////////////////////////////////////////////////////////////////////////////////
  81. /// SQL TABLE TradeEvents
  82. /// - the superfast queue above
  83. /// - logs get written here
  84. /// - server game state continues running the world
  85. /// - archive snapshots off into their tables every hour/minute/etc
  86. ///
  87. /// SQL TABLE WorldEntitiesLog
  88. /// - the longer term backup
  89. /// - time, zoneid, entitydata
  90. ///
  91. /// SQL TABLE RaidEntitiesLog
  92. /// - the longer term backup
  93. /// - time, raidid, entitydata
  94. ///
  95. /// SQL TABLE TradesLog - the longer term backup
  96. /// - time, items, playerid, player2id
  97. ///
  98. /// SQL TABLE CharStats
  99. /// - player exp, level and reputation
  100. ///
  101. /// SQL TABLE CharEquip
  102. /// - playerid legs, head, weapon
  103. /// - itemid,
  104. ///
  105. /// SQL TABLE CharInventory
  106. /// - playerid slot1, slot2, slot3
  107. /// - itemid, qty
  108. ///
  109. /// SQL TABLE CharCurrency
  110. /// - playerid gold, silver, bronze
  111. /// - type, qty
  112. ///
  113. /// SQL TBL UserList
  114. /// - login,fetch their character data, stats, gearid, playerXY
  115. /// - logout, save their data, stats, gearid, playerXY
  116. /// - register, create character, and starting stats
  117. /// - forgot password
  118. ///
  119. /// SQL TBL RaidLocks
  120. /// - playerid
  121. /// - raidid
  122. /// - raidgroups id, id, time
  123. ///
  124. /// SQL TBL RelationalGroups
  125. /// - playerid
  126. /// - guildid
  127. /// - members id, id, time
  128. /// - type (eg guild, party, etc)
  129. ///
  130. /// SQL TBL AuctionList
  131. /// - player id, item id, price, qty
  132. ///
  133. /// SQL TBL ItemPriceHistory
  134. /// - itemid, last price
  135.  
  136.  
  137.  
  138. ////////////////////////////////////////////////////////////
  139. /// Server CPU Load Estimations
  140. ///////////////////////////////////////////////////////////
  141.  
  142.  
  143. /// Worst case scenario - Full occupation/engagement of all entities
  144. // should only be updating what has changed,
  145. // and where people are looking
  146. // as players walk around with their cameras, thay mark tiles for updates
  147.  
  148. // town npc's dont need to be done every frame
  149. // world farming players and mobs can be updated at half speed
  150. // eg AI doesnt need to be updating every frame
  151.  
  152. // instance servers may be better off in one loop,
  153. // eg 1 loop, but collisions only hit their raid ID,
  154. // like vlans, isolated, but in the same processing loop
  155. // or 200 smaller loops, and isolated instances of entity manager
  156.  
  157. // server will only be doing update/collisions/rng/maths
  158.  
  159.  
  160. ////////////////////////////////////////////////////////////
  161. /// Multiplayer servers / cluster? etc?
  162. ///////////////////////////////////////////////////////////
  163.  
  164.  
  165. /// Multiplayer instance server
  166. /////////////////////////////////////////
  167. /// x 200 raids concurrent
  168. ///
  169. /// terrain 50000 tiles = 200 x 2500
  170. /// entities 1000 players = 200 x 5
  171. /// 600 bosses = 200 x 3
  172. /// 10000 mobs = 200 x 50
  173. ///
  174.  
  175.  
  176. /// Multiplayer persistent zone server
  177. /////////////////////////////////////////
  178. /// x 11 zones overall
  179. ///
  180. /// terrain 409,000 total terrain
  181. /// entities 5000 total mobs
  182. /// 20000 critters
  183. /// 100 npc's - constant
  184. /// 1000 players zones
  185. /// 500 players city
  186.  
  187.  
  188.  
  189.  
  190. ////////////////////////////////////////////////////////////
  191. /// Multiplayer World Zones
  192. ///////////////////////////////////////////////////////////
  193.  
  194. /// City Zone
  195. /////////////////////////////////////
  196. /// x 1 9000 tiles
  197. /// terrain 30x30 1 zone
  198. /// entities 30x30 100 npc's
  199. /// 100 critters
  200. /// 1-500 players
  201.  
  202.  
  203. /// World Zones (lava, ice, sand, water)
  204. //////////////////////////////////////
  205. /// x10 40000 tiles
  206. /// terrain 200x200 5-10 dungeon entrances
  207. /// entities 200x200 500 mobs
  208. /// 2000 critters
  209. /// 1-100 players Per
  210.  
  211.  
  212.  
  213.  
  214. ////////////////////////////////////////////////////////////
  215. /// Current Single player - Offline / Local
  216. ///////////////////////////////////////////////////////////
  217.  
  218.  
  219. /// Standalone Raid Instance
  220. //////////////////////////////////////////////////////
  221. /// Raid Dungeon 2500 tiles
  222. /// terrain 50x50 dungeon 3
  223. /// entities 50x50 1 Boss
  224. /// 3 miniboss
  225. /// 50 mobs
  226. /// 3-5 players
  227.  
  228.  
  229. /// Standalone Dungeon Instance
  230. //////////////////////////////////////////////////////
  231. /// Medium dungeon 2500 tiles
  232. /// terrain 50x50 dungeon 2
  233. /// entities 50x50 3 miniboss
  234. /// 30 mobs
  235. /// 1-3 players
  236.  
  237.  
  238. /// Standalone Dungeon Instance
  239. //////////////////////////////////////////////////////
  240. /// Small dungeon 400 tiles
  241. /// terrain 20x20 dungeon 1
  242. /// entities 20x20 1 miniboss
  243. /// 10 mobs
  244. /// 1 player
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement