2016년 1월 30일 토요일

3. Multiplay Implementation by UDP


  • Add library of 'ws2_32.lib'
  • Execution Sequence
      1. Server and Client information initialization
      2. Client send first data
      3. Tetris Game progressing
      4. if any one lose the game, first index data among sending array data is setting 'Lose Value'
      5. 'Lose User' send data and it close socket
      6. 'Win User' receive Array Data with 'Lose Value' of Opponent
      7. 'Win User' win with using 'Lose Value' of Opponent
      8. 'Win User' close socket

  • Reason 
      if 2 situation doesn't exist, Client'recv() function is blocking.
      if 4~7 situations don't exist, 'Win User' don't know the situation.

  • Next
      4.1 Speed up according to flowing time.
      4.2 Add score bettle system.
      4.3 Finally, I will upgrade quality and perfomance.

Source Download (Github Repository)

댓글 없음:

댓글 쓰기