Complete.Org: Mailing Lists: Archives: freeciv-java: April 2000:
[FreeCiv-Java] Status of Java Freeciv 1.10.0 (long)
Home

[FreeCiv-Java] Status of Java Freeciv 1.10.0 (long)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-java@xxxxxxxxxxx
Subject: [FreeCiv-Java] Status of Java Freeciv 1.10.0 (long)
From: Brian Duff <bduff@xxxxxxxxxxxxx>
Date: Wed, 26 Apr 2000 13:04:33 +0100

Freeciv4J 1.10.0
Status report 11-26 April 2000

What is this?
-------------

Brian Duff (bduff@xxxxxxxxxxxxx) is currently working on extending the
original java freeciv source written by Artur Biesiadowski
(abies@xxxxxxxxx) so that it is broadly compatible with FreeCiv 1.10.0
(see www.freeciv.org).

This is a regular status update that contains information on what is
currently being done with the Java source.

What I've been doing
--------------------

o Updated Constants.java to reflect 1.10.0 constants. I think this is
mostly correct, but I'll probably need to check it. I've used some
static trickery to simulate enums rather than hard coding constants,
which was prone to errors. This means that the enum constants (which are
static and final) are nevertheless not constant at compile time and
therefore can't be used in switch() statements.

o Updated all net/Pkt*.java and added all missing packets for 1.10.0.

o Created AbstractPacket as a supertype of all net/Pkt*. Standardized
the interface for sending and receiving packets.

o Implemented handlers for dealing with incoming packets from the
server. This replaces all the handle...() methods in Client.java with
subclasses of PacketHandler, one for each type of packet that can be
received. PacketDispacher dispaches incoming packets to the correct
handler.

o Created a RulesetManager that maintains references to all ruleset
packets and does some hashing. Client holds on to one RulesetManager
instance.

o Upgraded the race (now nation) dialog and connection dialogs, and
moved them into the dialog package. Provided an interface to the two
dialogs and wrote a DialogManager that the client holds on to and can
use to retrieve dialogs and manipulate them.

o Changed the server listening stuff in Client to run on a different
thread so that incoming packets can easily influence dialogs that are on
screen. This was needed so that the nations selected by other players
can be disabled while the nation dialog is on the screen. This kind of
thing will probably crop up in other places.

o Provided command classes for all menu items and a base Command class
that subclasses AbstractAction. Restructured all the client menus to
match the 1.10.0 C client.

o Rewrote parts of the UI of the main window (civ info & civ status) so
that they are closer to the 1.10.0 C client. Also made the panels
detachable like the gtk client. These still haven't been fully wired up.

o Converted registry.c and inputfile.c to Java. Needed to do this to
support loading of many client configuration files (e.g. tilespec).
Tested new code on all of the files included in 1.10.0.

o Wrote a quick XPM parser and an XPMImageIcon class which is a Swing
ImageIcon representing an XPM image. I probably ought to use an external
library to do this, but the parser is pretty swift. Tested this with
numerous client images from both engels and trident tilesets and
intro.xpm etc. Added support for creating an XPMImageIcon for a
specified area of an XPM image.

o Started writing TileSpec.java which provides similar functionality to
tilespec.c. Was missing numerous utilites so:

o Wrote Logger.java which provides a logging interface identical in
function to log.c. Wrote Shared.java which is for static functions that
are mostly in shared.c. I've implemented getDataFilename() which
retrieves a full path to a specified data file.

o Got the basics of CivMap working again using the TileSet code for
terrain. The map is being displayed for the first time since I started
working on this stuff, but no units, improvements or cities yet. I'm a
bit concerned about performance; I need to pull the original code from
CVS and compare the map rendering speeds to see whether it's something
I've done. Maybe need to use an offscreen buffer. Kudos to Artur for his
extremely cool tilemap code; took me a while to get the hang of it but
it all makes sense now :)

o Partial pruning of Client.java; removing methods that I've made
obsolete by restructuring other bits of the source. Still far from
complete (see below).

o Used jikes. A lot.

What still needs to be done?
----------------------------

o Dialogs

Most of the dialogs in freeciv haven't been implemented, or need looking
at:
  - City Screen
  - Worklists
  - Message Window
  - Advances
  - Numerous others that I don't have a clear idea of yet.

o UI

In general there are some UI improvements we'd like to see in freeciv4j.


    - textured dialog backgrounds would be quite nice and would give
things more of a "civ2" feel.

    - .. other stuff to follow

o Networking

Packets involved past the very start of the game still need to be
tested.

Handlers need to be written for a large number of incoming packets that
can be received after the game has been launched on the server.

o Infrastructure

The interface to Client.java needs to be properly pinned down. At the
moment, lots of stuff is exposed that shouldn't be, and there are
screeds of redundant code.

Need to write some documentation on the internals.

Need to set up a web site.

Need to branch the CVS code so that other people can access this code;
also need to provide access to old (1.8) stable code from the web site,
ideally with a compiled version.

o I18n

I may have un-internationalized some stuff while I've been working; need
to go through and check that strings are properly _()ed.

o Other stuff

I'm sure there's a huge amount of other stuff to be done; I'll add it as
I think of it.


How can I help?
---------------

At the moment, there's not a lot of documentation on what I'm doing. I'm
trying to make sure the code is as self documenting as possible, and
I'll hopefully be producing Javadoc soon. I probably need to write some
additional documentation on the overall structure of things.

If you want to help with the effort to port freeciv 1.10.0 to java,
please email bduff@xxxxxxxxxxxxx.

Attachment: bduff.vcf
Description: Card for Brian Duff


[Prev in Thread] Current Thread [Next in Thread]
  • [FreeCiv-Java] Status of Java Freeciv 1.10.0 (long), Brian Duff <=