yavl / teeworlds-infclassR

Slightly modified version of official InfClass
Other
10 stars 4 forks source link

How to compile - tutorial #72

Closed duralakun closed 5 years ago

duralakun commented 5 years ago

It would be nice if there was a step by step tutorial on how to compile and run this mode in the readme. That you have to use bam 4.0 and where to find it. And a list of all dependencies that you have to install. A list of commands that you type in the terminal / cmd to compile and run it. I think ddnet did a good job with this: https://github.com/ddnet/ddnet

yavl commented 5 years ago

I will write a short one these days. Also instead of listing all the available commands, maybe 'default' autoexec.cfg should be included inside bin/ directory? There is just too much text in Readme rn as for me

duralakun commented 5 years ago

Thanks. I was not suggesting listing all available commands, but i already included the config var files so people can take a look on all the config vars. I think even people who dont program can understand it. Maybe we can add 2 sentences about how to read those files.

teoman002 commented 5 years ago

Debian / Ubuntu / Mint manual:

teoman002 commented 5 years ago

autoexec.cfg manual: Maximal player count: sv_max_clients 5 Server Name: sv_name OI2 - MyServer Port: sv_port 8999 rcon pass: sv_rcon_password 1234567890 Register into master: sv_register 1 Spam protection: sv_spamprotection 0 Warmup: sv_warmup 3 Add map vote: add_vote "normandie" change_map infc_normandie_2k19

teoman002 commented 5 years ago

Development hints: Useful command: grep -inr "Ninja" to find all occurrences of Ninja in InfClass/src For character behaviour look into: src/game/server/entities/character.cpp For weapon behaviour look into src/game/server/entities/ For weapon config look into /src/engine/server/server.cpp "SetFireDelay" To add a new weapon look into /src/engine/server.h also do a grep -inr "weapon" in src folder For mod behaviour look into src/game/server/gamecontext.cpp and gamecontroller.cpp For config variables look into src/engine/shared/config_variables.h

duralakun commented 5 years ago

Debian / Ubuntu / Mint manual:

* install packages: `sudo apt-get install libicu-dev ibmaxminddb0 libmaxminddb-dev`

* `wget https://www.ccoderun.ca/GeoLite2PP/download/geolite2++-0.0.1-2561-amd-64.deb`

* download bam from `https://github.com/matricks/bam/releases`

* go into bam and execute make_unix.sh

* put bam next to InfClass folder

* go into InfClass folder and execute `../bam-0.4.0/bam`

* create an autoexec.cfg for the server and put it into ./bin

* go into `./bin` and execute `./server_d`

* open teeworlds client and join `localhost:YourPortHere`

This is nice, we could also do it like a sh file, something like this: (not tested)

sudo apt-get install libicu-dev ibmaxminddb0 libmaxminddb-dev git wget # install required stuff
mkdir InfClassR # create dir "InfClassR"
cd InfClassR
wget https://github.com/matricks/bam/archive/v0.4.0.tar.gz # download bam
tar -xzf bam-0.4.0.tar.gz # extract bam
cd bam-0.4.0
./make_unix.sh # compile bam
cd ..
wget https://www.ccoderun.ca/GeoLite2PP/download/geolite2++-0.0.1-2561-amd-64.deb
dpkg -i geolite2++-0.0.1-2561-amd-64.deb
git clone https://github.com/yavl/teeworlds-infclassR
cd teeworlds-infclassR
../bam-0.4.0/bam # compile the infclass server

In order to run the server

cd bin
./server_d

I think we might also need to add the "build-essential" package to the sudo apt-get install line (but i am not sure)

duralakun commented 5 years ago

There is just too much text in Readme rn as for me

I dont think a long readme file is a bad thing. It is better to have the information than not. If people dont want to read it they will not read it anyways. We put the most important things at the top and the least important things at the bottom. Or do you disagree? Maybe we should instead put things inside a documentation folder? Or create a wiki for it?

duralakun commented 5 years ago

Ok I have created the first wiki page here on github. Feel free to add/improve things. We can shorten the README.md file, remove all the map commands. What should be inside the README.md file?