Unreal Tournament 2004 and libcaca HOWTO. Last Modified: Thu Jun 3 02:10:17 CEST 2004 This is a small documentation which provides information on how to setup Unreal Tournament 2004 with libcaca (Coloured ASCII Library). I created this as i had some time one evening to play around with libcaca. The main advantages are: 1.) No need of expensive 3D Hardware. 2.) Playing on console, framebuffer or in a xterm. 3.) Nice Dithering and Anti Aliasing methods. :) There are some things which should work before we start compiling stuff for libcaca. If you want good image quality you need to unset DISPLAY, so X could not longer handle input devices in that terminal, thats why you need working gpm. 1.) You need a working X server 2.) You need a fully configured and working gpm device 3.) You need a working autoconf and automake installation 4.) You need a working Unreal Tournament 2004 installation 5.) You need some time, food and beer :) If this works you can read on :) Don't be angry if you have no gpm support, libcaca and ut2004 will work without, but it is not so much fun. So now here follow the steps to your success: 1.) Download libcaca (http://sam.zoy.org/projects/libcaca/) 2.) Download SDL-1.2.7 (http://www.libsdl.org/) 3.) Download SDL-libcaca patch (http://sam.zoy.org/projects/libcaca/patch-libsdl1.2-libcaca0.7.diff) -- Installing libcaca-0.9 -- You could simply copy and paste the following steps, but notice: I have an Intel Pentium 4, so you should replace the CFLAGS with some good values for your architecture. $ tar xjf libcaca-0.9.tar.bz2 $ cd libcaca-0.9 $ CFLAGS="-march=pentium4 -mcpu=pentium4 -msse2" ./configure --disable-doc $ make $ make install $ ldconfig You should download imlib2 (no thats not imlib :)) before, because libcaca comes with a funny coloured ascii image viewer. The --disable-doc switch is used because not every people (like me) have a working doxygen and LaTeX installation, but the manpages will still be built. -- Installing SDL-1.2.7 -- Same as above, copy and paste the steps and replace the CFLAGS. Be warned: You need autoconf and automake here. $ tar xzf SDL-1.2.7.tar.gz $ cd SDL-1.2.7 $ patch -Np1 -i ../patch-libsdl1.2-libcaca0.7.diff $ sh autogen.sh $ CFLAGS="-march=pentium4 -mcpu=pentium4 -msse2" ./configure --enable-video-caca $ make $ make install $ ldconfig Now your prerequirements are finished. The tricky part begins :) You need to copy your new libSDL-1.2.so.0 to the Unreal Tournament 2004 system directory, so do the following after replacing the path to your system directory: $ cp /usr/local/lib/libSDL-1.2.so.0 /usr/local/games/share/ut2004/System From now on, if you start Unreal Tournament 2004, it will use your own libSDL, which was compiled for your architecture. If you want you could (o)profile it with gcc 3.4 :) -- Preparing Unreal Tournament 2004 config files -- Ok one step and you could test it, you will get some Dynamic OpenGL failures, if you try to start the game in textmode with full hardware acceleration. You must edit your ~/.ut2004/System/UT2004.ini so do the following: $ vi ~/.ut2004/System/UT2004.ini $ :%s/^RenderDevice=OpenGLDrv.OpenGLRenderDevice/;RenderDevice=OpenGLDrv.OpenGLRenderDevice/g $ :%s/^;RenderDevice=PixoDrv.PixoRenderDevice/RenderDevice=PixoDrv.PixoRenderDevice/g $ :wq -- Testing Unreal Tournament 2004 -- Now you are ready, you could start Unreal Tournament using libcaca by typing the following: $ SDL_VIDEODRIVER=caca ut2004 Yihaa... Cool eh? Some screens could be found at http://ircsex.de/ -- Ultimative libcaca Unreal Tournament 2004 -- Ok here is an advanced example for libcaca, which needs working gpm and a really fast CPU. You could copy and paste the steps, if your new terminal is open you need to paste it in that new one :) Also you could replace xterm with aterm this has much more features, but only if installed. $ xterm -font micro -geometry 220x120 $ unset DISPLAY $ export TERM=xterm-color $ SDL_VIDEODRIVER=caca ut2004 Thats all folks, so have fun. Comments and bug reports could be send to: Maik Broemme