Sponsored Content
Full Discussion: Snake and ladder game
Top Forums Shell Programming and Scripting Snake and ladder game Post 302836827 by Chubler_XL on Wednesday 24th of July 2013 06:32:26 PM
Old 07-24-2013
I'd be inclined to use named pipes for this problem.

Use one NP for the game to receive commands from players and one for each player so they can receive game state.

Players would have to create a NP and pass it's path to the game using the game NP as they join.
 

4 More Discussions You Might Find Interesting

1. What is on Your Mind?

Game: Name this person

Simple rules... 1. Guess who it is, the first person to get it posts the next picture, post your guess as a reply to this thread. 2. Wait for the person who posted the picture to confirm that you are correct before posting a new picture. 3. If the person who posted the picture does not answer... (268 Replies)
Discussion started by: reborg
268 Replies

2. Programming

Tetris Game in C++

Open Source Project: https://github.com/yongye/cpp Ported from the shell: Shell (0 Replies)
Discussion started by: complex.invoke
0 Replies

3. What is on Your Mind?

Snake game challenge in UNIX

Hey Guys, I have made this basic snake game but it a little bit different from conventional snake game. Learned some basics of Unix. Hope you enjoy playing it. Please download and run on your machine and suggest any changes i can make. and let me know if someone could score 1000 points ;) ... (2 Replies)
Discussion started by: amit14august
2 Replies

4. UNIX for Beginners Questions & Answers

Word ladder Problem

Perl - Script Rules In a Word Ladder: Players get a starting word and an ending word Starting and ending words must be the same length (PIG and HOG, or CAT and DOG) Players change one letter at a time, attempting to move from the starting word to the ending word Each intermediate step... (1 Reply)
Discussion started by: asak
1 Replies
libggzmod(3)							C Library Functions						      libggzmod(3)

NAME
libggzmod - The GGZ Gaming Zone game frontend library. DESCRIPTION
This library allows games to communicate with the GGZ Gaming Zone core client, which allows establishing the connection to the GGZ Gaming Zone server and its associated game server. The libggzmod allows game authors to use GGZ Gaming Zone in their game clients. This library provides a state engine and an event dis- patcher. The states are associated with the game tables. Each table has a current state which is tracked by GGZMod and the GGZ- MOD_EVENT_STATE is propagated to the game server, each time game state changes. STATES GGZMOD_STATE_CREATED 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. GGZMOD_STATE_CONNECTED Once the GGZ 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. GGZMOD_STATE_WAITING After the game client and game server are connected, the client enters this state. The game client may now call ggzmod_set_state to change states between GGZMOD_STATE_WAITING, GGZMOD_STATE_PLAYING, and GGZMOD_STATE_DONE. GGZMOD_STATE_PLAYING This state tells that the game is actively being played, while the GGZMOD_STATE_WAITING state in the game is con- sidered waiting for players. GGZMOD_STATE_DONE This state indicates the table is considered dead and will exit shortly thereafter. EVENTS For each of the events available in GGZModEvent, the table may register a handler to handle that event. Events include: GGZMOD_EVENT_STATE Inform about a new game status. The old state (a GGZModState*) is passed as the event's data. GGZMOD_EVENT_SERVER 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. GGZMOD_EVENT_PLAYER This event occurs when the player's seat status changes. For example, if a player or bot joins, leaves seat, or starts/stops spectat- ing. The passed event data is a int[2] pair consisting of the old {is_spectator, seat_num}. GGZMOD_EVENT_SEAT Informs about seat changes. The old seat (a GGZSeat*) is passed as the event data. The seat information will be updated before this event is invoked. GGZMOD_EVENT_SPECTATOR_SEAT This event occurs when a spectator seat change happens. The old spectator (a GGZSpectator*) is passed as the event data. The specta- tor information will be updated before this event is invoked. GGZMOD_EVENT_CHAT This is an event for receiving a chat. The chat may have originated in another game client or from the GGZ client. The chat information (a GGZChat*) is passed as the event's data. GGZMOD_EVENT_STATS This is an event informing that player's statistics have been updated. GGZMOD_EVENT_INFO 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 GGZPlayerInfo* structure or NULL if information about all players was requested. GGZMOD_EVENT_ERROR This event informs about GGZMod errors. An error message (a char*) is passed as the event's data. The GGZMod may attempt to recover from the error, but it is not guaranteed that the GGZ connection will continue to work after an error has happened. FILES
The following files are used by this library: /usr/lib/libggzmod.so The GGZ Gaming Zone game frontend shared library /etc/ggz.modules Game module registry for game clients ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-games | +-----------------------------+-----------------------------+ |Interface stability |Volatile | +-----------------------------+-----------------------------+ SEE ALSO
ggz_h(3), ggzcore_h(3), ggzmod_h(3), libggz(3), libggzcore(3), attributes(5), ggz.modules(5), gnome-interfaces(5), ggz(6), ggz-config(6), ggz(7) GGZ 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 29 May 2008 libggzmod(3)
All times are GMT -4. The time now is 08:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy