
                     **  Welcome to lincity  **


This is the README for lincity 1.12, pre-release version.  


WHAT IS LINCITY
===============

Lincity is a city/country simulation game for Linux (SVGALIB and X), 
Solaris, FreeBSD, HPUX, AIX, SCO, IRIX, Compaq True64, BeOS, OS/2, VMS,
AthlOS, and Win32 (Win9X and NT)

You are required to build and maintain a city. You must feed, house, 
provide jobs and goods for your residents. You can build a sustainable
economy with the help of renewable energy and recycling, or you can go for
broke and build rockets to escape from a pollution ridden and resource
starved planet, it's up to you. Due to the finite resources available in any
one place, this is not a game that you can leave for long periods of time.

Lincity recently moved to sourceforge.net.  This brings new CVS
access, mailing lists, and web pages.  If you are subscribed to 
lincity-users@floot.demon.co.uk, please also subscribe to the new
list, shown below, and make all of your posts there.  Please also note
the new home page, which is not yet complete.  Anyone with an eye for
design and a desire to help is welcome to make suggestions or design a
page to replace this one.

The lincity home page is now located at:

    http://lincity.sourceforge.net

The official users mailing list (mailman) can be subscribed to by visiting:

    http://lists.sourceforge.net/lists/listinfo/lincity-users

CVS commit notification can be had at:

    http://lists.sourceforge.net/lists/listinfo/lincity-commits    

Additionally, our sorceforge page is:

    http://sourceforge.net/projects/lincity/

REQUIREMENTS
============

   *  SVGALIB 1.3.0 (or greater).  This is required to use new mouse 
      interface that uses parameters spec'd in /etc/vga/libvga.conf.

      OR	 X11.

      OR	 A Win32 OS.

      NOTE: SVGA is currently mostly untested for version 1.12.
      Caveat emptor, and send us a patch if you can.

   *  A graphics card supported by your above choice.

   *  You probably need at least a 486DX2-66. (Even better for the X version 
      I suspect.)

   *  Other things?  Send us an email.


INSTALLATION (UNIX)
===================

To install lincity, (as root) untar the file lincity-1.12pre48.tar.gz 

     tar -xzvf lincity-1.12pre48.tar.gz

You now want to compile the source

      cd lincity-1.12pre48
      ./configure
      make
      make install

The old method choosing the install directory by setting LC_BINDIR and 
LC_LIBDIR in the makefile no longer applies.  To install to a different 
directory, you must use the --prefix flag when you configure the package. 
For example:

      ./configure --prefix=/usr/mylocal

If you are installing a version downloaded from the cvs server, the 
timestamps may be incorrect, which will cause the build to fail.  In this 
case, you need to run a script to fix the timestamps:

      ./fix-timestamps.sh
      ./configure
      make
      make install


INSTALLING PICEDIT
==================

picedit is a simple drawing program that was used to draw all the icons
found within the game. You are free to play with this, and even send me
new icons that you have designed - although I cannot guarantee that any
icons sent to me will be included in later versions. If you intend to design
some that you feel should be included, please e-mail me first, this may save
a lot of wasted effort.  The following commands

    ./configure
    make picedit   (or make xpicedit)
    make install

will compile and install picedit (or xpicedit).  Most likely, you will 
prefer to install picedit and lincity at the same time to avoid copying 
all of the help and message files multiple times, like this:

    ./configure
    make lincity
    make picedit
    make install

By the way, xpicedit does not work on hi-color or full-color displays.


INSTALLATION (WIN32)
====================
Simply unpack the archive, and double click on the LINCITY.EXE icon.  
You can get your free copy of UNZIP from the INFO-ZIP web page at

    http://www.cdrom.com/pub/infozip/UnZip.html.


RUNNING LINCITY (UNIX)
======================

Usually you will invoke the game with 'lincity' or 'xlincity'.  
Typing 'lincity' will run the SVGA version, while typing 'xlincity' will
run the X Windows version.  The SVGA version will not run under X.

             lincity  [opts]
             xlincity [opts]

The following options apply to both.

        -w   Do some *crude* gamma correction to boost the red and blue.
             This makes some 'washed out' displays a bit more colourful.
             You have control of the individual values, see below.

        -R <num>
	-G <num>
	-B <num>
             These options allow you to boost the individual colours.
             <num> is a number between 0.0 and 1.0
             The default values for -w are  1.0   0.0   0.4  (ATTOW)

This option only applies to xlincity.

	-r   Add an extra border around the game.
        -d   Double the size of the window to 1280x960

	-b   *obsolete* omit border around game.  Now on by default.


NOTES FOR X VERSION
===================

When playing in 256 colour (8bbp) display modes, when you go over the edge
of your window, the window manager changes the colour palette back to the
'normal' one, then back to the game's one when the mouse reenters the
window. This is what is supposed to happen, but can be a bit annoying when
trying to click on areas close to the edge and overshooting. For this
reason, I have added an extra border around the game to give players a bit
of 'breathing space'.

You can disable this feature by starting the game with a '-b' switch. ie.

                 xlincity -b

There is now a button that enables you to confine the mouse pointer within
the X window. ( xlincity -b, then confining the pointer and changing the
screen res to 640x480 gives you a 'full screen' game. :) )


NOTES FOR WIN32 VERSION
=======================

Lincity for Win32 automatically chooses whether or not to add a border 
and/or perform pix doubling, depending on your resolution.  Furthermore,
it will automatically maximize the window or even go into full screen
mode.  Here is what you should see for some of the more popular 
resolutions:
       
       Resolution      Window Style     Border         Pix Doubling
       ------------    ------------    ------------    ------------
       640 x 480       Full screen     None            No
       800 x 600       Window          Yes             No
       1024 x 768      Window          Yes             No
       1152 x 864      Window          Yes             No
       1280 x 1024     Window          None            Yes

If you are running 1280x1024, you may need to autohide the taskbar
in order to see pix doubling.

Lin City now uses a real windows font to draw text.  This fix gave me
a speed improvement of 20% at year 800.

Sometimes the font doesn't work correctly, for a reason that I haven;t
yet identified.  If this happens, you will need to set the define in 
lcwin32.c so that USE_WINDOWS_FONT is 0, and recompile.

If you get a message such as "Can't open the font file", this probably 
means that the long file names did not get unzip'd correctly.  Go to the
C:\LINCITY???\OPENING directory, and look for the file winfont_8x8.fnt.
If this file does not exists (or if it is called winfont_.fnt), then
is definitely the problem.  Reinstall the archive using the UNZIP program.

Multi-transport is now supported.  Simply shift-click at the beginning
and shift-click at the end, and you'll get a whole line of track, road,
rail or power lines.  Look for the blue border around the main window to
confirm that you are in multi-transport mode.

Save files are gzip compatible with the UNIX version of lincity.  That is,
you will need to gzip/gunzip the save files when you transfer them to/from
your UNIX box.

You can now scroll the main screen using the arrow keys.  Furthermore, you
can do a "fast scroll" with the SHIFT+ARROW key.

The source code is distributed together with the binary distribution,
in the file source.tgz.


THE LINCITY HOME DIRECTORY
==========================

If you get a message such as "Error. Can't find LINCITY_HOME", this
means that lincity can't find it's home directory.  The program searches
for the file "colour.pal" in the following three directories (in order).
So in the worst case, you can set the LINCITY_HOME environment variable.

	The directory pointed to by the $LINCITY_HOME environment variable
	The current working directory
	The default directory


INTERNATIONALIZATION UNDER LINUX
================================

Lincity supports a modest amount of internationalization.  Only languages
that can be represented using a iso8859-1 font are currently supported.
I have created a lincity-compatible iso8859-2 also, but have not used 
it yet because of no demand (send me an email if you would like to try).

If you wish to make a translation for your language, you will need to 
download and install gettext 0.11.5.

The first task is to get the sample Catalan translation to display 
correctly.  Download a fresh lincity from cvs on sourceforge.  Do a 
configure, make, and make install, and then set the LANG environment 
variable to "ca_ES", and run lincity.  Hopefully you will see something 
like this:

   Setting entire locale to ca_ES
   Setting messages locale to ca_ES
   Query locale is ca_ES
   Bound textdomain directory is /usr/local/share/locale
   Textdomain is lincity
   GUESS 1 -- intl_suffix is ca_ES
   Trying Message Path /usr/local/lincity/messages/ca_ES/
   Trying Help Path /usr/local/lincity/help/ca_ES/
   GUESS 2 -- intl_suffix is ca
   Trying Message Path /usr/local/lincity/messages/ca/
   Set Message Path /usr/local/lincity/messages/ca/
   Trying Help Path /usr/local/lincity/help/ca/
   Settling for help Path /usr/local/lincity/help/

If you see this, then everything worked perfectly.  Actually you might 
not notice any Catalan becaue the translation isn't finished ;-)
But anyway, test it out at the opening screen:

  (1)  The month january will be written "JAN" instead of "jan"
  (2)  Click on something that hasn't been invented yet, like a 
       power station or windmill.  The message for "Not enough tech" 
       will be translated.

If you are less lucky, maybe only (2) worked correctly and not (1).
If so, you probably saw something like this:

   Setting entire locale to (null)
   Setting messages locale to (null)
   Query locale is C
   Bound textdomain directory is /lincity/share/locale
   Textdomain is lincity
   GUESS 1 -- intl_suffix is ca_ES
   Trying Message Path /usr/local/lincity/messages/ca_ES/
   Trying Help Path /usr/local/lincity/help/ca_ES/
   GUESS 2 -- intl_suffix is it
   Trying Message Path /usr/local/lincity/messages/ca/
   Set Message Path /usr/local/lincity/messages/ca/
   Trying Help Path /usr/local/lincity/help/ca/
   Settling for help Path /usr/local/lincity/help/
   DefaultVisual id=35 bp-rgb=8 map-entries=256

If this happens, it means that your system is missing some files which 
are require to "set the locale" of your system to "ca_ES".  Probably 
you are running Linux -- I don't think other Unix's have this peculiar 
requirement.

To check if this is the problem (on Linux), look for the directory 
/usr/lib/locale/ca_ES.  If this directory doesn't exist, you have this
problem.  To fix it, do the following:

   1)  Make a backup of the directory /usr/share/i18n/charmaps
   2)  Make a backup of the directory /usr/share/i18n/locale
   3)  cd /usr/share/i18n/charmaps
   4)  gunzip UTF-8.gz
   5)  gunzip ISO-8859-1.gz
   6)  cd /usr/share/i18n/locale
   7)  localedef -f ../charmaps/UTF-8 -i ca_ES ca_ES.UTF-8
   8)  localedef -f ../charmaps/ISO-8859-1 -i ca_ES ca_ES

Now check for the directory /usr/lib/locale/ca_ES.  It will be there.

OK, now you are ready to make translations for a new language.  
There are three parts to making a tranlation:
   making help files
   making message files
   making a .po file.

The messages and help files are just a matter of editing the ASCII 
files, and installing them.  If your language is "ca", you should 
create two directories such as /usr/local/share/lincity/messages/ca
and /usr/local/share/lincity/help/ca.  Copy the english language 
help and message files to these directories, and translate them.

The .po file is a matter of translating these and getting them to compile 
correctly.  First, edit the file po/LINGUAS, and add your language 
(e.g. "ca") to the list.  Next, create the .po file.  For the language
"ca", the command looks like this like this:

   cd po
   msginit -l ca

You should now see the file "ca.po".  Edit this file.  If you are using
emacs, there is a "po-mode" to facilitate (or obstruct) this task.

When you are done editing this file, you need to compile this file.
Simply type "make" in the po directory to compile.  This will 
create the file "ca.gmo".  Finally, you will need to install this file.
To install, you will copy this file to the following location:

  cp ca.gmo /usr/local/share/locale/ca/LC_MESSAGES/lincity.mo

Now, you are ready to go.  Set the LANG environment variable and 
lincity should run using your translations.

Email to gregsharp@geocities.com for comments about this process.


INTERNATIONALIZATION UNDER WINDOWS
==================================

The situation under windows is similar.  As of version 1.12pre52, 
the windows binary contains the same sample (partial) translation into 
Catalan.  To get this to work, on the DOS prompt

  c:\lincity> set LANGUAGE=ca
  c:\lincity> lincity

Now, you should see:

  (1)  The month january will be written "JAN" instead of "jan"
  (2)  Click on something that hasn't been invented yet, like a 
       power station or windmill.  The message for "Not enough tech" 
       will be translated.

If the above doesn't work, email to gregsharp@geocities.com.

OK, now you are ready to make translations for a new language.  
There are three parts to making a tranlation:
   making help files
   making message files
   making a .po file.

The messages and help files are just a matter of editing the ASCII 
files, and installing them.  If your language is "ca", you should 
create two directories such as /usr/local/share/lincity/messages/ca
and /usr/local/share/lincity/help/ca.  Copy the english language 
help and message files to these directories, and translate them.

The .po file is a matter of translating these and getting them to compile 
correctly.  First, make copy the file lincity.pot to your language 
(e.g. "ca.po" for Catalan).  Edit this file.  If you are using
emacs, there is a "po-mode" to facilitate (or obstruct) this task.

When you are done editing this file, you need to compile this file.
Use the executable "msgfmt.exe" which is distributed with lincity 
for this purpose:

  c:\lincity> msgfmt ca.po -o ca.gmo

This should create the file ca.gmo.  You need to copy it to a 
prespecified location, like this:

  c:\lincity> copy ca.gmo locale\ca\LC_MESSAGES\lincity.mo

If your language were Italian, it would go here.  You will have to 
create the subdirectories.

  c:\lincity> copy it.gmo locale\it\LC_MESSAGES\lincity.mo

Now, you are ready to go.  Set the LANGUAGE environment variable 
(note that LANG won't work for windows), and lincity should run using 
your translations.


COMPILATION UNDER WIN32
=======================

I am using MS VC++ 4.0 under Win95 and Win98.  Lincity is reported to 
compile under MS VC++ 6.0 also.  If you are using MSVC, you might
be able to unpack the archive, and type something like this:

	c:\lincity???> nmake /f lincity.mak

I have also included the 4.0 workspace file, lincity.mdp.  This may
or may not be helpful for you.

If you are using a different compiler, you may need to generate your own 
Makefile.  The file Makefile.am contains the information about which 
files you need to compile.  In addition to the supplied files, you must 
link with your compiler supplied VERSION.LIB in addition to the standard 
WIN32 libraries.  You'll need to link with WSOCK32.LIB also.

Of note, lincity 1.11 was patched to compile with the Borland compiler 
too.  If this is not still working in 1.12, please send me a patch 
and I'll be happy to add it to the archive.


RUNNING LINCITY (CLIENT/SERVER)
===============================

Client/server version is disabled for this version.  In fact, the code 
was completely removed as of version 1.12pre50, so the last version to 
contain the (non-functioning) network code was 1.12pre49.

If you are interested in working on a client/server version, please send 
your email to the current maintainter or to the lincity mailing list.
We are still interested in doing this!


BUGS
====

Many.  See the file TODO.

If you wish to report a bug, you can send to directly to the current
maintainer or to the lincity mailing list.


HISTORY
=======

Ian Peters started writing lincity in June 1995 as an exercise in 
mouse control in SVGALIB. It quickly became a usable, then even fun, 
game to play. Over the next 18+ months it evolved into a challenging 
and stable game which, in a number of people's opinion, is worth uploading 
to the net.

In late 1997, lincity developers made grand plans for lincity version 2, 
an intergalactic space simulation with all the trimmings.  But from 
1998-1999, lincity underwent a period of hibernation, with only minor 
patches being applied.  

Development was restarted in late 1999 by Greg Sharp to provide
some moderate improvents, including networking support, GUI
improvements and additional gameplay developments.  

In mid-2001, Greg was joined by Corey Keasling, who helped to bring
the game to sourceforge.net.  In late 2001, Corey became
co-maintainer.  Having him partially in charge is a devastating blow
to the game, ensuring no stable release until lincity 1.12pre2451.

COPYRIGHT
=========
Lincity is copyright (c) I J Peters 1995-1997, (c) Greg Sharp 1997-2001.
Portions are copyright (c) Corey Keasling 2000-2001.

You may freely copy, distribute and modify lincity under the terms of the

                       GNU GENERAL PUBLIC LICENSE

Please read the file COPYING for the GPL.

This game could not have been possible without the patches, scripts, 
bug reports, suggestions, and other contributions from hundreds of 
developers and users around the world.  Please read the file 
'Acknowledgements' for details.
