Fix for the problem that SDL applications exited
[AROS-Contrib.git] / Games / lbreakout2 / README
blobf59ad08296aaa45406151f8c00b0ac6a23d85ef3
2                                 LBreakout2
3                             
4                 a breakout-style arcade game for Linux
5                             by Michael Speck
7 ********************
8 I.   Requirements
9 II.  Installation
10 III. Network Server
11 IV.  Documentation
12 V.   Troubleshooting
13 VI.  Localization
14 VII. Resources
15 VIII. Feedback
16 ********************
18 ********************
19 I.   Requirements
20 ********************
21 LBreakout runs in X and uses SDL (any version though >= 1.1.4
22 is recommended), SDL_mixer (optional for sound) and SDL_net
23 (optional for networking on non-Unices). These libraries
24 can be found at http://libsdl.org. The graphical stuff requires PNG
25 which is usually included in a distro. If not check out
26 http://www.libpng.org/pub/png/libpng.html.
28 ********************
29 II.  Installation
30 ********************
31 Enter your favorite shell and type in the following stuff (in the
32 directory you extracted the LBreakout source)
33 > ./configure [--disable-audio] [--disable-install] [--enable-warp]
34               [--with-docdir=DOCDIR] [--disable-network] 
35               [--enable-sdl-net] [--localstatedir=HIDIR]
36     --disable-audio:       no sound
37     --disable-install:     no installation; play from source directory
38     --enable-warp:         nescessary for non-Unices to use relative
39                            mouse motion for inverting or modify mouse
40                            speed
41     --with-docdir:         install documentation to $DOCDIR/lbreakout2
42                            DEFAULT: /usr/doc
43     --disable-network:     compile LBreakout2 without any network 
44                            support
45     --enable-sdl-net:      use SDL_net for networking (required if 
46                            platform is not Unix-like)
47     --localstatedir:       install global highscores to this directory
48                            REPLACES --with-highscore-path TO COMPLY 
49                            WITH AUTOCONF; THE DEFAULT LOCATION NOW 
50                            DEPENDS ON YOUR DISTRIBUTION: PREVIOUSLY 
51                            IT WAS /var/lib/games. USE 
52                            --localstatedir=/var/lib/games FOR EXISTING 
53                            HIGHSCORES.
54 > make
55 > su (become root)
56 > make install (if install wasn't disabled)
57 > exit (become user again)
58 > lbreakout2 (run client/non-network game)
60 Note: Swearing is disabled in version >= 2.6. To enable it you have to 
61 edit ~/.lgames/lbreakout2.conf manually and set the hidden option badspeech
62 to 1. If you cannot find the option start and quit LBreakout2 once.
64 Building on Win32
65 -----------------
66 There might be an easier way to get things to work but at least
67 the following worked for me. Simplifications are welcome.
69 1) Get MinGW, Msys, MsysDTK from http://mingw.sf.net
70    The following uses michael as the Msys home directory, naturally
71    you'll have to substitute your windows user name for this.
72 2) Get SDL, SDL_mixer, SDL_net from http://libsdl.org as tar.gz's
73    and put them to c:\msys\1.0\home\michael (or whereever you 
74    installed Msys to)
75 3) Get libpng and zlib from http://libpng.org and put them to the
76    same directory as above.
77 4) Same with the latest and greatest LBreakout2 package, which you
78    already have, I assume. :)
79 5) Start Msys and enter the commands
80    tar -xzf *.tar.gz (extract the above archives)
81    cd SDL-1.2.7; (your version might differ, of course)
82    configure; make; make install;
83    cd ..
84    [do the same with SDL_net, SDL_mixer, zlib]
85    ln -s libpng-1.2.5 libpng (your version might differ, of course)
86    ln -s zlib-1.1.3 zlib (your version might differ, of course)
87    cd libpng-1.2.5
88    cp scripts/makefile.gcc Makefile; make
89    cp png.h pngconf.h /usr/local/include
90    cp libpng.a /usr/local/lib (manual install as the linux makefile 
91                                caused problems)
92    cd ..
93    cd lbreakout2-2.5
94    export LDFLAGS="-L/usr/local/lib"
95    export CFLAGS="-I/usr/local/include"
96    echo '' > depcomp (why this is required is again a mystery to me)
97    configure --disable-install --enable-sdl-net
98    win32_mancomp (this is a hack required for unknown reasons here.
99             make works but it just states the gcc commands but does
100             not execute them, in this little script they work however,
101             dunno why... a fix for this would be most welcome. if you
102             change any configure or install settings the hardcoded 
103             compile command in win32_mancomp will probably not work so 
104             you should check it for such a case)
105    make
106 6) Get the dll's of SDL, SDL_mixer, SDL_net, libpng, zlib and put
107    them to c:\msys\1.0\home\michael\lbreakout2-2.5\win32dlls as well 
108    as msvcrt.dll (freely available from Microsoft)
109 7) run win32_preparchive (this will copy all required files to 
110                           the directory lbreakout2)
111 8) copy c:\msys\1.0\home\michael\lbreakout2-2.5\lbreakout2 to
112    c:\games or whereever you want to and run the game from there.
113 NOTE: The server does not open any display and in windows a message
114 overwrites all old messages in stdout.txt. Also the command line options
115 do not work, at least it seems so. All I managed was to run the server
116 without any options but at least I could connect to it successfully.
118 Lee Read added some scripting to create a standalone installer. This
119 scripting is broken right now, but hopefully fixed soon.
121 Building on OS/2
122 ----------------
123 On OS/2 GCC creates windowed console apps by default. There are various 
124 solutions, see http://www.edm2.com/index.php/SDL#General_tips_and_tricks
125 or run 'emxbind -e -p lbreakout2.exe' after building. - Dave Yeo 
127 ********************
128 III. Network Server
129 ********************
130 To run a server start lbreakout2server with any of the following
131 options:
132 -p <PORT>     server port (default 2002)
133 -l <LIMIT>    maximum number of users that may connect to the server 
134               (default is 30)
135 -i <IDLETIME> a user will be kicked if he didn't communicate with the 
136               server for this amount of seconds (default is 1200)
137 -n <MESSAGE>  this message is displayed to welcome a user
138 -a <PASSWORD> a user that logs in with this name will become 
139               administrator named admin (default is no admin)
140 -b <BOTNUM>   number of bots with strength 800 and 1000 (paddle speed
141               in pixels, default is none)
142 After that you'll have to query your IP (e.g. with 
143 /sbin/ifconfig) and pass it to your friends as there is no permanent
144 internet server yet. Note, that you shouldn't use localhost as you
145 won't be able to challenge others then. 
146 Check the online documentation at http://lgames.sf.net 
147 for information on how to play.
148 When updating this README the last time, petersdtp.net:8000 has been
149 the current internet test server.
151 ********************
152 IV.  Documentation
153 ********************
154 If you have any questions about options, game play or editor
155 please check the documentation and see if you
156 can find an answer there. I will not respond to any eMails concerning
157 questions easily answered by the manual (/usr/doc/lbreakout2).
158 However, if you have any other problems or suggestions or you found a
159 bug please contact me: kulkanie@gmx.net
161 ********************
162 V.   Troubleshooting
163 ********************
164 The solution for relative mouse motion (nescessary when inverting or
165 slowing down mouse by motion modifier) works fine for Linux and 
166 Win32 but fails for other non-Unices. Current solution is to warp the 
167 mouse (by using configure option --enable-warp). Unfortunately, this 
168 will handicap events when trying to fire weapon or release balls AND 
169 move the paddle at the same time. This means it may happen that a weapon
170 is not fired or doesn't stop fire, balls keep being attached and so 
171 on...
173 Disabling sound while playing seems to result in loosing various
174 sound channels when some sounds were actually mixed.
176 Someone reported that he had problems with PNG (configure script
177 didn't find it) if it was installed to /usr/local/lib. 
178 Setting a link in /usr/lib fixes this.
180 If you have SDL_mixer installed but configure tells you that it can't 
181 find it, remember that you have to install the development package
182 for compiling!
184 If you can't compile because LBreakout2' timestamps are slightly in 
185 the future run 'touchall' (found in the configure directory).
187 If 'fullscreen' just adds a black frame around the game but does
188 not change the solution make sure that you have 640x480 available
189 as resolution in your Xconfig.
191 If the SDL sound seems to be out of sync first try
192 to modify the audio buffer size in ~/.lgames/lbreakout2.conf.
193 If this fails set SDL_AUDIODRIVER to dma (export SDL_AUDIODRIVER=dma).
195 ********************
196 VI.  Localization
197 ********************
198 This game now supports i18n. If you want to add l10n for your native language,
199 please contact me first, to prevent overlapping translations. A thorough
200 documentation can be found at 
201   http://www.gnu.org/software/gettext/manual/html_mono/gettext.html
202 Basically, you will have to do the following:
203   1) cd po
204   2) add your language code (e.g., de for German) to the existing line in 
205 LINGUAS merely separated from the other languages by a blank
206   3) run `msginit -o <LL>.po` with <LL> replaced by your language code
207   4) translate the english message IDs in <LL>.po
208   5) run make <LL>.gmo
209 Whenever you change something in your translation you'll have to repeat 
210 step 5). I strongly recommend to configure the program with --disable-install
211 while working on a translation. Otherwise you'd have to copy and rename the 
212 .gmo file as root every time you want to see your changes. If the source has 
213 been compiled without installation, only step 5) and simply running the game 
214 is required. (Of course, the enviroment variable LANG must be set to your 
215 locale.)
216 This should suffice. If not, please read the excellent documentation at 
217 gnu.org. The fonts do only contain the basic latin letters. No special letters
218 (like the german umlauts or any accents for example) are supported, so a l10n 
219 should not use them. If a string has a single %, meant as a percent sign, 
220 you'll have to manually remove the 'format' comment above the id (if any).
222 ********************
223 VII.  Resources
224 ********************
225 Some graphics and sounds has been taken and modified from other
226 non-copyrighted resources:
227 Backgrounds:    http://www.grsites.com/textures
228 Sounds:         "Web Clip Empire 50.000", NovaMedia Verlag, Germany
229 Thanks to all of these guys for there free stuff!
231 ********************
232 VIII. Feedback
233 ********************
234 LGames URL:  http://www.lgames.sf.net
235 e-Mail:      kulkanie@gmx.net