MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


C Library Functions                                  libggzmod(3)



NAME
     libggzmod - The GZ Gaming Zone game frontend library.

DESCRIPTION
     This library allows games to communicate with the GZ Gaming
     Zone  core  client, which allows establishing the connection
     to the GZ  Gaming  Zone  server  and  its  associated  game
     server.


     The libggzmod allows game authors to use GZ Gaming Zone  in
     their game clients. This library provides a state engine and
     an event dispatcher. The states are associated with the game
     tables.  Each  table has a current state which is tracked by
     GZMod and the GZMODEVENTSTATE is propagated to the  game
     server, each time game state changes.


  STATES
     GZMODSTATECREATED    The game is in this state when it is
                             executed  for  the  first time. This
                             state should never be  changed  back
                             once the state is set.



     GZMODSTATECONECTED  Once the GZ client and the game are
                             connected, the game changes state to
                             this   automatically.   This   state
                             should  never  be  changed back once
                             the game leaves this state.


     GZMODSTATEWAITING    After  the  game  client  and   game
                             server  are  connected,  the  client
                             enters this state. The  game  client
                             may  now  call  ggzmodsetstate  to
                             change        states         between
                             GZMODSTATEWAITING,
                             GZMODSTATEPLAYING,            and
                             GZMODSTATEDONE.


     GZMODSTATEPLAYING    This state tells that  the  game  is
                             actively  being  played,  while  the
                             GZMODSTATEWAITING  state  in  the
                             game   is   considered  waiting  for
                             players.


     GZMODSTATEDONE       This state indicates  the  table  is
                             considered   dead   and   will  exit



SunOS 5.11          Last change: 29 May 2008                    1






C Library Functions                                  libggzmod(3)



                             shortly thereafter.




  EVENTS
     For each of the events available in GZModEvent,  the  table
     may  register  a  handler  to  handle  that  event.   Events
     include:

     GZMODEVENTSTATE

         Inform about a new game status. The old state (a GZMod-
         State*) is passed as the event's data.


     GZMODEVENTSERVER

         This event occurs when a  new  connection  to  the  game
         server  has  been  made, either by the core client or by
         the game client itself. In this case the fd is passed as
         the event's data.


     GZMODEVENTPLAYER

         This event occurs when the player's seat status changes.
         For  example,  if a player or bot joins, leaves seat, or
         starts/stops spectating. The  passed  event  data  is  a
         int[2]   pair   consisting  of  the  old  {isspectator,
         seatnum}.


     GZMODEVENTSEAT

         Informs about seat changes.  The old seat  (a  GZSeat*)
         is  passed  as the event data. The seat information will
         be updated before this event is invoked.


     GZMODEVENTSPECTATORSEAT

         This event occurs when a spectator seat change  happens.
         The  old  spectator  (a  GZSpectator*) is passed as the
         event data. The spectator information  will  be  updated
         before this event is invoked.


     GZMODEVENTCHAT

         This is an event for receiving a chat. The chat may have
         originated  in  another  game  client  or  from  the GZ



SunOS 5.11          Last change: 29 May 2008                    2






C Library Functions                                  libggzmod(3)



         client. The chat information (a GZChat*) is  passed  as
         the event's data.


     GZMODEVENTSTATS

         This is an event informing that player's statistics have
         been updated.


     GZMODEVENTINFO

         This event fires when  information  about  one  or  more
         other  players has been requested and has been received.
         The event's data is in  a  GZPlayerInfo*  structure  or
         NUL if information about all players was requested.


     GZMODEVENTEROR

         This event informs about GZMod errors. An error message
         (a  char*) is passed as the event's data. The GZMod may
         attempt to  recover  from  the  error,  but  it  is  not
         guaranteed that the GZ connection will continue to work
         after an error has happened.




FILES
     The following files are used by this library:

     /usr/lib/libggzmod.so           The  GZ  Gaming  Zone  game
                                     frontend shared library



     /etc/ggz.modules                Game  module  registry   for
                                     game clients



ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:










SunOS 5.11          Last change: 29 May 2008                    3






C Library Functions                                  libggzmod(3)



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     Availability                 SUNWgnome-games             
    
     Interface stability          Volatile                    
    


SEE ALSO
     ggzh(3),     ggzcoreh(3),     ggzmodh(3),      libggz(3),
     libggzcore(3),    attributes(5),    ggz.modules(5),   gnome-
     interfaces(5), ggz(6), ggz-config(6), ggz(7)

     GZ Gaming Zone:


         http:/www.ggzgamingzone.org/
         http:/www.ggzgamingzone.org/docs/api/libggz/
         http:/www.ggzgamingzone.org/docs/api/ggzcore/
         http:/www.ggzgamingzone.org/docs/api/ggzmod/




NOTES
     Written by Michal Pryc, Sun Microsystems Inc., 2008.




























SunOS 5.11          Last change: 29 May 2008                    4



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™