Installation de GtkRadiant v2

Installation de GtkRadiant v2.

1) Installation des paquets de développement :

pi@raspberrypi:~ $ sudo apt-get install libxml2-dev libgtkglext1-dev libpangox-1.0-dev scons subversion

2) Création de liens symboliques pour les includes :

pi@raspberrypi:~ $ sudo mkdir -p /usr/include/gtk/
pi@raspberrypi:~ $ sudo mkdir -p /usr/include/gdk
pi@raspberrypi:~ $ sudo cp /usr/include/gtkglext-1.0/gtk/* /usr/include/gtk/
pi@raspberrypi:~ $ sudo cp /usr/include/gtkglext-1.0/gdk/* /usr/include/gdk/
pi@raspberrypi:~ $ sudo cp /usr/lib/gtkglext-1.0/include/* /usr/include/gtk-2.0/gdk/
pi@raspberrypi:~ $ sudo cp /usr/lib/gtkglext-1.0/include/* /usr/include/

3) Téléchargement du code source :

pi@raspberrypi:~ $ cd JEUX/QUAKE1/
pi@raspberrypi:~/JEUX/QUAKE1 $ git clone https://github.com/TTimo/GtkRadiant.git
pi@raspberrypi:~/JEUX/QUAKE1 $ mv GtkRadiant/ GtkRadiant16
pi@raspberrypi:~/JEUX/QUAKE1 $ cd GtkRadiant16/
pi@raspberrypi:~/JEUX/QUAKE1/GtkRadiant16 $ 

4) Compilation et installation :

pi@raspberrypi:~/JEUX/QUAKE1/GtkRadiant16 $ scons 
pi@raspberrypi:~/JEUX/QUAKE1/GtkRadiant16 $ scons install

5) Lancement de GtkRadiant :

pi@raspberrypi:~/JEUX/QUAKE1/GtkRadiant16 $ cd install/
pi@raspberrypi:~/JEUX/QUAKE1/GtkRadiant16/install $ ./radiant.bin 

6) Configuration :

Configure a game : Quake II
Name : Quake II
Game directory : /home/pi/quakeforge/
Engine binaries directory : /home/pi/quakeforge/

7) Configuration des textures :

– Fichier wad :

pi@raspberrypi:~ $ cd ~/quakeforge/id1
pi@raspberrypi:~/quakeforge/id1 $ wget http://www.mikewoodham.com/Quake/Textures/Quake101.zip
pi@raspberrypi:~/quakeforge/id1 $ unzip Quake101.zip
pi@raspberrypi:~/quakeforge/id1 $ mv QUAKE101.WAD quake101.wad 
pi@raspberrypi:~/quakeforge/id1 $ ls -l quake101.wad 
-rw-rw-rw- 1 pi pi 5102408 sept. 29  1999 quake101.wad

– Textures en .jpg de quake101.wad :

pi@raspberrypi:~/quakeforge/id1 $ mkdir -p textures/
pi@raspberrypi:~/quakeforge/id1 $ cd textures/
pi@raspberrypi:~/quakeforge/id1/textures $ wget https://miniordi.hacktech.dev/download/quake/quake_textures_jpg.tar.gz
pi@raspberrypi:~/quakeforge/id1/textures $  tar xvfz quake_textures_jpg.tar.gz

– Copier les images .jpg :

pi@raspberrypi:~/quakeforge/id1/textures $ mkdir -p /home/pi/quakeforge/baseq2/textures/quake
pi@raspberrypi:~/quakeforge/id1/textures $ cp quake/*.jpg /home/pi/quakeforge/baseq2/textures/quake
pi@raspberrypi:~/quakeforge/id1/textures $ cp quake/*.jpg /home/pi/quakeforge/baseq2/textures/
pi@raspberrypi:~/quakeforge/id1/textures $ cp quake/*.jpg .
pi@raspberrypi:~/quakeforge/id1/textures $ cd ~/quakeforge/baseq2/textures/quake/

– Conversion des textures de Quake 1 en .tga :

pi@raspberrypi:~/quakeforge/baseq2/textures/quake $ for f in *.jpg;do echo $f && convert $f `basename $f .jpg`.tga; done

– Post-configuration :

pi@raspberrypi:~/quakeforge/baseq2/textures/quake $ cd ~/.quake2/baseq2/
pi@raspberrypi:~/.quake2/baseq2 $ ln -s ~/quakeforge/id1/textures/

8) Installation des outils de compilation de carte :

pi@raspberrypi:~/.quake2/baseq2 $ cd ~/JEUX/QUAKE1/
pi@raspberrypi:~/JEUX/QUAKE1 $ wget http://disenchant.net/files/utils/tyrutils-0.15.tar.gz
pi@raspberrypi:~/JEUX/QUAKE1 $ tar xvfz tyrutils-0.15.tar.gz 
pi@raspberrypi:~/JEUX/QUAKE1 $ cd tyrutils-0.15/
pi@raspberrypi:~/JEUX/QUAKE1/tyrutils-0.15 $
pi@raspberrypi:~/JEUX/QUAKE1/tyrutils-0.15 $ make
pi@raspberrypi:~/JEUX/QUAKE1/tyrutils-0.15 $ sudo cp bin/* /usr/local/bin/

9) Création d’une carte d’exemple.

10) Vérification :

pi@raspberrypi:~ $ cd .quake2/baseq2/
pi@raspberrypi:~/.quake2/baseq2 $ ls -l *.map
-rw-r--r-- 1 pi pi 3375 mai    8 14:02 test.map

11) Pre-configuration :

pi@raspberrypi:~ $ mkdir -p /home/pi/quakeforge/id1/maps
pi@raspberrypi:~ $ cd /home/pi/quakeforge/id1/maps/
pi@raspberrypi:~/quakeforge/id1/maps $ cp ~/.quake2/baseq2/* .

12) Remplacement des textures :

Ouvrir :

/home/pi/.quakeforge/id1/maps

Chercher :

"classname" "worldspawn"

Ajouter après :

"wad" "/home/pi/quakeforge/id1/quake101.wad"

13) Compilation de la carte :

pi@raspberrypi:~/quakeforge/id1/maps $ cp test.map test.bak.map
pi@raspberrypi:~/quakeforge/id1/maps $ sed  -i 's/quake\///' test.map
pi@raspberrypi:~/quakeforge/id1/maps $ qbsp test.map
pi@raspberrypi:~/quakeforge/id1/maps $ vis test
pi@raspberrypi:~/quakeforge/id1/maps $ light test
pi@raspberrypi:~/quakeforge/id1/maps $ cp test.bak.map test.map

14) Test de la carte :

pi@raspberrypi:~ $ nq-sdl +set vid_render sw +set vid_width 640 +set vid_height 480 +map test