games lineofsight 1.0
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 4896
Games::Lineofsight 1.0
Games::Lineofsight is a Perl module. more>>
Games::Lineofsight is a Perl module.
Many games (Ultima, Nethack) use two-dimensional maps that consists of the squares of the same size in a grid. Line-of-sight means that some of the squares may represent the items that block the vision of the player from seeing squares behind them. With this module you can add that behaviour to your games.
SYNOPSIS
use Games::Lineofsight qw(lineofsight);
# The map has to be a two-dimensional array. Each member (or "cell") of the array represents one
# square in the map. In this example each cell contains only one character but you can put strings
# to the cells also - practical with the graphical games.
my @map=(
[split //,"..:..::........."], # this is the map
[split //,".......:..X....:"], # . and : represents the ground
[split //,"...X.....:...:.."], # X is the barrier for the sight
[split //,".:...:....:....."],
[split //,"..X....:..X....."],
[split //,"..X..:........:."],
);
my($width)=scalar(@{@map[0]}); # the width of the map
my($height)=scalar(@map); # the height of the map
my($barrier_str)="X"; # string that represents the barrier
my($hidden_str)="*"; # string that represents a cell behind a barrier
my($man_str)="@"; # string that represents the viewer
my($man_x,$man_y)=(7,3); # view point coordinates - the player is here
# recreate the map with line-of-sight
@map=lineofsight(@map,$man_x,$man_y,$barrier_str,$hidden_str);
# draw the map
for(my $i=0;$i < $height;$i++){
for(my $j=0;$j < $width;$j++){
print $man_x == $j && $man_y == $i ? $man_str : $map[$i][$j];
}
print "n";
}
or
# The lineofsight() calls get_barriers() and analyze_map() each time its called. If the viewer
# moves around the map a lot, its much faster to read in the barriers once and call only
# analyze_map() each time before drawing it.
use Games::Lineofsight qw(get_barriers analyze_map);
# The map has to be a two-dimensional array. Each member (or "cell") of the array represents one
# square in the map. In this example each cell contains only one character but you can put strings
# to the cells also - practical with the graphical games.
my @map=(
[split //,"..:..::........."], # this is the map
[split //,".......:..X....:"], # . and : represents the ground
[split //,"...X.....:...:.."], # X is the barrier for the sight
[split //,".:...:....:....."],
[split //,"..X....:..X....."],
[split //,"..X..:........:."],
);
my($width)=scalar(@{@map[0]}); # the width of the map
my($height)=scalar(@map); # the height of the map
my($barrier_str)="X"; # string that represents the barrier
my($hidden_str)="*"; # string that represents a cell behind a barrier
my($man_str)="@"; # string that represents the viewer
my($man_x,$man_y)=(7,3); # view point coordinates - the player is here
# get_barriers() returns a hash with the information about barriers in the map. In this example we
# declare the "X"-character as a barrier. As well you can declare it to be a string in the graphical
# games; for example "barrier.jpg".
my %barrier=get_barriers($width,$height,@map,$barrier_str);
# analyze_map() returns an array containing the original map looked from the view point. The cells
# behind the barriers are replaced with given strings. The barriers should be told to the subroutine
# calling first get_barriers()-subroutine as we already did.
my @map2=analyze_map($width,$height,@map,%barrier,$man_x,$man_y,$hidden_str);
#draw the map with the lineofsight
print "nOriginal map:n";
draw($width,$height,$man_x,$man_y,@map2,$man_str);
# move the viewer two squares right
$man_x+=2;
# refresh the map
my @map2=analyze_map($width,$height,@map,%barrier,$man_x,$man_y,$hidden_str);
#draw the map again
print "nViewer has moved:n";
draw($width,$height,$man_x,$man_y,@map2,$man_str);
sub draw{
my($width,$height,$man_x,$man_y,$map,$man_str)=@_;
for(my $i=0;$i < $height;$i++){
for(my $j=0;$j < $width;$j++){
print $man_x == $j && $man_y == $i ? $man_str : $$map[$i][$j];
}
print "n";
}
}
<<lessMany games (Ultima, Nethack) use two-dimensional maps that consists of the squares of the same size in a grid. Line-of-sight means that some of the squares may represent the items that block the vision of the player from seeing squares behind them. With this module you can add that behaviour to your games.
SYNOPSIS
use Games::Lineofsight qw(lineofsight);
# The map has to be a two-dimensional array. Each member (or "cell") of the array represents one
# square in the map. In this example each cell contains only one character but you can put strings
# to the cells also - practical with the graphical games.
my @map=(
[split //,"..:..::........."], # this is the map
[split //,".......:..X....:"], # . and : represents the ground
[split //,"...X.....:...:.."], # X is the barrier for the sight
[split //,".:...:....:....."],
[split //,"..X....:..X....."],
[split //,"..X..:........:."],
);
my($width)=scalar(@{@map[0]}); # the width of the map
my($height)=scalar(@map); # the height of the map
my($barrier_str)="X"; # string that represents the barrier
my($hidden_str)="*"; # string that represents a cell behind a barrier
my($man_str)="@"; # string that represents the viewer
my($man_x,$man_y)=(7,3); # view point coordinates - the player is here
# recreate the map with line-of-sight
@map=lineofsight(@map,$man_x,$man_y,$barrier_str,$hidden_str);
# draw the map
for(my $i=0;$i < $height;$i++){
for(my $j=0;$j < $width;$j++){
print $man_x == $j && $man_y == $i ? $man_str : $map[$i][$j];
}
print "n";
}
or
# The lineofsight() calls get_barriers() and analyze_map() each time its called. If the viewer
# moves around the map a lot, its much faster to read in the barriers once and call only
# analyze_map() each time before drawing it.
use Games::Lineofsight qw(get_barriers analyze_map);
# The map has to be a two-dimensional array. Each member (or "cell") of the array represents one
# square in the map. In this example each cell contains only one character but you can put strings
# to the cells also - practical with the graphical games.
my @map=(
[split //,"..:..::........."], # this is the map
[split //,".......:..X....:"], # . and : represents the ground
[split //,"...X.....:...:.."], # X is the barrier for the sight
[split //,".:...:....:....."],
[split //,"..X....:..X....."],
[split //,"..X..:........:."],
);
my($width)=scalar(@{@map[0]}); # the width of the map
my($height)=scalar(@map); # the height of the map
my($barrier_str)="X"; # string that represents the barrier
my($hidden_str)="*"; # string that represents a cell behind a barrier
my($man_str)="@"; # string that represents the viewer
my($man_x,$man_y)=(7,3); # view point coordinates - the player is here
# get_barriers() returns a hash with the information about barriers in the map. In this example we
# declare the "X"-character as a barrier. As well you can declare it to be a string in the graphical
# games; for example "barrier.jpg".
my %barrier=get_barriers($width,$height,@map,$barrier_str);
# analyze_map() returns an array containing the original map looked from the view point. The cells
# behind the barriers are replaced with given strings. The barriers should be told to the subroutine
# calling first get_barriers()-subroutine as we already did.
my @map2=analyze_map($width,$height,@map,%barrier,$man_x,$man_y,$hidden_str);
#draw the map with the lineofsight
print "nOriginal map:n";
draw($width,$height,$man_x,$man_y,@map2,$man_str);
# move the viewer two squares right
$man_x+=2;
# refresh the map
my @map2=analyze_map($width,$height,@map,%barrier,$man_x,$man_y,$hidden_str);
#draw the map again
print "nViewer has moved:n";
draw($width,$height,$man_x,$man_y,@map2,$man_str);
sub draw{
my($width,$height,$man_x,$man_y,$map,$man_str)=@_;
for(my $i=0;$i < $height;$i++){
for(my $j=0;$j < $width;$j++){
print $man_x == $j && $man_y == $i ? $man_str : $$map[$i][$j];
}
print "n";
}
}
Download (0.004MB)
Added: 2007-01-03 License: Perl Artistic License Price:
1029 downloads
Games::Roshambo 1.01
Games::Roshambo is a brilliant module which manages a game of Rock/Paper/Scissors, aka Roshambo more>>
Games:Roshambo 1.01 is a brilliant module which manages a game of Rock/Paper/Scissors, aka Roshambo
Major Features:
- You can specify an optional hashref containing configuration items.
- Valid configuration items are: numthrows
- The number of separate valid throws for a game, for example, in Rock, Paper, Scissors, there are 3 throws, while in a spirited game of RPS-101, there are 101 valid throws. If not specified, this defaults to 3.
- sortable
- OPTIONAL: Behold the madness of Chris Prather. Passing a TRUE value to new for this item will cause the judge method to return values of -1 if Player 1 wins, 0 for a tie and 1 for Player 2, instead of the 0, 1 and 2 it does normally.
- The entirely dubious benefit of this is that the function can be used in conjunction with sort. It's his fault. He asked for it. Any questions as to the relative usefulness of this should be directed at him. The management disavows all knowledge.
- This method will judge a game of RPS, returning a 1 for Player 1 winning, a 2 for Player 2, and a 0 for a tie.
- It takes up to two arguments, indicating the throws for Player 1 and Player 2, as text representations.
- If one or both arguments are omitted, the method will internally call $self->gen_throw to randomly generate one.
- getaction
- When called with two throws, this will return the text of the action for this combination. For example, if called as $rps-getaction("rock", "paper")> the returned value will be "covers".
- This module contains actions for three throw (Rock, Paper, Scissors) and 101 throw games, in any other number of throws, this method will return undef.
Requirements: Perl
Added: 2009-05-14 License: Perl Artistic License Price: FREE
1 downloads
Games::Euchre 1.02
Games::Euchre is an Euchre card game for humans and computers. more>>
Games::Euchre is an Euchre card game for humans and computers.
SYNOPSIS
Simply run my game wrapper:
% euchre.pl
or write your own:
use Games::Euchre;
use Games::Euchre::AI::Simple;
use Games::Euchre::AI::Human;
my $game = Games::Euchre->new();
foreach my $i (1..3) {
$game->setAI($i, Games::Euchre::AI::Simple->new());
}
$game->setAI(4, Games::Euchre::AI::Human->new());
$game->playGame();
my @scores = sort {$b $a} $game->getScores();
print("The winner is " . $game->getWinner()->getName() . " with a score of " .
"$scores[0] to $scores[1]n");
This software implements the card game of Euchre. The game is played with four players composing two teams. Any of the four players can be human or computer players, but more than one human is not well supported yet.
The Games::Euchre::AI module implements a simple framework for adding new classes of human interfaces or computer opponents. I recomment that AI writers use Games::Euchre::AI::Simple (a REALLY dumb computer opponent) as starting point.
Aside from the ::AI class and its descendents, this package also implements the following classes: Games::Euchre::Team, Games::Euchre::Player and Games::Euchre::Trick.
<<lessSYNOPSIS
Simply run my game wrapper:
% euchre.pl
or write your own:
use Games::Euchre;
use Games::Euchre::AI::Simple;
use Games::Euchre::AI::Human;
my $game = Games::Euchre->new();
foreach my $i (1..3) {
$game->setAI($i, Games::Euchre::AI::Simple->new());
}
$game->setAI(4, Games::Euchre::AI::Human->new());
$game->playGame();
my @scores = sort {$b $a} $game->getScores();
print("The winner is " . $game->getWinner()->getName() . " with a score of " .
"$scores[0] to $scores[1]n");
This software implements the card game of Euchre. The game is played with four players composing two teams. Any of the four players can be human or computer players, but more than one human is not well supported yet.
The Games::Euchre::AI module implements a simple framework for adding new classes of human interfaces or computer opponents. I recomment that AI writers use Games::Euchre::AI::Simple (a REALLY dumb computer opponent) as starting point.
Aside from the ::AI class and its descendents, this package also implements the following classes: Games::Euchre::Team, Games::Euchre::Player and Games::Euchre::Trick.
Download (0.021MB)
Added: 2007-01-03 License: GPL (GNU General Public License) Price:
1034 downloads
Games::Bingo::Bot 0.01
Games::Bingo::Bot is a simple class holding IRC related methods for bingo. more>>
Games::Bingo::Bot is a simple class holding IRC related methods for bingo.
SYNOPSIS
use Games::Bingo::Bot;
use constant ANY => 1; use constant PUBLIC => 2; use constant PRIVATE => 3;
my $gbb = Games::Bingo::Bot->new();
my $sub = $gbb->{commands}->{$msg});
my ($type, $answer) = &$sub($gbb, $nick);
This module contains all the commands supported by the Games::Bingo::Bot IRC bot (see the script in the bin directory).
The Games::Bingo::Bot class (this) and the script mentioned above is a complete IRC setup for playing Bingo, using the Games::Bingo module.
These are the bingobot commands:
help - this message
play - join a game
stats - get the current statistics of the running game
pull - pull the next number
bingo - you indicate to the bot that you have bingo
pulled - shows you what number have been pulled
show - lists the numbers on your plate
The command are described below in detail (SEE COMMANDS).
Not implemented yet (SEE TODO):
auto - enables automode (automatic number pulling)
noauto - disables automode
All commands can be sent into the channel or send as private messages to the bot. The bot can repond as both of these ways aswell. The reponses are sent as follows:
help, show and all errors are always private messages
pull and bingo are always public
play, pulled, stats, auto, noauto depends on how you query
As long as the bot is online a game is running.
<<lessSYNOPSIS
use Games::Bingo::Bot;
use constant ANY => 1; use constant PUBLIC => 2; use constant PRIVATE => 3;
my $gbb = Games::Bingo::Bot->new();
my $sub = $gbb->{commands}->{$msg});
my ($type, $answer) = &$sub($gbb, $nick);
This module contains all the commands supported by the Games::Bingo::Bot IRC bot (see the script in the bin directory).
The Games::Bingo::Bot class (this) and the script mentioned above is a complete IRC setup for playing Bingo, using the Games::Bingo module.
These are the bingobot commands:
help - this message
play - join a game
stats - get the current statistics of the running game
pull - pull the next number
bingo - you indicate to the bot that you have bingo
pulled - shows you what number have been pulled
show - lists the numbers on your plate
The command are described below in detail (SEE COMMANDS).
Not implemented yet (SEE TODO):
auto - enables automode (automatic number pulling)
noauto - disables automode
All commands can be sent into the channel or send as private messages to the bot. The bot can repond as both of these ways aswell. The reponses are sent as follows:
help, show and all errors are always private messages
pull and bingo are always public
play, pulled, stats, auto, noauto depends on how you query
As long as the bot is online a game is running.
Download (0.006MB)
Added: 2007-01-02 License: Perl Artistic License Price:
1032 downloads
Games Knoppix 4.0.2-03
Games Knoppix is a Knoppix based LiveCD with games. more>>
Games Knoppix is a Knoppix based LiveCD with games.
The following games are included:
- Marble Blast Gold Demo (OpenGL)
- Mutant Storm Demo (OpenGL)
- Space Tripper Demo (OpenGL)
- Think Tanks Demo (OpenGL)
- Ufo AI (XMas Special) (OpenGL)
- Asciijump
- Atanks
- Bzflag (OpenGL)
- Bzflag-Server
- Crack-Attack (OpenGL)
- Crimson
- Crossfire-Client-GTK
- Crossfire-Client-X11
- Cube
- Empire
- Enigma
- Foobillard (OpenGL)
- Freeciv-Client
- Freeciv-Client-GTK
- Freeciv-Server
- Freesci
- Gltron (OpenGL)
- Gnuchess
- Gnugo
- JumpnBump
- Kbattleship
- Kmahjongg
- Kobodeluxe
- Ksokoban
- Lbreakout2
- Lgeneral
- Nethack-Console
- Nethack-Gnome
- Nethack-Lisp
- Nethack-Qt
- Nethack-X11
- Netpanzer (OpenGL)
- Neverball (OpenGL)
- Pysol
- Scorched3d (OpenGL)
- Tower Toppler
- Battle for Wesnoth
- Battle for Wesnoth Editor
- Battle for Wesnoth Server
- Xarchon
- Xblast
- Xblast-TNT
- Xboing
- Xgalaga
- Xskat
- Xsoldier
<<lessThe following games are included:
- Marble Blast Gold Demo (OpenGL)
- Mutant Storm Demo (OpenGL)
- Space Tripper Demo (OpenGL)
- Think Tanks Demo (OpenGL)
- Ufo AI (XMas Special) (OpenGL)
- Asciijump
- Atanks
- Bzflag (OpenGL)
- Bzflag-Server
- Crack-Attack (OpenGL)
- Crimson
- Crossfire-Client-GTK
- Crossfire-Client-X11
- Cube
- Empire
- Enigma
- Foobillard (OpenGL)
- Freeciv-Client
- Freeciv-Client-GTK
- Freeciv-Server
- Freesci
- Gltron (OpenGL)
- Gnuchess
- Gnugo
- JumpnBump
- Kbattleship
- Kmahjongg
- Kobodeluxe
- Ksokoban
- Lbreakout2
- Lgeneral
- Nethack-Console
- Nethack-Gnome
- Nethack-Lisp
- Nethack-Qt
- Nethack-X11
- Netpanzer (OpenGL)
- Neverball (OpenGL)
- Pysol
- Scorched3d (OpenGL)
- Tower Toppler
- Battle for Wesnoth
- Battle for Wesnoth Editor
- Battle for Wesnoth Server
- Xarchon
- Xblast
- Xblast-TNT
- Xboing
- Xgalaga
- Xskat
- Xsoldier
Download (2762MB)
Added: 2005-09-14 License: GPL (GNU General Public License) Price:
857 downloads
Games::Dice 0.02
Games::Dice is a Perl module that can be used to simulate dice rolls. more>>
Games::Dice is a Perl module that can be used to simulate dice rolls.
SYNOPSIS
use Games::Dice roll;
$strength = roll 3d6+1;
use Games::Dice roll_array;
@rolls = roll_array 4d8;
Games::Dice simulates die rolls. It uses a function-oriented (not object-oriented) interface. No functions are exported by default. At present, there are two functions which are exportable: roll and roll_array. The latter is used internally by roll, but can also be exported by itself.
The number and type of dice to roll is given in a style which should be familiar to players of popular role-playing games: adb[+-*/b]c. a is optional and defaults to 1; it gives the number of dice to roll. b indicates the number of sides to each die; the most common, cube-shaped die is thus a d6. % can be used instead of 100 for b; hence, rolling 2d% and 2d100 is equivalent. roll simulates a rolls of b-sided dice and adds together the results.
The optional end, consisting of one of +-*/b and a number c, can modify the sum of the individual dice. +-*/ are similar in that they take the sum of the rolls and add or subtract c, or multiply or divide the sum by c. (x can also be used instead of *.) Hence, 1d6+2 gives a number in the range 3..8, and 2d4*10 gives a number in the range 20..80. (Using / truncates the result to an int after dividing.) Using b in this slot is a little different: its short for "best" and indicates "roll a number of dice, but add together only the best few". For example, 5d6b3 rolls five six- sided dice and adds together the three best rolls. This is sometimes used, for example, in roll-playing to give higher averages.
Generally, roll probably provides the nicer interface, since it does the adding up itself. However, in some situations one may wish to process the individual rolls (for example, I am told that in the game Feng Shui, the number of dice to be rolled cannot be determined in advance but depends on whether any 6s were rolled); in such a case, one can use roll_array to return an array of values, which can then be examined or processed in an application-dependent manner.
This having been said, comments and additions (especially if accompanied by code!) to Games::Dice are welcome. So, using the above example, if anyone wishes to contribute a function along the lines of roll_feng_shui to become part of Games::Dice (or to support any other style of die rolling), you can contribute it to the authors address, listed below.
<<lessSYNOPSIS
use Games::Dice roll;
$strength = roll 3d6+1;
use Games::Dice roll_array;
@rolls = roll_array 4d8;
Games::Dice simulates die rolls. It uses a function-oriented (not object-oriented) interface. No functions are exported by default. At present, there are two functions which are exportable: roll and roll_array. The latter is used internally by roll, but can also be exported by itself.
The number and type of dice to roll is given in a style which should be familiar to players of popular role-playing games: adb[+-*/b]c. a is optional and defaults to 1; it gives the number of dice to roll. b indicates the number of sides to each die; the most common, cube-shaped die is thus a d6. % can be used instead of 100 for b; hence, rolling 2d% and 2d100 is equivalent. roll simulates a rolls of b-sided dice and adds together the results.
The optional end, consisting of one of +-*/b and a number c, can modify the sum of the individual dice. +-*/ are similar in that they take the sum of the rolls and add or subtract c, or multiply or divide the sum by c. (x can also be used instead of *.) Hence, 1d6+2 gives a number in the range 3..8, and 2d4*10 gives a number in the range 20..80. (Using / truncates the result to an int after dividing.) Using b in this slot is a little different: its short for "best" and indicates "roll a number of dice, but add together only the best few". For example, 5d6b3 rolls five six- sided dice and adds together the three best rolls. This is sometimes used, for example, in roll-playing to give higher averages.
Generally, roll probably provides the nicer interface, since it does the adding up itself. However, in some situations one may wish to process the individual rolls (for example, I am told that in the game Feng Shui, the number of dice to be rolled cannot be determined in advance but depends on whether any 6s were rolled); in such a case, one can use roll_array to return an array of values, which can then be examined or processed in an application-dependent manner.
This having been said, comments and additions (especially if accompanied by code!) to Games::Dice are welcome. So, using the above example, if anyone wishes to contribute a function along the lines of roll_feng_shui to become part of Games::Dice (or to support any other style of die rolling), you can contribute it to the authors address, listed below.
Download (0.004MB)
Added: 2007-07-25 License: Perl Artistic License Price:
821 downloads
Games::Euchre::Trick 1.02
Games::Euchre::Trick is a trick class for Euchre card game. more>>
Games::Euchre::Trick is a trick class for Euchre card game.
Only one Trick instance is alive at one time per Euchre game. The Trick keeps track of which cards have been played, and provides useful functions to determine which cards are legal plays, as well as who is the winner of the trick.
The trick class makes the determination of which card beats which card, given the current trump and lead. The trick class knows how to handle an alone hand and it calls the playCard() method for each player in turn in its play() method, usually called from the Games::Euchre->playHand() method.
<<lessOnly one Trick instance is alive at one time per Euchre game. The Trick keeps track of which cards have been played, and provides useful functions to determine which cards are legal plays, as well as who is the winner of the trick.
The trick class makes the determination of which card beats which card, given the current trump and lead. The trick class knows how to handle an alone hand and it calls the playCard() method for each player in turn in its play() method, usually called from the Games::Euchre->playHand() method.
Download (0.021MB)
Added: 2007-01-02 License: Perl Artistic License Price:
1026 downloads
Games::Go::TDFinder 1.001
TDFinder is a widget to support preparing Go tournament registration. more>>
TDFinder is a widget to support preparing Go tournament registration.
SYNOPSIS
use Games::Go::TDFinder;
$tdFinder = $parent->Games::Go::TDFinder ( ? options ? );
TDFinder is a widget to assist in preparing a Go Tournament register.tde file in AGA (American Go Association) format. It consists of three main parts: a TDEntry widget at the bottom, a match list in the middle (which is an ROText widget), and the tde information at the top (A TextUndo widget).
The widget opens the TDLIST file for searching. Tournemant directors should download the most recent TDLIST from the AGA shortly before the tournament. The most recent TDLIST is available from the AGA at: http:www.usgo.org
Typing search keys into the TDEntry field causes the TDFinder to search through the TDLIST looking for matches.
When the number of matches is small enough to fit into the match list ROText widget, they are posted there. Individual TDLIST entries can be selected either by further refining the search keys, or by using the Up/Down arrow keys. Typing Enter, double clicking a match (BUGBUG: TBD), or dragging a match to the tde text widget (BUGBUG: TBD) transfers a match to the tde file.
The caller is responsible for make sure the final register.tde file corresponds to the information in the tde part of the TDFinder widget.
<<lessSYNOPSIS
use Games::Go::TDFinder;
$tdFinder = $parent->Games::Go::TDFinder ( ? options ? );
TDFinder is a widget to assist in preparing a Go Tournament register.tde file in AGA (American Go Association) format. It consists of three main parts: a TDEntry widget at the bottom, a match list in the middle (which is an ROText widget), and the tde information at the top (A TextUndo widget).
The widget opens the TDLIST file for searching. Tournemant directors should download the most recent TDLIST from the AGA shortly before the tournament. The most recent TDLIST is available from the AGA at: http:www.usgo.org
Typing search keys into the TDEntry field causes the TDFinder to search through the TDLIST looking for matches.
When the number of matches is small enough to fit into the match list ROText widget, they are posted there. Individual TDLIST entries can be selected either by further refining the search keys, or by using the Up/Down arrow keys. Typing Enter, double clicking a match (BUGBUG: TBD), or dragging a match to the tde text widget (BUGBUG: TBD) transfers a match to the tde file.
The caller is responsible for make sure the final register.tde file corresponds to the information in the tde part of the TDFinder widget.
Download (0.062MB)
Added: 2007-01-02 License: GPL (GNU General Public License) Price:
1025 downloads
Games::Battleship::Craft 0.05
Games::Battleship::Craft is a Battleship craft class. more>>
Games::Battleship::Craft is a Battleship craft class.
SYNOPSIS
use Games::Battleship::Craft;
my $craft = Games::Battleship::Craft->new(
id => T,
name => tug boat,
points => 1,
)
$points_remaining = $craft->hit;
A Games::Battleship::Craft object represents the profile of a Battleship
PUBLIC METHODS
new %ARGUMENTS
id => $STRING
A scalar identifier to use to indicate position on the grid. If one is not provided, the uppercased first name character will be used by default.
Currently, it is required that this be a single uppercase letter (the first letter of the craft name, probably), since a hit will be indicated by "lowercasing" this mark on a player grid.
name => $STRING
A required attribute provided to give the craft a name.
points => $NUMBER
An attribute used to define the line segment span on the playing grid.
position => [$X, $Y]
The position of the craft bow ("nose") on the grid.
Currently, the craft is assumed to have a horizontal or vertical alignment. Soon there will be diagonal positioning...
hit
$points_remaining = $craft->hit;
Increment the crafts hit attribute value and return whats left of the craft (total point value minus the number of hits).
<<lessSYNOPSIS
use Games::Battleship::Craft;
my $craft = Games::Battleship::Craft->new(
id => T,
name => tug boat,
points => 1,
)
$points_remaining = $craft->hit;
A Games::Battleship::Craft object represents the profile of a Battleship
PUBLIC METHODS
new %ARGUMENTS
id => $STRING
A scalar identifier to use to indicate position on the grid. If one is not provided, the uppercased first name character will be used by default.
Currently, it is required that this be a single uppercase letter (the first letter of the craft name, probably), since a hit will be indicated by "lowercasing" this mark on a player grid.
name => $STRING
A required attribute provided to give the craft a name.
points => $NUMBER
An attribute used to define the line segment span on the playing grid.
position => [$X, $Y]
The position of the craft bow ("nose") on the grid.
Currently, the craft is assumed to have a horizontal or vertical alignment. Soon there will be diagonal positioning...
hit
$points_remaining = $craft->hit;
Increment the crafts hit attribute value and return whats left of the craft (total point value minus the number of hits).
Download (0.010MB)
Added: 2007-01-06 License: Perl Artistic License Price:
1026 downloads
Java Games 1.0
Java Games is a collection of simple games that are compiled into Java applets and meant to be played online in a Web browser. more>>
Java Games project is a collection of simple games that are compiled into Java applets and meant to be played online in a Web browser.
Currently the collection contains four games: XO World (similar to tic-tac-toe, but with lines of 5 on a 10x10 board); 100 Mack (guess the random combination of 4 images out of a set of six); Memory (flip 2 plates at a time to find matching pairs); and Tetris.
<<lessCurrently the collection contains four games: XO World (similar to tic-tac-toe, but with lines of 5 on a 10x10 board); 100 Mack (guess the random combination of 4 images out of a set of six); Memory (flip 2 plates at a time to find matching pairs); and Tetris.
Download (0.13MB)
Added: 2007-02-20 License: GPL (GNU General Public License) Price:
985 downloads
JGachine 0.1.0
JGachine project is a Java game machine/engine/browser. more>>
JGachine project is a Java game machine/engine/browser.
JGachine is a networked game engine for 2D multi-player (networked) games.
It is written in Java and C++.
The games themselves are written in pure Java and can be loaded via the network.
Main features:
- easy game programing for beginners
- a game machine/engine/browser
- one client for multiple games
- you only write the game server (though the server may send bytecode to the client)
- secure client (though executing bytecode from the server
- writing multiplayer networked games within 2 hours
- portable
- try to allow output device independent games
- device independent coordinates
- help with different/changing aspect ratios
<<lessJGachine is a networked game engine for 2D multi-player (networked) games.
It is written in Java and C++.
The games themselves are written in pure Java and can be loaded via the network.
Main features:
- easy game programing for beginners
- a game machine/engine/browser
- one client for multiple games
- you only write the game server (though the server may send bytecode to the client)
- secure client (though executing bytecode from the server
- writing multiplayer networked games within 2 hours
- portable
- try to allow output device independent games
- device independent coordinates
- help with different/changing aspect ratios
Download (0.41MB)
Added: 2006-10-25 License: GPL (GNU General Public License) Price:
1094 downloads
Games::Goban 1.100
Games::Goban is a board for playing go, renju, othello, etc. more>>
Games::Goban is a board for playing go, renju, othello, etc.
SYNOPSIS
use Games::Goban;
my $board = new Games::Goban (
size => 19,
game => "go",
white => "Seigen, Go",
black => "Minoru, Kitani",
referee => &Games::Goban::Rules::Go,
);
$board->move("pd"); $board->move("dd");
print $board->as_sgf;
This is a generic module for handling goban-based board games. Theoretically, it can be used to handle many of the other games which can use Smart Game Format (SGF) but I want to keep it reasonably restricted in order to keep it simple.
<<lessSYNOPSIS
use Games::Goban;
my $board = new Games::Goban (
size => 19,
game => "go",
white => "Seigen, Go",
black => "Minoru, Kitani",
referee => &Games::Goban::Rules::Go,
);
$board->move("pd"); $board->move("dd");
print $board->as_sgf;
This is a generic module for handling goban-based board games. Theoretically, it can be used to handle many of the other games which can use Smart Game Format (SGF) but I want to keep it reasonably restricted in order to keep it simple.
Download (0.015MB)
Added: 2007-01-06 License: Perl Artistic License Price:
1035 downloads
Eclipse 2D Game Engine 1.0
Eclipse 2D Game Engine provides bitmap fonts, window management, audio capabilities, image loading, error logging, and zip file. more>>
Eclipse is a set of C++ classes designed to give beginner developers a head start in developing their first games as well as more experienced developers who dont want to have to write code for mundane tasks like fonts, sprites, and image loading.
Eclipse 2D Game Engine provides bitmap fonts, window management, audio capabilities, image loading, error logging, and zip file support.
<<lessEclipse 2D Game Engine provides bitmap fonts, window management, audio capabilities, image loading, error logging, and zip file support.
Download (0.38MB)
Added: 2006-08-24 License: GPL (GNU General Public License) Price:
1166 downloads
Games::Console 0.04
Games::Console Perl module provide a 2D quake style in-game console. more>>
Games::Console Perl module provide a 2D quake style in-game console.
SYNOPSIS
use Games::Console;
my $console = Games::Console->new(
font => $font_object,
background_color => [ 1,1,0],
background_alpha => 0.4,
text_color => [ 1,1,1 ],
text_alpha => 1,
speed => 50, # in percent per second
height => 50, # fully opened, in percent of screen
width => 100, # fully opened, in percent of screen
backbuffer_size => 100, # keep so many messages
prompt => >,
cursor => _,
);
$console->screen_width($width);
$console->screen_height($height);
$console->toggle($current_time);
$console->message(Hello there!);
$console->input(a);
This package provides you with a quake-style console for your games. The console gathers messages and lets you scroll trough them. It also can display a command line.
This package is just a base class setting up everything, but doesnt actually render anything.
See Games::Console::SDL and Games::Console::OpenGL for subclasses that implement the actual rendering to the screen via SDL and OpenGL, respectively.
<<lessSYNOPSIS
use Games::Console;
my $console = Games::Console->new(
font => $font_object,
background_color => [ 1,1,0],
background_alpha => 0.4,
text_color => [ 1,1,1 ],
text_alpha => 1,
speed => 50, # in percent per second
height => 50, # fully opened, in percent of screen
width => 100, # fully opened, in percent of screen
backbuffer_size => 100, # keep so many messages
prompt => >,
cursor => _,
);
$console->screen_width($width);
$console->screen_height($height);
$console->toggle($current_time);
$console->message(Hello there!);
$console->input(a);
This package provides you with a quake-style console for your games. The console gathers messages and lets you scroll trough them. It also can display a command line.
This package is just a base class setting up everything, but doesnt actually render anything.
See Games::Console::SDL and Games::Console::OpenGL for subclasses that implement the actual rendering to the screen via SDL and OpenGL, respectively.
Download (0.021MB)
Added: 2007-07-25 License: Perl Artistic License Price:
822 downloads
Games::Othello 0.01
Games::Othello is a Perl extension for modelling a game of Othello. more>>
Games::Othello is a Perl extension for modelling a game of Othello.
SYNOPSIS
use Games::Othello;
my $game = Games::Othello->new();
while( !game->over ) {
printf "It is presently %ss move",
($game->whos_move eq b) ? black, white;
my @possible_moves = values $game->possible_moves();
if ( ! @possible_moves ) {
print "You have no moves available, you must pass.
$game->pass_to_opponent;
} else {
foreach ( my $move ) @possible_moves ) {
printf
"You will take %d of your opponents chips if you place your chip on %d,%d",
scalar @{ $move->{chips} }, $move->{x}, $move->{y};
}
my ($locx, $locy) = get_move();
my $flipped = $game->place_chip( $locx, $locy );
}
my $layout = $game->chip_layout();
foreach my $row ( @$layout ) {
foreach my $pos ( @$row ) {
printf %3s,
($pos eq b) ? B # Black occupied square.
: ($pos eq w) ? W # White occupied square.
: # Un-occupied square.
}
print "nn";
}
}
my ($black_score, $white_score) = $game->score;
<<lessSYNOPSIS
use Games::Othello;
my $game = Games::Othello->new();
while( !game->over ) {
printf "It is presently %ss move",
($game->whos_move eq b) ? black, white;
my @possible_moves = values $game->possible_moves();
if ( ! @possible_moves ) {
print "You have no moves available, you must pass.
$game->pass_to_opponent;
} else {
foreach ( my $move ) @possible_moves ) {
printf
"You will take %d of your opponents chips if you place your chip on %d,%d",
scalar @{ $move->{chips} }, $move->{x}, $move->{y};
}
my ($locx, $locy) = get_move();
my $flipped = $game->place_chip( $locx, $locy );
}
my $layout = $game->chip_layout();
foreach my $row ( @$layout ) {
foreach my $pos ( @$row ) {
printf %3s,
($pos eq b) ? B # Black occupied square.
: ($pos eq w) ? W # White occupied square.
: # Un-occupied square.
}
print "nn";
}
}
my ($black_score, $white_score) = $game->score;
Download (0.005MB)
Added: 2006-12-28 License: Perl Artistic License Price:
1041 downloads
Secleted [ 0 ] software to compare
Copyright Notice:
Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future software development. The above games lineofsight 1.0 search only lists software in full, demo and trial versions for free download. Download links are directly from our mirror sites or publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed