
				LBreakout2
			    
		a breakout-style arcade game for Linux
			    by Michael Speck

********************
I.   Requirements
II.  Installation
III. Network Server
IV.  Documentation
V.   Troubleshooting
VI.  Resources
VII. Feedback
********************

********************
I.   Requirements
********************
LBreakout runs in X and uses SDL (any version though >= 1.1.4
is recommended), SDL_mixer (optional for sound) and SDL_net
(optional for networking on non-Unices). These libraries
can be found at http://libsdl.org. The graphical stuff requires PNG
which is usually included to a distro. If not check out
http://www.libpng.org/pub/png/libpng.html.

********************
II.  Installation
********************
Enter your favorite shell and type in the following stuff (in the
directory you extracted the LBreakout source)
> ./configure [--disable-audio] [--disable-install] [--enable-warp]
              [--with-docdir=DOCDIR] [--disable-network] 
              [--enable-sdl-net] [--localstatedir=HIDIR]
    --disable-audio:       no sound
    --disable-install:     no installation; play from source directory
    --enable-warp:         nescessary for non-Unices to use relative
                           mouse motion for inverting or modify mouse
                           speed
    --with-docdir:         install documentation to $DOCDIR/lbreakout2
                           DEFAULT: /usr/doc
    --disable-network:     compile LBreakout2 without any network 
                           support
    --enable-sdl-net:      use SDL_net for networking (required if 
                           platform is not Unix-like)
    --localstatedir:       install global highscores to this directory
                           REPLACES --with-highscore-path TO COMPLY 
                           WITH AUTOCONF; THE DEFAULT LOCATION NOW 
                           DEPENDS ON YOUR DISTRIBUTION: PREVIOUSLY 
                           IT WAS /var/lib/games. USE
			   --localstatedir=/var/lib/games
			   FOR EXISTING HIGHSCORES.
> make
> su (become root)
> make install (if install wasn't disabled)
> exit (become user again)
> lbreakout2 (run client/non-network game)

Building on Win32
-----------------
There might be an easier way to get things to work but at least
the following worked for me. Simplifications are welcome.

1) Get MinGW, Msys, MsysDTK from http://mingw.sf.net
   The following uses michael as the Msys home directory, naturally
   you'll have to substitute your windows user name for this.
2) Get SDL, SDL_mixer, SDL_net from http://libsdl.org as tar.gz's
   and put them to c:\msys\1.0\home\michael (or whereever you 
   installed Msys to)
3) Get libpng and zlib from http://libpng.org and put them to the
   same directory as above.
4) Same with the latest and greatest LBreakout2 package, which you
   already have, I assume. :)
5) Start Msys and enter the commands
   tar -xzf *.tar.gz (extract the above archives)
   cd SDL-1.2.7; (your version might differ, of course)
   configure; make; make install;
   cd ..
   [do the same with SDL_net, SDL_mixer, zlib]
   ln -s libpng-1.2.5 libpng (your version might differ, of course)
   ln -s zlib-1.1.3 zlib (your version might differ, of course)
   cd libpng-1.2.5
   cp scripts/makefile.gcc Makefile; make
   cp png.h pngconf.h /usr/local/include
   cp libpng.a /usr/local/lib (manual install as the linux makefile 
                               caused problems)
   cd ..
   cd lbreakout2-2.5
   export LDFLAGS="-L/usr/local/lib"
   export CFLAGS="-I/usr/local/include"
   echo '' > depcomp (why this is required is again a mystery to me)
   configure --disable-install --enable-sdl-net
   win32_mancomp (this is a hack required for unknown reasons here.
            make works but it just states the gcc commands but does
            not execute them, in this little script they work however,
            dunno why... a fix for this would be most welcome. if you
            change any configure or install settings the hardcoded 
            compile command in win32_mancomp will probably not work so 
            you should check it for such a case)
   make
6) Get the dll's of SDL, SDL_mixer, SDL_net, libpng, zlib and put
   them to c:\msys\1.0\home\michael\lbreakout2-2.5\win32dlls as well 
   as msvcrt.dll (freely available from Microsoft)
7) run win32_preparchive (this will copy all required files to 
                          the directory lbreakout2)
8) copy c:\msys\1.0\home\michael\lbreakout2-2.5\lbreakout2 to
   c:\games or whereever you want to and run the game from there.
NOTE: The server does not open any display and in windows a message
overwrites all old messages in stdout.txt. Also the command line options
do not work, at least it seems so. All I managed was to run the server
without any options but at least I could connect to it successfully.

Lee Read added some scripting to create a standalone installer. This
scripting is broken right now, but hopefully fixed soon.

********************
III. Network Server
********************
To run a server start lbreakout2server with any of the following
options:
-p <PORT>     server port (default 2002)
-l <LIMIT>    maximum number of users that may connect to the server 
              (default is 30)
-i <IDLETIME> a user will be kicked if he didn't communicate with the 
              server for this amount of seconds (default is 1200)
-n <MESSAGE>  this message is displayed to welcome a user
-a <PASSWORD> a user that logs in with this name will become 
              administrator named admin (default is no admin)
-b <BOTNUM>   number of bots with strength 800 and 1000 (paddle speed
              in pixels, default is none)
After that you'll have to query your IP (e.g. with 
/sbin/ifconfig) and pass it to your friends as there is no permanent
internet server yet. Note, that you shouldn't use localhost as you
won't be able to challenge others then. 
Check the online documentation at http://lgames.sf.net 
for information on how to play.
When updating this README the last time, petersdtp.net:8000 has been
the current internet test server.

********************
IV.  Documentation
********************
If you have any questions about options, game play or editor
please check the documentation and see if you
can find an answer there. I will not respond to any eMails concerning
questions easily answered by the manual (/usr/doc/lbreakout2).
However, if you have any other problems or suggestions or you found a
bug please contact me: kulkanie@gmx.net

********************
V.   Troubleshooting
********************
The solution for relative mouse motion (nescessary when inverting or
slowing down mouse by motion modifier) works fine for Linux and 
Win32 but fails for other non-Unices. Current solution is to warp the 
mouse (by using configure option --enable-warp). Unfortunately, this 
will handicap events when trying to fire weapon or release balls AND 
move the paddle at the same time. This means it may happen that a weapon
is not fired or doesn't stop fire, balls keep being attached and so 
on...
---
Disabling sound while playing seems to result in loosing various
sound channels when some sounds were actually mixed.
---
Someone reported that he had problems with PNG (configure script
didn't find it) if it was installed to /usr/local/lib. 
Setting a link in /usr/lib fixes this.
---
If you have SDL_mixer installed but configure tells you that it can't 
find it, remember that you have to install the development package
for compiling!
---
If you can't compile because LBreakout2' timestamps are slightly in 
the future run 'touchall' (found in the configure directory).
---
If 'fullscreen' just adds a black frame around the game but does
not change the solution make sure that you have 640x480 available
as resolution in your Xconfig.
---
If the SDL sound seems to be out of sync first try
to modify the audio buffer size in ~/.lgames/lbreakout2.conf.
If this fails set SDL_AUDIODRIVER to dma (export SDL_AUDIODRIVER=dma).
 
********************
VI.  Resources
********************
Some graphics and sounds has been taken and modified from other
non-copyrighted resources:
Backgrounds:    http://www.grsites.com/textures
Sounds:         "Web Clip Empire 50.000", NovaMedia Verlag, Germany
Thanks to all of these guys for there free stuff!

********************
VII. Feedback
********************
LGames URL:  http://www.lgames.sf.net
e-Mail:      kulkanie@gmx.net

