Games-AIBots

 view release on metacpan or  search on metacpan

bin/aibots  view on Meta::CPAN

    Games::AIBots::init_sound($opt{'m'});
}
if ($opt{'c'}) {
    Games::AIBots::init_console();
}
elsif (!$opt{'o'} and !$opt{'r'}) {
    print "loading image...\n";
    Games::AIBots::init_gui();
}

print "starting game...\n";
$Games::AIBots::Mask = exists $opt{u};
Games::AIBots::init_arg(@ARGV);
Games::AIBots::init_map();
Games::AIBots::do_loop($opt{'r'} * 100);

1;

__END__

=head1 NAME

aibots - An improved clone of A.I.Wars in Perl

=head1 SYNOPSIS

    % aibots [-r|o|c] [-s] [-m] <map> <bot1 bot2...>
    % aibots duel Samurai Thief Sofixti Lancer
    % aibots

=head1 DESCRIPTION

This is a clone of C<A.I. Wars> (L<http://www.tacticalneuronics.com/ai.htm>)
in pure perl, with C<Tk> and console interfaces.

Please consult the above URL for general information about this game.

=head1 OPTIONS

	-c: Console mode
	-s: Silent (Win32 only)
	-m: Music (Win32 only)
	-o: Messages only
	-r: Results only

=head1 ENVIRONMENT

=over

=item Path_AIBots

The Path to AIBots C<pics/>, C<wavs/>, C<bots/>, C<maps/> settings.
Defaults to the install path of C<Games/AIBots>.

=back

=head1 INTERFACE

=head2 The Setting Panel

=head3 Map Menu

The drop-down menu in the bottom-left corner lists all available 
maps. The ones in square brackets (e.g. [Solania]) denotes a "level" 
with pre-defined bots.

Beginners are encouraged to start with the C<Open> or C<Arena> map.

=head3 Change Background

Press this key to cycle through all available backgrounds. This has 
no effects on the actual game.

=head3 Participating Bots

The nine menus in the bottom lets you pick bots to duel with each 
other. Click on an empty menu to select; select the empty entry to 
delete a bot.

=head3 Watch

You could press the watch botton next to each bots, to have its 
statistics listed on the upper-left corner.

=head3 About

Displays author and version info.

=head2 The Control Panel

=head3 Play / Pause

After the maps and bots are selected, the Play button will be 
enabled. Press it to start the duel. All bots act upon their programs 
without human intervension.

You could press the Pause button anytime during the game; press again 
to resume.

=head3 Stop

A game usually ends when there's only one remaining team left on the 
field. Before the game ends normally, you could press the Stop button 
to end a long endgame prematurely.

=head3 Speed

Toggles beterrn slow, medium and fast. You could slow down the game 
during close encounters, and fast-forwards boring intervals.

=head3 Sound 

If the B<Win32::Sound> module is installed, AIBots could play sounds
upon each event.

=head2 The Title Panel

=head3 Watch and Status

When the game is playing, the black button in the upper-left corner 
will display the Bot currently under Watch. Press that button to 



( run in 1.434 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )