ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/bin/pclient
(Generate patch)

Comparing deliantra/Deliantra-Client/bin/pclient (file contents):
Revision 1.177 by root, Mon Apr 24 11:45:17 2006 UTC vs.
Revision 1.178 by root, Tue Apr 25 08:39:18 2006 UTC

39use CFClient::MapWidget; 39use CFClient::MapWidget;
40 40
41$Event::DIED = sub { 41$Event::DIED = sub {
42 CFClient::error $_[1]; 42 CFClient::error $_[1];
43}; 43};
44
45#$SIG{__WARN__} = sub { Carp::cluck $_[0] };#d#
44 46
45our $VERSION = '0.1'; 47our $VERSION = '0.1';
46 48
47my $MAX_FPS = 60; 49my $MAX_FPS = 60;
48my $MIN_FPS = 5; # unused as of yet 50my $MIN_FPS = 5; # unused as of yet
560} 562}
561 563
562sub update_metaserver { 564sub update_metaserver {
563 my ($HOST) = @_; 565 my ($HOST) = @_;
564 566
565 status "fetching metaserver list..."; 567 my $table = $METASERVER->{table};
568 $table->clear;
569 $table->add (0, 0, my $label = new CFClient::UI::Label max_w => $WIDTH * 0.8, text => "fetching metaserver list...");
566 570
567 my $buf; 571 my $buf;
568 572
569 my $fh = new IO::Socket::INET PeerHost => $META_SERVER, Blocking => 0; 573 my $fh = new IO::Socket::INET PeerHost => $META_SERVER, Blocking => 0;
574
575 unless ($fh) {
576 $label->set_text ("unable to contact metaserver: $!");
577 return;
578 }
570 579
571 Event->io (fd => $fh, poll => 'r', cb => sub { 580 Event->io (fd => $fh, poll => 'r', cb => sub {
572 my $res = sysread $fh, $buf, 8192, length $buf; 581 my $res = sysread $fh, $buf, 8192, length $buf;
573 582
574 if (!defined $res) { 583 if (!defined $res) {
575 $_[0]->w->cancel; 584 $_[0]->w->cancel;
576 status "metaserver: $!"; 585 $label->set_text ("error while retrieving server list: $!");
577 } elsif ($res == 0) { 586 } elsif ($res == 0) {
578 $_[0]->w->cancel; 587 $_[0]->w->cancel;
579 status "server list retrieved"; 588 status "server list retrieved";
580 589
581 my $table = $METASERVER->{table}; 590 utf8::decode $buf if utf8::valid $buf;
582 591
583 $table->clear; 592 $table->clear;
584 593
585 my @col = qw(Use #Users Host Uptime Version Description); 594 my @col = qw(Use #Users Host Uptime Version Description);
586 $table->add ($_, 0, new CFClient::UI::Label align => 0, fg => [1, 1, 0], text => $col[$_]) 595 $table->add ($_, 0, new CFClient::UI::Label align => 0, fg => [1, 1, 0], text => $col[$_])
610 $m = [$users, $host, $uptime, $version, $desc]; 619 $m = [$users, $host, $uptime, $version, $desc];
611 620
612 $y++; 621 $y++;
613 622
614 $table->add (0, $y, new CFClient::UI::VBox children => [ 623 $table->add (0, $y, new CFClient::UI::VBox children => [
615 (new CFClient::UI::Button text => " ", connect_activate => sub { 624 (new CFClient::UI::Button text => "Use", connect_activate => sub {
616 $HOST->set_text ($CFG->{host} = $host); 625 $HOST->set_text ($CFG->{host} = $host);
617 }), 626 }),
618 (new CFClient::UI::Empty expand => 1), 627 (new CFClient::UI::Empty expand => 1),
619 ]); 628 ]);
620 629
1464 1473
1465Event::loop; 1474Event::loop;
1466 1475
1467END { CFClient::SDL_Quit } 1476END { CFClient::SDL_Quit }
1468 1477
1478=head1 pclient - Crossfire+ and Crossfire game client
1469 1479
1480Pclient is a Crossfire+ and Crossfire game client.
1481
1482=head2 Features
1483
1484=over 4
1485
1486=item Fullscreen Map
1487
1488PClient can uses a fullscreen map, which greatly enhances how much of the
1489game world you can see.
1490
1491=item Persistent Map Cache (Crossfire+ only)
1492
1493PClient can persistently cache all map data it received from the
1494server. This not only allows it to display an overview map, but also
1495ensures that once-explored areas will be available the next time you want
1496to explore more.
1497
1498=item Hardware acceleration
1499
1500Unlike most Crossfire clients, PClient take advantage of OpenGL hardware
1501acceleration. Most modern graphics cards have difficulties with 2D
1502acceleration, while 3D graphics is accelerated well.
1503
1504=item No arbitrary limits
1505
1506Unlike other Crossfire clients, pclient does not suffer from arbitrary
1507limits (like a fixed amount of face numbers). There are still limits, but
1508they are not arbitrarily low :)
1509
1510=back
1511
1512=head1 FAQ
1513
1514=over 4
1515
1516=item The client is very sluggish and slow, what can I do about this?
1517
1518Most likely, you don't have accelerated OpenGL support. Try to find a
1519newer driver, or a driver from your hardware vendor, that features OpenGL
1520support.
1521
1522If this is not an option, the following Setup options reduce the load and
1523will likely make the client playable with sofwtare rendering (it will
1524still be slow, though):
1525
1526=over 4
1527
1528=item B<Video Mode> should be set as low as possible (e.g. 640x480)
1529
1530=item Enable B<Fast & Ugly> mode
1531
1532=item Disable B<Fog of War>
1533
1534=item Increase B<Map Scale>
1535
1536=back
1537
1538=back
1539
1540=head1 AUTHOR
1541
1542Marc Lehmann <crossfire@schmorp.de>, Robin Redeker <elmex@ta-sa.org>
1543
1544
1545

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines