games 2009
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 2130
Games::3D 0.09
Games::3D is a package containing an object system for (not only) 3D games. more>>
Games::3D is a package containing an object system for (not only) 3D games.
SYNOPSIS
use Games::3D::World;
my $world = Games::3D::World->new();
$world->save_to_file( $filename );
my $loaded = Games::3D::world->load_from_file( $filename );
my $thing1 = $world->add ( Games::3D::Thingy->new( ... ) );
my $thing2 = $world->add ( Games::3D::Thingy->new( ... ) );
$world->link($thing1, $thing2);
Games::3D::World provides you with a container class that will contain every object in your game object system. This are primarily objects that have states, change these states and need to announce the states to other objects.
The Games::3D::World container also enables you to save and restore snapshots of your objects system.
Basic things that you object system contains are derived from a class called Games::3D::Thingy. These can represent physical objects (buttons, levers, doors, lights etc) as well as virtual objects (trigger, sensors, links, markers, sound sources etc).
You can link Thingys together, either directly or via Games::3D::Links. The links have some more features than direct linking, which are explained below.
This package also provides you with Games::3D::Sensor, a class for objects that sense state changes and act upon them. Or not, depending on the sensor. Sensors are primarily used to watch for certain conditions and then act when they are met. Examples are the death of an object, values that go below a certain threshold etc.
State changes are transported in the object system with signals.
<<lessSYNOPSIS
use Games::3D::World;
my $world = Games::3D::World->new();
$world->save_to_file( $filename );
my $loaded = Games::3D::world->load_from_file( $filename );
my $thing1 = $world->add ( Games::3D::Thingy->new( ... ) );
my $thing2 = $world->add ( Games::3D::Thingy->new( ... ) );
$world->link($thing1, $thing2);
Games::3D::World provides you with a container class that will contain every object in your game object system. This are primarily objects that have states, change these states and need to announce the states to other objects.
The Games::3D::World container also enables you to save and restore snapshots of your objects system.
Basic things that you object system contains are derived from a class called Games::3D::Thingy. These can represent physical objects (buttons, levers, doors, lights etc) as well as virtual objects (trigger, sensors, links, markers, sound sources etc).
You can link Thingys together, either directly or via Games::3D::Links. The links have some more features than direct linking, which are explained below.
This package also provides you with Games::3D::Sensor, a class for objects that sense state changes and act upon them. Or not, depending on the sensor. Sensors are primarily used to watch for certain conditions and then act when they are met. Examples are the death of an object, values that go below a certain threshold etc.
State changes are transported in the object system with signals.
Download (0.032MB)
Added: 2006-10-02 License: Perl Artistic License Price:
1124 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::Score 0.02
Games::Score is a Perl module to keep track of score in games . more>>
Games::Score is a Perl module to keep track of score in games .
SYNOPSIS
use Games::Score;
# these three values are the default ones, by the way
Games::Score->default_score(0);
Games::Score->default_step(1);
Games::Score->step_method(inc);
# start two players
my $player1 = Games::Score->new();
my $player2 = Games::Score->new();
# set a winning condition
Games::Score->victory_is( sub { $_[0] >= 20 } );
# and something to do if it is achieved
Games::Score->on_victory_do( sub { print "Won!" } );
# give points to the players
$player1->add(2);
$player2->step();
# look at section FUNCTIONS for more functionalities, such as
Games::Score->invalidate_if( sub { $_[0] > 20 } );
Games::Score can be use to keep track of several players points in a game, regardless of the starting amount of points, winning and/or losing conditions, etc.
It provides several useful methods so that the user doesnt have to keep testing values to see if theyre valid or if the player condition has changed.
<<lessSYNOPSIS
use Games::Score;
# these three values are the default ones, by the way
Games::Score->default_score(0);
Games::Score->default_step(1);
Games::Score->step_method(inc);
# start two players
my $player1 = Games::Score->new();
my $player2 = Games::Score->new();
# set a winning condition
Games::Score->victory_is( sub { $_[0] >= 20 } );
# and something to do if it is achieved
Games::Score->on_victory_do( sub { print "Won!" } );
# give points to the players
$player1->add(2);
$player2->step();
# look at section FUNCTIONS for more functionalities, such as
Games::Score->invalidate_if( sub { $_[0] > 20 } );
Games::Score can be use to keep track of several players points in a game, regardless of the starting amount of points, winning and/or losing conditions, etc.
It provides several useful methods so that the user doesnt have to keep testing values to see if theyre valid or if the player condition has changed.
Download (0.007MB)
Added: 2006-12-27 License: Perl Artistic License Price:
1031 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
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
Games::Chess 0.003
Games::Chess Perl module represent chess positions and games. more>>
Games::Chess Perl module represent chess positions and games.
SYNOPSIS
use Games::Chess qw(:constants);
my $p = Games::Chess::Position->new;
$p->at(0,0,BLACK,ROOK);
$p->at(7,7,WHITE,ROOK);
print $p->to_text;
The Games::Chess package provides the class Games::Chess::Piece to represent chess pieces, and the class Games::Chess::Position to represent a position in a chess game. Objects can be instantiated from data in standard formats and exported to these formats.
NOTATION
See Games::Chess::PGN for full details of the notations.
SAN
Standard Algebraic Notation. The modern international notation for chess games. For example,
1. e4 e5
2. f4 exf4
3. Nf3 g5
FEN
Forsythe-Edwards Notation. A compact representation for chess positions. FEN specifies the piece placement, the active color, the castling availability, the en passant target square, the halfmove clock, and the fullmove number as six fields separated by spaces. For example, the opening position is described in FEN as follows:
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
PGN
Portable Game Notation. A notation for chess games, including the moves, commentary, variations, and metadata such as the players, the event, the round number, and the date of the match. For example,
[Event "F/S Return Match"]
[Site "Belgrade, Serbia JUG"]
[Date "1992.11.04"]
[Round "29"]
[White "Fischer, Robert J."]
[Black "Spassky, Boris V."]
[Result "1/2-1/2"]
1. e4 e5 2. Nf3 Nc6 3. Bb5 a6 4. Ba4 Nf6 5. O-O Be7 6. Re1
b5 7. Bb3 d6 8. c3 O-O 9. h3 Nb8 10. d4 Nbd7 11. c4 c6
12. cxb5 axb5 13. Nc3 Bb7 14. Bg5 b4 15. Nb1 h6 16. Bh4 c5
17. dxe5 Nxe4 18. Bxe7 Qxe7 19. exd6 Qf6 20. Nbd2 Nxd6
21. Nc4 Nxc4 22. Bxc4 Nb6 23. Ne5 Rae8 24. Bxf7+ Rxf7
25. Nxf7 Rxe1+ 26. Qxe1 Kxf7 27. Qe3 Qg5 28. Qxg5 hxg5
29. b3 Ke6 30. a3 Kd6 31. axb4 cxb4 32. Ra5 Nd5 33. f3 Bc8
34. Kf2 Bf5 35. Ra7 g6 36. Ra6+ Kc5 37. Ke1 Nf4 38. g3 Nxh3
39. Kd2 Kb5 40. Rd6 Kc5 41. Ra6 Nf2 42. g4 Bd3 43. Re6
1/2-1/2
EPD
Extended Position Description. An extensible notation based on FEN. Intended for data interchange between chess-playing programs and for the construction of opening databases. Not used by Games::Chess.
<<lessSYNOPSIS
use Games::Chess qw(:constants);
my $p = Games::Chess::Position->new;
$p->at(0,0,BLACK,ROOK);
$p->at(7,7,WHITE,ROOK);
print $p->to_text;
The Games::Chess package provides the class Games::Chess::Piece to represent chess pieces, and the class Games::Chess::Position to represent a position in a chess game. Objects can be instantiated from data in standard formats and exported to these formats.
NOTATION
See Games::Chess::PGN for full details of the notations.
SAN
Standard Algebraic Notation. The modern international notation for chess games. For example,
1. e4 e5
2. f4 exf4
3. Nf3 g5
FEN
Forsythe-Edwards Notation. A compact representation for chess positions. FEN specifies the piece placement, the active color, the castling availability, the en passant target square, the halfmove clock, and the fullmove number as six fields separated by spaces. For example, the opening position is described in FEN as follows:
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
PGN
Portable Game Notation. A notation for chess games, including the moves, commentary, variations, and metadata such as the players, the event, the round number, and the date of the match. For example,
[Event "F/S Return Match"]
[Site "Belgrade, Serbia JUG"]
[Date "1992.11.04"]
[Round "29"]
[White "Fischer, Robert J."]
[Black "Spassky, Boris V."]
[Result "1/2-1/2"]
1. e4 e5 2. Nf3 Nc6 3. Bb5 a6 4. Ba4 Nf6 5. O-O Be7 6. Re1
b5 7. Bb3 d6 8. c3 O-O 9. h3 Nb8 10. d4 Nbd7 11. c4 c6
12. cxb5 axb5 13. Nc3 Bb7 14. Bg5 b4 15. Nb1 h6 16. Bh4 c5
17. dxe5 Nxe4 18. Bxe7 Qxe7 19. exd6 Qf6 20. Nbd2 Nxd6
21. Nc4 Nxc4 22. Bxc4 Nb6 23. Ne5 Rae8 24. Bxf7+ Rxf7
25. Nxf7 Rxe1+ 26. Qxe1 Kxf7 27. Qe3 Qg5 28. Qxg5 hxg5
29. b3 Ke6 30. a3 Kd6 31. axb4 cxb4 32. Ra5 Nd5 33. f3 Bc8
34. Kf2 Bf5 35. Ra7 g6 36. Ra6+ Kc5 37. Ke1 Nf4 38. g3 Nxh3
39. Kd2 Kb5 40. Rd6 Kc5 41. Ra6 Nf2 42. g4 Bd3 43. Re6
1/2-1/2
EPD
Extended Position Description. An extensible notation based on FEN. Intended for data interchange between chess-playing programs and for the construction of opening databases. Not used by Games::Chess.
Download (0.048MB)
Added: 2007-07-24 License: Perl Artistic License Price:
827 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
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::Go::SGF 0.05
Games::Go::SGF is a Perl module that can parse and dissect Standard Go Format files. more>>
Games::Go::SGF is a Perl module that can parse and dissect Standard Go Format files.
SYNOPSIS
use Games::Go::SGF;
my $sgf = new Games::Go::SGF($sgfdata);
print "Game played on ".$sgf->date."n";
print $sgf->white. " (W) vs. ".$sgf->black." (B)n";
print "Board size: ".$sgf->size.". Komi: ".$sgf->komi."n";
while ($move = $sgf->move($move_no++)) {
print "$move_no: ".$move->move,"n";
}
This is a very simple SGF file parser, of currently limited functionality. It can read and step through SGF files, follow variations, and so on. Its good enough for getting simple statistics about games of Go, and building up Games::Go::Board objects representing games stored as SGF.
$sgf->move returns either a normal Games::Go::SGF::Node or a Games::Go::SGF::Variation object. They behave exactly the same, but the variation object has the additional methods mainline() to get the main line of the game, variation($n) to get the first node in the nth variation, and variations to retrieve an array of variations. $variation->move will, by default, follow the mainline.
<<lessSYNOPSIS
use Games::Go::SGF;
my $sgf = new Games::Go::SGF($sgfdata);
print "Game played on ".$sgf->date."n";
print $sgf->white. " (W) vs. ".$sgf->black." (B)n";
print "Board size: ".$sgf->size.". Komi: ".$sgf->komi."n";
while ($move = $sgf->move($move_no++)) {
print "$move_no: ".$move->move,"n";
}
This is a very simple SGF file parser, of currently limited functionality. It can read and step through SGF files, follow variations, and so on. Its good enough for getting simple statistics about games of Go, and building up Games::Go::Board objects representing games stored as SGF.
$sgf->move returns either a normal Games::Go::SGF::Node or a Games::Go::SGF::Variation object. They behave exactly the same, but the variation object has the additional methods mainline() to get the main line of the game, variation($n) to get the first node in the nth variation, and variations to retrieve an array of variations. $variation->move will, by default, follow the mainline.
Download (0.003MB)
Added: 2007-07-12 License: Perl Artistic License Price:
835 downloads
Games::PerlWar 0.02
Games::PerlWar is a Perl variant of the classic Corewar game. more>>
Games::PerlWar is a Perl variant of the classic Corewar game.
This is a sparring program, similar to the programmed reality of the Matrix.
It has the same basic rules, rules like gravity. What you must learn is that
these rules are no different than the rules of a computer system. Some of
them can be bent, others can be broken. - Morpheus
PerlWar is inspired by the classic http://www.corewar.info/|Corewar game. In this game, players pit snippets of Perl code (called agents) against each other in order to gain control of the vicious virtual battlefield known as... the Array.
GAME PARAMETERS
Size of the Array
The number of cells that the Array possesses. Each cell can hold one agent.
Agent Maximal Size
The maximal length, in characters, of an agent. If an agent is or becomes larger than this limit, it automatically segfaults upon execution.
Game Maximal Number of Iterations
The maximal number of rounds that can be played before a game is declared over.
<<lessThis is a sparring program, similar to the programmed reality of the Matrix.
It has the same basic rules, rules like gravity. What you must learn is that
these rules are no different than the rules of a computer system. Some of
them can be bent, others can be broken. - Morpheus
PerlWar is inspired by the classic http://www.corewar.info/|Corewar game. In this game, players pit snippets of Perl code (called agents) against each other in order to gain control of the vicious virtual battlefield known as... the Array.
GAME PARAMETERS
Size of the Array
The number of cells that the Array possesses. Each cell can hold one agent.
Agent Maximal Size
The maximal length, in characters, of an agent. If an agent is or becomes larger than this limit, it automatically segfaults upon execution.
Game Maximal Number of Iterations
The maximal number of rounds that can be played before a game is declared over.
Download (0.031MB)
Added: 2006-12-28 License: Perl Artistic License Price:
1036 downloads
Games::Alak 0.18
Games::Alak is a simple game-tree implementation of a gomoku-like game. more>>
Games::Alak is a simple game-tree implementation of a gomoku-like game.
SYNOPSIS
% perl -MGames::Alak -e Games::Alak::play
...Or just run Alak.pm as if it were a program...
...Program responds with output, and a prompt:
Lookahead set to 3. I am X, you are O.
Enter h for help
X moves from 1 to 5, yielding .xxxx..oooo
alak>
...and now you enter the commands to play.
This module implements a simple game-tree system for the computer to play against the user in a game of Alak. You can just play the game for fun; or you can use this module as a starting point for understanding game trees (and implementing smarter strategy -- the modules current logic is fairly simple-minded), particularly after reading my Perl Journal #18 article on trees, which discusses this modules implementation of game trees as an example of general tree-shaped data structures.
<<lessSYNOPSIS
% perl -MGames::Alak -e Games::Alak::play
...Or just run Alak.pm as if it were a program...
...Program responds with output, and a prompt:
Lookahead set to 3. I am X, you are O.
Enter h for help
X moves from 1 to 5, yielding .xxxx..oooo
alak>
...and now you enter the commands to play.
This module implements a simple game-tree system for the computer to play against the user in a game of Alak. You can just play the game for fun; or you can use this module as a starting point for understanding game trees (and implementing smarter strategy -- the modules current logic is fairly simple-minded), particularly after reading my Perl Journal #18 article on trees, which discusses this modules implementation of game trees as an example of general tree-shaped data structures.
Download (0.009MB)
Added: 2007-01-02 License: Perl Artistic License Price:
1027 downloads
Games::WoW::PVP 0.01
Games::WoW::PVP is a Perl module with the great new Games::WoW::PVP! more>>
Games::WoW::PVP is a Perl module with the great new Games::WoW::PVP!
SYNOPSIS
Quick summary of what the module does.
Perhaps a little code snippet.
use Games::WoW::PVP;
my $WoW = Games::WoW::PVP->new();
# looking for a character
my %hash = $WoW->search_player(
{ country => EU, # EU europe US us
realm => conseil des ombres, # name of the realm
faction => h, # h horde a ally
character => raspa, # name of the player
}
);
# looking for top players
my %hash = $WoW->top(
{ country => EUR,
realm => elune,
faction => a,
}
);
<<lessSYNOPSIS
Quick summary of what the module does.
Perhaps a little code snippet.
use Games::WoW::PVP;
my $WoW = Games::WoW::PVP->new();
# looking for a character
my %hash = $WoW->search_player(
{ country => EU, # EU europe US us
realm => conseil des ombres, # name of the realm
faction => h, # h horde a ally
character => raspa, # name of the player
}
);
# looking for top players
my %hash = $WoW->top(
{ country => EUR,
realm => elune,
faction => a,
}
);
Download (0.004MB)
Added: 2007-01-05 License: Perl Artistic License Price:
1025 downloads
Games::Irrlicht 0.04
Games::Irrlicht is a Perl module that use the Irrlicht 3D Engine in Perl. more>>
Games::Irrlicht is a Perl module that use the Irrlicht 3D Engine in Perl.
SYNOPSIS
package MyGame;
use strict;
use base Games::Irrlicht;
use Games::Irrlicht::Constants; get EDT_SOFTWARE etc
# override methods:
The Why
When building a game or screensaver displaying some continously running animation, a couple of basics need to be done to get a smooth animation and to care of copying with varying speeds of the system. Ideally, the animation displayed should be always the same, no matter how fast the system is.
This not only includes different systems (a PS/2 for instance would be slower than a 3 Ghz PC system), but also changes in the speed of the system over time, for instance when a background process uses some CPU time or the complexity of the scene changes.
In many old (especial DOS) games, like the famous Wing Commander series, the animation would be drawn simple as fast as the system could, meaning that if you would try to play such a game on a modern machine it we end before you had the chance to click a button, simple because it wizzes a couple 10,000 frames per second past your screen.
While it is quite simple to restrict the maximum framerate possible, care must be taken to not just "burn" surplus CPU cycles. Instead the application should free the CPU whenever possible and give other applications/thread a chance to run. This is especially important for low-priority applications like screensavers.
Games::Irrlicht makes this possible for you without you needing to worry about how this is done. It will restrict the frame rate to a possible maximum and tries to achive the average framerate as close as possible to this maximum.
Games::Irrlicht also monitors the average framerate and gives you access to this value, so that you can, for instance, adjust the scene complexity based on the current framerate. You can access the current framerate, averaged over the last second (1000 ms) by calling current_fps.
Frame-rate Independend Clock
Now that our application is drawing frames (via the method draw_frame, which you should override in a subclass), we need a method to decouple the animation speed from the framerate.
If we would simple put put an animation step every frame, we would get some sort of Death of the Fast Machine" effect ala Wing Commander. E.g. if the system manages only 10 FPS, the animation would be slower than when we do 60 FPS.
To achive this, SDL::App::FPS features a clock, which runs independed of the current frame rate (and actually, independend of the systems clock, but more on this in the next section).
You can access it via a call to current_time, and it will return the ticks e.g. the number of milliseconds elapsed since the start of the application.
To effectively decouple animation speed from FPS, get at each frame the current time, then move all objects (or animation sequences) according to their speed and display them at the location that matches the time at the start of the frame. See examples/ for an example on how to do this.
Note that it is better to draw all objects according to the time at the start of the frame, and not according to the time when you draw a particular object. Or in other words, treat the time like it is standing still when drawing a complete frame. Thus each frame becomes a snapshot in time, and you dont get nasty sideeffects like one object beeing always "behind" the others just because it gets drawn earlier.
Time Warp
Now that we have a constant animation speed independend from framerate or system speed, lets have some fun.
Since all our animation steps are coupled to the current time, we can play tricks with the current time.
The function time_warp lets you access a time warp factor. The default is 1.0, but you can set it to any value you like. If you set it, for instance to 0.5, the time will pass only half as fast as it used to be. This means instant slow motion! And when you really based all your animation on the current time, as you should, then it will really slow down your entire game to a crawl.
Likewise a time warp of 2 lets the time pass twice as fast. There are virtually no restrictions to the time warp.
For instance, a time warp greater than one lets the player pass boring moments in a game, for instance when you need to wait for certain events in a strategy game, like your factory beeing completed.
Try to press the left (fast forward), right (slow motion) and middle (normal) mousebuttons in the example application and watch the effect.
If you are very bored, press the b key and see that even negative time warps are possible...
Ramping Time Warp
Now, setting the time war to factor of N is nice, but sometimes you want to make dramatic effects, like slowly freezing the time into ultra slow motion or speeding it up again.
For this, ramp_time_warp can be used. You give it a time warp factor you want to reach, and a time (based on real time, not the warped, but you can of course change this). Over the course of the time you specified, the time warp factor will be adapted until it reaches the new value. This means it is possible to slowly speeding up or down.
You can also check whether the time warp is constant or currently ramping by using time_is_ramping. When a ramp is in effect, call ramp_time_warp without arguments to get the current parameters. See below for details.
The example application uses the ramping effect instead instant time warp.
Event handlers
This section describes events as external events that typically happen due to user intervention.
Such events are keypresses, mouse movement, mouse button presses, or just the flipping of the power switch. Of course the last event cannot be handled in a sane way by our framework.
All the events are checked and handled by Games::Irrlicht automatically. The event QUIT (which denotes that the application should shut down) is also carried out automatically. If you want to do some tidying up when this happens, override the method quit_handler.
The event checking and handling is done at the start of each frame. This means no event will happen while you draw the current frame. Well, it will happen, but the action caused by that event will delayed until the next frame starts. This simplifies the frame drawing routine tremendously, since you know that your world will be static until the next frame.
<<lessSYNOPSIS
package MyGame;
use strict;
use base Games::Irrlicht;
use Games::Irrlicht::Constants; get EDT_SOFTWARE etc
# override methods:
The Why
When building a game or screensaver displaying some continously running animation, a couple of basics need to be done to get a smooth animation and to care of copying with varying speeds of the system. Ideally, the animation displayed should be always the same, no matter how fast the system is.
This not only includes different systems (a PS/2 for instance would be slower than a 3 Ghz PC system), but also changes in the speed of the system over time, for instance when a background process uses some CPU time or the complexity of the scene changes.
In many old (especial DOS) games, like the famous Wing Commander series, the animation would be drawn simple as fast as the system could, meaning that if you would try to play such a game on a modern machine it we end before you had the chance to click a button, simple because it wizzes a couple 10,000 frames per second past your screen.
While it is quite simple to restrict the maximum framerate possible, care must be taken to not just "burn" surplus CPU cycles. Instead the application should free the CPU whenever possible and give other applications/thread a chance to run. This is especially important for low-priority applications like screensavers.
Games::Irrlicht makes this possible for you without you needing to worry about how this is done. It will restrict the frame rate to a possible maximum and tries to achive the average framerate as close as possible to this maximum.
Games::Irrlicht also monitors the average framerate and gives you access to this value, so that you can, for instance, adjust the scene complexity based on the current framerate. You can access the current framerate, averaged over the last second (1000 ms) by calling current_fps.
Frame-rate Independend Clock
Now that our application is drawing frames (via the method draw_frame, which you should override in a subclass), we need a method to decouple the animation speed from the framerate.
If we would simple put put an animation step every frame, we would get some sort of Death of the Fast Machine" effect ala Wing Commander. E.g. if the system manages only 10 FPS, the animation would be slower than when we do 60 FPS.
To achive this, SDL::App::FPS features a clock, which runs independed of the current frame rate (and actually, independend of the systems clock, but more on this in the next section).
You can access it via a call to current_time, and it will return the ticks e.g. the number of milliseconds elapsed since the start of the application.
To effectively decouple animation speed from FPS, get at each frame the current time, then move all objects (or animation sequences) according to their speed and display them at the location that matches the time at the start of the frame. See examples/ for an example on how to do this.
Note that it is better to draw all objects according to the time at the start of the frame, and not according to the time when you draw a particular object. Or in other words, treat the time like it is standing still when drawing a complete frame. Thus each frame becomes a snapshot in time, and you dont get nasty sideeffects like one object beeing always "behind" the others just because it gets drawn earlier.
Time Warp
Now that we have a constant animation speed independend from framerate or system speed, lets have some fun.
Since all our animation steps are coupled to the current time, we can play tricks with the current time.
The function time_warp lets you access a time warp factor. The default is 1.0, but you can set it to any value you like. If you set it, for instance to 0.5, the time will pass only half as fast as it used to be. This means instant slow motion! And when you really based all your animation on the current time, as you should, then it will really slow down your entire game to a crawl.
Likewise a time warp of 2 lets the time pass twice as fast. There are virtually no restrictions to the time warp.
For instance, a time warp greater than one lets the player pass boring moments in a game, for instance when you need to wait for certain events in a strategy game, like your factory beeing completed.
Try to press the left (fast forward), right (slow motion) and middle (normal) mousebuttons in the example application and watch the effect.
If you are very bored, press the b key and see that even negative time warps are possible...
Ramping Time Warp
Now, setting the time war to factor of N is nice, but sometimes you want to make dramatic effects, like slowly freezing the time into ultra slow motion or speeding it up again.
For this, ramp_time_warp can be used. You give it a time warp factor you want to reach, and a time (based on real time, not the warped, but you can of course change this). Over the course of the time you specified, the time warp factor will be adapted until it reaches the new value. This means it is possible to slowly speeding up or down.
You can also check whether the time warp is constant or currently ramping by using time_is_ramping. When a ramp is in effect, call ramp_time_warp without arguments to get the current parameters. See below for details.
The example application uses the ramping effect instead instant time warp.
Event handlers
This section describes events as external events that typically happen due to user intervention.
Such events are keypresses, mouse movement, mouse button presses, or just the flipping of the power switch. Of course the last event cannot be handled in a sane way by our framework.
All the events are checked and handled by Games::Irrlicht automatically. The event QUIT (which denotes that the application should shut down) is also carried out automatically. If you want to do some tidying up when this happens, override the method quit_handler.
The event checking and handling is done at the start of each frame. This means no event will happen while you draw the current frame. Well, it will happen, but the action caused by that event will delayed until the next frame starts. This simplifies the frame drawing routine tremendously, since you know that your world will be static until the next frame.
Download (0.039MB)
Added: 2006-09-30 License: Perl Artistic License Price:
1126 downloads
Super Gamer 2
Super Gamer is a Live DVD that is based on the core of PCLinuxOS. more>>
Super Gamer is a Live DVD that is based on the core of PCLinuxOS. It is put together by Darin, a community member. Darin started out making the Super Gamer for his own, and some friends. Soon others got a copy and decided they liked it.
They jumped onboard to help test and develope. The Super Gamer is optimized for a gaming computer environment, with some tweaks to help speed up running from the LiveDVD. Extra games were added along with some demos of proprietary games. All Games are Linux Native. Users wishing to run Windows Native games, may install Wine or a Wine related application such as Cedega.
Please remember that the Super Gamer is built from PCLinuxOS. For this reason, if you wish to donate to the Super Gamer, you cannot, but you can donate to PCLinuxOS, or buy from On-Disk.
Since the Gamer is developed on the pure core of PCLinuxOS, updating and adding other programs from the PCLOSs repository is completely compatible, and easy.
<<lessThey jumped onboard to help test and develope. The Super Gamer is optimized for a gaming computer environment, with some tweaks to help speed up running from the LiveDVD. Extra games were added along with some demos of proprietary games. All Games are Linux Native. Users wishing to run Windows Native games, may install Wine or a Wine related application such as Cedega.
Please remember that the Super Gamer is built from PCLinuxOS. For this reason, if you wish to donate to the Super Gamer, you cannot, but you can donate to PCLinuxOS, or buy from On-Disk.
Since the Gamer is developed on the pure core of PCLinuxOS, updating and adding other programs from the PCLOSs repository is completely compatible, and easy.
Download (MB)
Added: 2007-01-02 License: GPL (GNU General Public License) Price:
1073 downloads
Games::Blackjack 0.04
Games::Blackjack is a Perl module with Blackjack Utility Classes. more>>
Games::Blackjack is a Perl module with Blackjack Utility Classes.
SYNOPSIS
use Games::Blackjack;
# Create new shoe of cards
my $shoe = Games::Blackjack::Shoe->new(nof_decks => 4);
# Create two hands, player/dealer
my $player = Games::Blackjack::Hand->new(shoe => $shoe);
my $dealer = Games::Blackjack::Hand->new(shoe => $shoe);
# Two dealer cards
$dealer->draw();
print "Dealer: ", $dealer->as_string(), "n";
$dealer->draw(); # 2nd card not shown
$player->draw();
$player->draw();
print "Player: ", $player->as_string, "(",
$player->count_as_string, ")n";
# Lets assume player decides to stand. Dealers turn.
# Dealer plays Las Vegas rules
while(!$dealer->busted() and
$dealer->count("soft") < 17) {
$dealer->draw();
}
# Show winner (-1: Dealer, 1: Player, 1.5: Player Blackjack)
print "Player score: ", $player->score($dealer), "n";
<<lessSYNOPSIS
use Games::Blackjack;
# Create new shoe of cards
my $shoe = Games::Blackjack::Shoe->new(nof_decks => 4);
# Create two hands, player/dealer
my $player = Games::Blackjack::Hand->new(shoe => $shoe);
my $dealer = Games::Blackjack::Hand->new(shoe => $shoe);
# Two dealer cards
$dealer->draw();
print "Dealer: ", $dealer->as_string(), "n";
$dealer->draw(); # 2nd card not shown
$player->draw();
$player->draw();
print "Player: ", $player->as_string, "(",
$player->count_as_string, ")n";
# Lets assume player decides to stand. Dealers turn.
# Dealer plays Las Vegas rules
while(!$dealer->busted() and
$dealer->count("soft") < 17) {
$dealer->draw();
}
# Show winner (-1: Dealer, 1: Player, 1.5: Player Blackjack)
print "Player score: ", $player->score($dealer), "n";
Download (0.006MB)
Added: 2006-12-28 License: Perl Artistic License Price:
1035 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 2009 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