                     THE PORTABLE HOST DEVELOPMENT KIT
                                 Version 4.4


What is the Portable Host Development Kit?
==========================================

The Portable Host Development Kit (or PDK) is a development tool for use by
programmers of VGA Planets host add-ons and utilities. VGA Planets is a
play-by-email game for the IBM PC written by Tim Wisseman. The PDK
liberates programmers from having to worry about file formats and data
structures and provides a simple programming interface in their place.
Programmers can concentrate on writing innovative utilities and add-ons
without having to reinvent the wheel as far as basic input, output, and
data structure accesses are concerned.

Using the PDK to write a host utility or add-on has several advantages:

      * There's no need to know or understand the host file formats and
        data structures. All access to host data is through a simple
        programming interface.

      * There's no need to write code to read and/or write the host files.
        One simple function call can be used to read all the data files and
        another single call can be used to write them all back out!

      * The PDK is portable to multiple hardware platforms; in fact, all of
        the platforms that are supported by PHOST are also supported by the
        PDK. The programming interface to the PDK stays the same regardless
        of what platform is used. This makes porting the add-on or utility
        a snap! Simply recompile on a new platform with the PDK for that
        platform.

      * The PDK keeps up with changes in the file formats so your code
        doesn't have to. When a new PDK is released, simply recompile with
        the latest version and your program is instantly compatible with
        the latest formats.

Best of all, the PDK is freeware (but not in the public domain). You can
use the PDK at no cost to write your programs. You can even sell your
programs if you wish; there are no royalties or other fees. You must,
however, observe the restrictions described in the file LEGAL.DOC that
comes with the PDK distribution.

This version of the PDK supports PHost 3.x and 4.x, and has
rudimentary support for HOST.


What languages are supported?
=============================

The PDK was written in C. Thus, C and C++ programs may be written using the
PDK. Other languages may be used if they provide an interface to C-type
variable and function declarations but this has not been attempted.

For Win32 systems several PDK versions are available to support different
compilers. Currently we support BorlandC++ 5.0, Borland/Inprise CBuilder 4
and Cygwin GCC.

For DOS, you should use DJGPP 2 to compile the PDK. Using an older compiler
(Turbo C, for example), is still possible in theory, but if you run into
problems you're probably on your own.


How to get it?
==============

The latest version of the PDK distribution can be found at:

    http://phost-contrib.sourceforge.net/

or one of the PHost web sites. The most recent "official" version is
4.4 as of March 2003.

You can at any time get the PDK via CVS from SourceForge, see install.txt.


What does the PDK *NOT* do?
===========================

The PDK is still being expanded and enhanced so there are some functions
that will be added as time goes by. Currently, though, the PDK is complete
enough to allow for serious application development.

It should be noted that the PDK provides no mechanisms for tampering with
the shareware/registered distinction in player turn files. That is, the PDK
cannot be used to write a utility that will make a shareware player appear
to be registered to the HOST/PHOST program.


How do I get started?
=====================

Read through the *.TXT files that come with this distribution.

Read through some of the example programs (EX*.C files) to get an idea
how the PDK works. You may even want to try compiling them, running
them, and modifying them to "get your hands dirty" with PDK
programming. Once you have obtained a feel for how to program with the
PDK, browse through the PDK.TEXI file for a complete description of the
PDK application programming interface (API).


The Distribution Files
======================

Here is a description of the files that are of interest for people who
want to write programs with the PDK (that is, just use the PDK instead
of hacking it).

     PDK.TXT         -- You're reading it
     LEGAL.TXT       -- Legal information for the PDK
     INSTALL.TXT     -- Guide to installing the PDK
     CHANGES.TXT     -- Revision history of the PDK
     PDK.INF         -- The main documentation in GNU Info format (use
                        an Info reader of your choice to read it)
     PDK-API.TXT     -- The main documentation in plain text format.
     PHOSTPDK.H      -- Header file for the PDK library
     EX1.C           -- PDK example program: counts the number of ships,
                        planets, and bases that a player has and reports
                        them in a player message
     EX2.C           -- PDK example program: alternative mine decay
                        algorithm reduces minefields so that the radius
                        changes by a constant amount every turn
     EX3.C           -- PDK example program: Micheal Keane's Invasion
                        program ported to use the PDK. Score points for
                        invading homeworlds and any other world the host
                        indicates.
     EX4.C           -- PDK example program: a simple replacement for
                        MASTER. No options, no scenarios, just an example
                        and possibly a template for bigger and better
                        things.
     EX5.C           -- PDK example program: an add-on example using the
                        AUXHOST facility of HOST/PHOST 3.2. This program
                        implements a simple base-to-base transporter that
                        is able to transfer cargo from one starbase to
                        another.
     EX6.C           -- PDK example program: a text-only battle simulator
                        with minimal functionality. It is mean to
                        demonstrate the interface to the PDK combat module.
     EX7.C           -- PDK example program: util.dat access. This can
                        be used to send files to players.
     EX8.C           -- PDK example program: score demonstration
     EX9.C           -- PDK example program: command processor. This
                        implements a simple wire-transfer between planets
                        using the command processor.
     EX10.C          -- PDK example program: list hull functions
     NULL.C          -- Null add-on. Framework for your own stuff.


Feedback
========

There is a mailing list for the PDK and VGA Planets programming in
general. See http://groups.yahoo.com/group/phostdev for more information.
All developers are invited to join this list.


Credits
=======

The PDK is an offshoot of the PHOST program, which was programmed by
Andrew Sterian, Thomas Voigt, and Steffen Pietsch. Thanks are due to the
many many people who helped with the development of PHOST and to all those
who support and encourage the PHOST project. Thanks to Rick Rogers for
helping out with the Microsoft C port.

Updates to the PDK were done by Piotr Winiarczyk, Heiko Schlenker,
Stefan Reuther, Alexander Babanov, Maurits van Rees.

The original Portable Host Project Team is:
    Mike Campbell, Jeff Hupp, Michael Lemon, Stefan Lundgren,
    Sean Martens, Matt Mueller, Steffen Pietsch, Falko Poiker,
    Chris Smith, Andrew Sterian, Thomas Voigt

