home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 April: Mac OS SDK / Dev.CD Apr 00 SDK1.toast / Development Kits / Mac OS / GameSprocket SDKs / NetSprocket_SDK / NetSprocket Release Notes < prev    next >
Encoding:
Text File  |  1999-10-29  |  11.5 KB  |  231 lines  |  [ttro/ttxt]

  1. NetSprocket 1.7 Release Notes
  2.  
  3. Please test your applications on this version, and report all bugs using the
  4. bug reporter on Apple Developer Connection:
  5.  
  6. http://developer.apple.com/bugreporter/index.html
  7.  
  8.  
  9. Release Components
  10.  
  11. NetSprocket Release Notes     - this file
  12. NetSprocket.h                    - the header file to compile with
  13. NetSprocketStubLib                           - the stub lib for your development environment
  14. NetSprocketLib                   - release version of the library
  15. NetSprocketDebugLib           - debugging version of the library
  16.  
  17. WARNING: don't place both the debugging and non-debugging versions of the
  18. library in the search path or you will not be sure which version you will be
  19. using.
  20.  
  21. CRITICAL NOTE:
  22.  
  23. a rather severe error has been found in the documentation for NetSprocket.  The original "Apple Game Sprockets Guide 1.0" documentation said that you should call NSpReleaseAddressReference() to free the memory used by address references.  You must make sure that you only use this on address references that were allocated by NetSprocket (such as NSpDoModalJoinDialog().  This is especially critical when using address references generated by the NSpConvertOTAddrToAddressReference() function.  If you allocate your own OTAddress structions and then convert them to NSpAddressReferences you should not use NSpReleaseAddressReference() to free this memory.  Release your OTAddress allocations as you normally would.
  24.  
  25. A note on game names
  26.  
  27. When you are hosting a game with NetSprocket you provide a name for the game in the host dialog.  When playing over AppleTalk this name is used with NBP (Name Binding Protocol) to advertise your game on the LAN.  There are a few special characters that should not be used in game names because they have special meaning in AppleTalk.  These characters are:
  28.  
  29.     * - asterisk
  30.     ≈ - option x
  31.     / - forward slash
  32.     @ - at sign
  33.     : - colon
  34.  
  35. Dependencies
  36.  
  37. NetSprocket requires Mac OS 8.1 or later.
  38.  
  39. NetSprocket requires the latest Universal Headers -- version 3.2 or later.
  40. The latest version of the Universal Headers can be found on the Mac OS SDK
  41. CD-ROMs or on Apple Developer Connection.  <http://developer.apple.com/sdk/>
  42.  
  43. Changes from 1.1.1 to 1.7
  44.  
  45. Changes:
  46.  
  47.   -  NetSprocket 1.7 no longer supports 68K.  It is PowerPC-only.
  48.  
  49.   -  Added NSpSetConnectTimeout(UInt32 inSeconds).  This will set the timeout for
  50.      new NetSprocket connections.  For example, if you set this value to 5 then after
  51.      five seconds NetSprocket will stop trying to create a connection.  If you set the
  52.                     value to zero then it returns to the TCP default of 4 minutes.
  53.  
  54.   -  If you have installed an asynchronous message handler for your NetSprocket game
  55.      then you will now receive several new messages related to player and group managemnt.
  56.                     When a group is created you'll receive an NSpCreateGroupMessage.
  57.                     When a group is deleted you'll receive an NSPDeleteGroupMessage.
  58.                     You'll receive similar messages when players are added/removed from groups.  See the
  59.                     1.7 version of NetSprocket.h for the new message.what constants and message structures.
  60.  
  61.   -  Added a new call for servers: NSpPlayer_GetAddress.  You give it a player ID and a
  62.      it will fill in an OTAddress structure for you with the received address for that
  63.      player.  This is useful if the player is behind a gateway that is performing Network
  64.      Address Translation.  By using this new call the server can find out the translated
  65.      address of the player.
  66.  
  67. -    Added NSpPlayer_ChangeType so that the server can dynamically change the player type
  68.      during a network session.
  69.  
  70. -    Added NSpPlayer_Remove so that the server can forcibly removed players from a game.
  71.  
  72.   -  There was a bug in all previous versions of NetSprocket that caused groups to be created
  73.                     twice on the machine which requested the group.  This has been fixed.
  74.  
  75. Changes from 1.1 to 1.1.1
  76.  
  77. Changes:
  78.  
  79.   -  NetSprocket 1.1.1 is one library rather than being separate binaries for
  80.      CFM68K and PowerPC.
  81.  
  82.   -  If you specify a NULL string for the "type" parameter to NSpDoModalJoinDialog,
  83.      NetSprocket will use the game ID (passed to NSpInitialize) to search for games
  84.      on the AppleTalk network.  This matches the behavior for NSpGame_Host. You may
  85.      also pass in a zero length pascal string for the same behavior.  The pascal
  86.      string method also worked on version 1.1.
  87.  
  88.  
  89. Bug Fixes:
  90.  
  91.   -  NetSprocket now includes the resources ('dlgx', 400) and ('dlgx', 403)
  92.      so that it won't interfere with application dialogs.
  93.  
  94.   -  Through the power of C++ all previous NetSprocket builds subversively
  95.      had many debug asserts in them.  This has been corrected.  This should
  96.      fix a number of problems.
  97.  
  98.   -  NetSprocket's dialogs would occasionally truncate one or more of the
  99.      text fields.  This has been corrected.
  100.  
  101.   -  All callback functions were receiving invalid game references. Also, the 
  102.      callback function would be called inside of NSpGame_Host before the game
  103.      reference was filled in.  Both problems are fixed.
  104.  
  105.   -  A couple of rare instances where NetSprocket could leak memory were corrected.
  106.  
  107.  
  108. Known Issues:
  109.  
  110.   -  Host renegotiation does not work.
  111.  
  112.   -  NetSprocket 1.0 does not implement Round-Trip-Time or throughput functions.
  113.      You can implement your own RTT and thruput functions on top of the
  114.      NetSprocket API yourself, though.
  115.  
  116.   -  If you attempt to connect to an invalid OTAddress, NetSprocket will block inside
  117.      OpenTransport until the connection times out (~2 minutes).
  118.  
  119.  
  120.  
  121. Changes from 1.0 to 1.1
  122.  
  123. Changes:
  124.   -  This version now supports CFM68K as well.
  125.  
  126.   -  The NSpPlayerLeftMessage now includes a field for the name of the player who
  127.      left the game.  Previously, you only got the playerID, but since the player
  128.      was done there was no way to perform a GetInfo to get their name.
  129.     
  130.      CAVEAT I:  Be advised that this is a new feature to NetSprocket 1.1 and is
  131.      NOT backwards compatible with pre-1.1 builds.  If you use this field you must
  132.      make sure that your are using NetSprocket 1.1 or newer.  You can get the version
  133.      number with the NSpGetVersion() call.
  134.  
  135.         In short, make sure that everyone in the game is using 1.1 or newer if you
  136.      plan to use this field of the structure.
  137.  
  138. Bug fixes:
  139.   -  Bugs that disallowed the creation of more than one game object at a time
  140.      have been fixed.  You are now only limited by other system resources,
  141.      such as memory or networking ports.  Keep in mind if you try to host
  142.      multiple games that you will get an error back if you try to host multiple
  143.      games with the same game name (for AppleTalk) or with the same port (for IP).
  144.     
  145.   -   A significant problem was found under heavy flow (traffic) conditions
  146.          that could cause data to be delivered out of order.  This has been fixed.
  147.  
  148.  
  149. Getting the Most Out of NetSprocket
  150.  
  151. There is a new version of NetSprocketTest that should provide a better example
  152. of how to effectively use NetSprocket.  The most important thing to note is how
  153. NetSprocket messages are handled both synchronously and asynchronously.  This
  154. method prevents problems where user actions, such as a mouse-down, could
  155. prevent the main event loop from calling NSpMessage_Get, and thereby cause
  156. a buffer overflow problem.
  157.  
  158. The number one problem we've seen with people using NetSprocket is apps running
  159. out of memory.  The reason this happens is that NetSprocket presents a 
  160. message API to the application.  If you have, say, a 50K message, NetSprocket
  161. doesn't hand that message to the client application until all 50K are received.
  162. This model makes NetSprocket much more susceptible to low memory problems than
  163. other, data-oriented, networking APIs.  There are three things you can
  164. do to minimize this kind of problem.
  165.     1.  Use small messages ( < 1K) as often as is practical
  166.     2.     Give NetSprocket as much memory as you can spare
  167.     3.  Use the async message hander
  168.     
  169. NetSprocket will still function if you don't do these things, but end user
  170. conditions will be much more likely to cause your app problems.
  171.  
  172. You should always check return values from NetSprocket functions.  Failure to
  173. do so is reckless, and will only cause you and your customers headaches.
  174.  
  175. If the user unchecks the "play on this machine" button, the hosting machine
  176. must not send any messages to other players.  The host machine only acts to 
  177. route messages between the various players -- while it can act on messages
  178. that are copied to it, it cannot directly message other players.  If the host 
  179. needs to send messages to other players, the host should be implemented as a
  180. special kind of player.  If you need to disable the "play on this machine"
  181. button, create a custom host dialog box that does not provide that option.
  182.  
  183. When connecting to a game for the first time, a client application is not 
  184. permitted to send messages to other players until it receives the join
  185. approved message.  The application should spin waiting for a join approved,
  186. join denied, or game terminated message.  If you do receive a join denied or 
  187. game terminated message, you are not permitted to send messages to any other
  188. players in the game.  In actuality, the connection to the host has already
  189. been terminated.  Future versions of NetSprocket may return control to the 
  190. client app before the connection is completely established, so assuming you
  191. can send messages immediately after the NSpGame_Join call has returned is an 
  192. error.
  193.  
  194. To get the optimal performance out of NetSprocket, design your game to send
  195. "Normal" messages that contain less than 550 bytes of data.  This allows
  196. NetSprocket to use datagram-level delivery for both TCP/IP and AppleTalk. 
  197. Using "Registered" messages can cause a 2-50% network performance degradation,
  198. depending on a number of factors, including network bandwidth, utilization,
  199. message size, and send frequency.
  200.  
  201. All messages, except ones sent from a player to himself, are sent through the
  202. host.  Therefore, the host is one "hop" from any other player, and two non-host
  203. players are always two "hops" apart.
  204.  
  205. Sending a message to a group is not as efficient as sending to everyone in the
  206. game, or to a single player.  It is usually more efficient than sending to each
  207. individual in the group separately.
  208.  
  209. You CAN NOT send messages at VBL (or any other interrupt) time with NetSprocket
  210. 1.0.  You should schedule a deferred system task, or just wait until system
  211. task time before sending.  You CAN however, call NSpMessage_Get at interrupt
  212. time.  We generally recommend against all interrupt-time calls to the Game
  213. Sprockets.
  214.  
  215. The number of players in a NetSprocket game is limited only by memory (and
  216. networking resources, such as available ports).  If you expect to handle lots
  217. of players (14+), you need to make sure you give NetSprocket sufficient memory
  218. and queue elements when you initialize it.  If you get send failed or memory
  219. error message from NetSprocket, try giving it more memory.
  220.  
  221. If you have a situation where your game has players whose network throughput is
  222. greatly disparate, you need to make sure you don't choke the slow person.  For
  223. example, if you have 4 players on AppleTalk over Ethernet, and you have a fifth
  224. player join the game over a 28.8k PPP connection, and your fast machines are
  225. sending messages 30 times a second each, you're going to quickly gag the
  226. newcomer with too much data, and the host will simply not be able to deliver
  227. messages as quickly as you generate them.  The newcomer will be disconnected
  228. after approximately 20 messages have been queued up, waiting for flow control
  229. to lift before delivering them.  You can avoid this type of problem by
  230. throttling down your game's send rate to allow the newcomer to participate. 
  231. You can also avoid it by sending "Junk" messages instead of Normal.