Crossfire : Jeu en multi-joueur en-ligne.
* Serveur :
Matériel : Raspberry Pi
Distribution : Wheezy Raspbian
* Client :
Matériel : i386
Distribution : Ubuntu 12.04 LTS
I) Sur le Raspberry Pi serveur :
1) Installation des paquetages de dépendance :
– Sqlite3 :
pi@framboise ~ $ sudo apt-get install sqlite3 libsqlite3-dev
– Python Development 2.7 :
pi@framboise ~ $ sudo apt-get install python-dev
2) Répertoire de travail :
pi@framboise ~ $ mkdir -p JEUX/CROSSFIRE pi@framboise ~ $ cd JEUX/CROSSFIRE/ pi@framboise ~/JEUX/CROSSFIRE $
3) Téléchargement du code source :
pi@framboise ~/JEUX/CROSSFIRE $ wget http://downloads.sourceforge.net/project/crossfire/crossfire-1.70.0/crossfire-1.70.0.tar.gz
4) Décompression de l’archive :
pi@framboise ~/JEUX/CROSSFIRE $ tar xvfz crossfire-1.70.0.tar.gz pi@framboise ~/JEUX/CROSSFIRE $ cd crossfire-1.70.0/ pi@framboise ~/JEUX/CROSSFIRE/crossfire-1.70.0 $
5) Configuration de la compilation :
pi@framboise ~/JEUX/CROSSFIRE/crossfire-1.70.0 $ ./configure --prefix=/home/pi/Jeux/Crossfire/Serveur
Ouvrir :
common/utils.c
Supprimer la fonction :
sint64 random_roll64()
Ouvrir :
server/gods.c
Chercher :
change_exp(pl, -random_roll64(0, loss, pl, PREFER_LOW), skill ? skill->skill : "none", SK_SUBTRACT_SKILL_EXP);
Remplacer par :
change_exp(pl, -random_roll(0, loss, pl, PREFER_LOW), skill ? skill->skill : "none", SK_SUBTRACT_SKILL_EXP);
6) Compilation :
pi@framboise ~/JEUX/CROSSFIRE/crossfire-1.70.0 $ make
7) Installation :
pi@framboise ~/JEUX/CROSSFIRE/crossfire-1.70.0 $ make install
8) Installation des ressources :
pi@framboise ~/JEUX/CROSSFIRE/crossfire-1.70.0 $ cd ~/Jeux/Crossfire/Serveur/share/crossfire
– Cartes :
pi@framboise ~/Jeux/Crossfire/Serveur/share/crossfire $ wget http://downloads.sourceforge.net/project/crossfire/crossfire-maps/1.60.0/crossfire-1.60.0.maps.tar.gz pi@framboise ~/Jeux/Crossfire/Serveur/share/crossfire $ tar xvfz crossfire-1.60.0.maps.tar.gz
– Archetypes :
pi@framboise ~/Jeux/Crossfire/Serveur/share/crossfire $ wget http://downloads.sourceforge.net/project/crossfire/crossfire-arch/1.60.0/crossfire-1.60.0.arch.tar.gz pi@framboise ~/Jeux/Crossfire/Serveur/share/crossfire $ tar xvfz crossfire-1.60.0.arch.tar.gz
9) Lancement du serveur :
pi@framboise ~/Jeux/Crossfire/Serveur/share/crossfire $ cd ../../bin/ pi@framboise ~/Jeux/Crossfire/Serveur/bin $ ./crossfire-server Unable to open /var/log/crossfire/logfile as the logfile - will use stderr instead Welcome to CrossFire, v1.70.0-runknown Copyright (C) 1994,2011 Mark Wedel & Crossfire Development Team Copyright (C) 1992 Frank Tore Johansen. 14/02/07 22:11:52 [Info] Reading highscore file /home/pi/Jeux/Crossfire/Serveur/var/crossfire/highscore 14/02/07 22:11:52 [Info] Warning: Unable to open /home/pi/Jeux/Crossfire/Serveur/var/crossfire/accounts [No such file or directory] 14/02/07 22:11:52 [Info] Initializing plugins 14/02/07 22:11:52 [Info] Plugins directory is /home/pi/Jeux/Crossfire/Serveur/lib/crossfire/plugins/ 14/02/07 22:11:52 [Info] -> Loading plugin : cfnewspaper.so ... 14/02/07 22:11:53 [Info] CFPython: New Guild: ZasekiDzukiRyoku 14/02/07 22:11:53 [Info] -> Loading plugin : cflogger.so 14/02/07 22:11:53 [Info] Sqlite Logger Plugin 1.0 alpha init 14/02/07 22:11:53 [Info] Sqlite Logger Plugin 1.0 alpha post init 14/02/07 22:11:53 [Info] Waiting for connections...
II) Sur l’ordinateur client :
1) Répertoire de travail :
[~] ➔ mkdir -p JEUX/CROSSFIRE [~] ➔ cd JEUX/CROSSFIRE [~/JEUX/CROSSFIRE] ➔
2) Client en Java :
a- Téléchargement du code source :
[~/JEUX/CROSSFIRE] ➔ wget http://downloads.sourceforge.net/project/crossfire/jxclient/jxclient-1.60.0.tar.gz
b- Décompression de l’archive :
[~/JEUX/CROSSFIRE] ➔ tar xvfz jxclient-1.60.0.tar.gz [~/JEUX/CROSSFIRE] ➔ cd jxclient-1.60.0/ [~/JEUX/CROSSFIRE/jxclient-1.60.0] ➔
c- Compilation :
[~/JEUX/CROSSFIRE/jxclient-1.60.0] ➔ ant
d- Lancement :
[~/JEUX/CROSSFIRE/jxclient-1.60.0] ➔ java -jar jxclient.jar
e- Capture d’écran :
3) Client en C :
a- Installation de paquetage de dépendance :
[~/JEUX/CROSSFIRE] ➔ sudo apt-get install libcurl4-openssl-dev
b- Téléchargement du code source :
[~/JEUX/CROSSFIRE] ➔ wget http://downloads.sourceforge.net/project/crossfire/crossfire-client/1.60.0/crossfire-client-1.60.0.tar.gz
c- Décompression de l’archive :
[~/JEUX/CROSSFIRE] ➔ tar xvfz crossfire-client-1.60.0.tar.gz [~/JEUX/CROSSFIRE] ➔ cd crossfire-client-1.60.0/ [~/JEUX/CROSSFIRE/crossfire-client-1.60.0] ➔
d- Configuration :
[~/JEUX/CROSSFIRE/crossfire-client-1.60.0] ➔ ./configure --prefix=/home/util01/Jeux/Crossfire/Client --disable-metaserver2 --enable-sdl_mixer
Ouvrir :
common/metaserver.c
Chercher :
#include
Remplacer par :
//#include
e- Compilation :
[~/JEUX/CROSSFIRE/crossfire-client-1.60.0] ➔ make
f- Installation :
[~/JEUX/CROSSFIRE/crossfire-client-1.60.0] ➔ make install
g- Lancement :
[~/JEUX/CROSSFIRE/crossfire-client-1.60.0] ➔ cd ~/Jeux/Crossfire/Client/bin/ [~/Jeux/Crossfire/Client/bin] ➔ ./crossfire-client-gtk2