Guest User

Untitled

a guest
Jun 19th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.88 KB | None | 0 0
  1. while( user doesn't exit )
  2. check for user input
  3. run AI
  4. move enemies
  5. resolve collisions
  6. draw graphics
  7. play sounds
  8. end while
  9.  
  10. while( user does not exit )
  11. check for user input
  12. send commands to the server
  13. receive updates about the game from the server
  14. draw graphics
  15. play sounds
  16. end
  17.  
  18. while( true )
  19. check for client commands
  20. run AI
  21. move all entities
  22. resolve collisions
  23. send updates about the game to the clients
  24. end
  25.  
  26. connect to server
  27. while( user does not exit && connection live)
  28. check for user input
  29. send commands to the server
  30. estimate outcome and update world data with 'best guess'
  31. draw graphics
  32. play sounds
  33. receive updates about the game from the server
  34. correct any errors in world data
  35. draw graphics
  36. play sounds
  37. end
  38.  
  39. while( true )
  40. check for and handle new player connections
  41. check for client commands
  42. sanity check client commands
  43. run AI
  44. move all entities
  45. resolve collisions
  46. sanity check world data
  47. send updates about the game to the clients
  48. handle client disconnects
  49. end
  50.  
  51. run AI
  52. move enemies
  53. resolve collisions
  54.  
  55. upload client data to server
  56. download server updates
  57.  
  58. while (game is running)
  59. {
  60. get all clients data
  61. run AI
  62. resolve collisions
  63. udpate all clients
  64. }
  65.  
  66. while( user doesn't exit )
  67. check for user input
  68. run AI
  69. send location to server
  70. get locations from server
  71. resolve collisions
  72. draw graphics
  73. play sounds
  74. end while
  75.  
  76. while(connectedToNetwork)
  77. Read player location
  78. Post player location to server
  79. Read enemy locations from server
  80. Post enemy locations into shared memory
  81.  
  82. while( user doesn't exit )
  83. check for user input
  84. run AI
  85. read/write shared memory
  86. resolve collisions
  87. draw graphics
  88. play sounds
  89. end while
  90.  
  91. while (PlayerConnected)
  92. Wait for player to post location
  93. Place new location in shared memory
Add Comment
Please, Sign In to add comment