Previous Book Contents Book Index Next

Inside Macintosh: Apple Game Sprockets Guide /
Chapter 4 - NetSprocket / NetSprocket Reference
Data Structures


Player Information Structure

You use the player information structure to store information about each player in the game. It contains the player's ID, along with pertinent information about the player, including the groups he may belong to. The player information structure is defined by the NSpPlayerInfo data type.

typedef struct NSpPlayerInfo {
   NSpPlayerID                id;
   NSpPlayerType              type;
   Str31                      name;
   UInt32                     groupCount;
   NSpGroupID                 groups[kVariableLengthArray];
} NSpPlayerInfo, *NSpPlayerInfoPtr;
Field descriptions

id
A unique number for each player within a game. A player who leaves and re-enters a game will receive a new ID.
type
Reserved for the use by the game developer. This parameter is not used by NetSprocket, but may be used by you to classify players.
name
A user-readable Pascal string (maximum 31 characters).
groupCount
The number of groups the player is currently in.
groups
An array containing a list of the group IDs the player currently belongs to.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996