home *** CD-ROM | disk | FTP | other *** search
/ The Net: Ultimate Internet Guide / WWLCD1.ISO / pc / directx2 / docs / dplay.txt < prev    next >
Encoding:
Text File  |  1996-05-28  |  2.5 KB  |  58 lines

  1. DirectPlay is not DBCS enabled.
  2.  
  3. DPRECEIVE_FROMPLAYER now works.
  4.  
  5. PLEASE NOTE: This isn't a change, but people often miss it.
  6. Send() may return a non-zero success value.
  7. You need to test Send() for error using if (FAILURE(hr = Send(...))).
  8. if (SUCCESS(hr = Send(...)) && hr) THEN:
  9.     You are using a modem.
  10.     The modem is backing up.  The value of 'hr' is the number of backed up 
  11. messages waiting to be put on the wire.  You must slow your data rate down,
  12. or at least monitor this.  If the backup reaches 64, Send will return 
  13. DPERR_BUSY.  The '64' can be queried.  Check GetCaps().  The max queue size
  14. is the value that Send will start failing new send requests.
  15.  
  16.  
  17.  
  18. An application should use DirectPlayEnumerate() to determine the
  19. service providers available and create a list of these.  This list should
  20. be presented to your user.   Once the user selects a provider, the application
  21. should open based on the GUID (returned in the callback) using
  22. DirectPlayCreate().  
  23.  
  24. DirectPlay provides 3 services in 2 dlls. Serial Modem, TCP/IP, IPX. 
  25.  
  26. Once connected, the user should select whether they wish to Create a
  27. game or connect to one.  For the creation case, call Open() with the game 
  28. parameters set.  For connection, call EnumerateSessions(), have the user 
  29. pick a game, and then open that game.
  30.  
  31. You should always do a DestroyPlayer() on any locally created players before
  32. you try and exit.
  33.  
  34. You should always Close() before exiting.
  35.  
  36. Close() will not succeed unless you have destroyed all local players.
  37. In addition, if you are the game creator all players must be destroyed.
  38.  
  39. Latency is not a guaranteed value by any means.  If latency is truely
  40. important to you, you should check appliation to application latency 
  41. by measuring it yourself.
  42.  
  43. It is important to keep packet sizes as small as possible.  
  44.  
  45. It is important to limit the amount of messages that can be generated.  
  46. Immortal Klowns, for example, issues a message for every keystroke.  Someone 
  47. pounding on the keyboard will cause IKlowns to fail.  It is better if 
  48. you sample keyboard input at a particular rate, or otherwise limit the input.
  49.  
  50. Always remember that DirectPlay implements unreliable communications.  
  51. You can't count on a message getting to its destination.
  52.  
  53. You tell a system message from others because it comes from player 0.
  54.  
  55. If you get a DPSYS_SESSIONLOST system message you need to delete the 
  56. players, close the session, release the DirectPlay object, and recreate 
  57. the DirectPlay object and your local player(s).
  58.