LAN Server/ru: Difference between revisions

From DDraceNetwork
(Created page with "3. Создайте папку")
Tags: mobile web edit mobile edit
(Created page with "* <code>mkdir DDNet-Server</code>")
Line 120: Line 120:
|}
|}


<div lang="en" dir="ltr" class="mw-content-ltr">
Больше информации по открытию портов доступно на http://portforward.com/
More Information about Port forwarding are available at http://portforward.com/
</div>





Revision as of 17:10, 20 March 2023

Локальными серверами называются сервера, которые работают внутри домашней сети игрока и над которыми у него есть полный контроль.

Есть множество причин, по которым люди используют локальные сервер. Он позволяет:

  • Играть с только с друзьями
  • Запускать недоступные на других серверах карты
  • Тестировать карты с командами и инструментами администратора
  • И многое другое

Однако, существуют и недостатки локальных серверов. Например, для того, чтобы поиграть с друзьями, потребуется сделать дополнительные шаги. Также домашняя сеть не позволяет в большинстве своем играть без лагов. Также помните о том, что записи вашего локального сервера (финиширования, очки) сохраняются только на нем самом и не распространяются на официальные сервера DDNet.


Запуск локального сервера

В последних клиентах создание локального сервера достаточно простое.

  1. Откройте главное меню
  2. Нажмите на "Запустить сервер"
    • Через некоторое время появится черная консоль, скопируйте оттуда пароль (rcon)
  3. Откройте список серверов, нажмите на LAN, зайдите на сервер
  4. Откройте консоль администратора нажатием F2 и введите пароль, чтобы получить доступ к командам администратора.
  5. Готово

Однако, выв запустили сервер, доступный только для вышей домашней сети. Потребуется сделать несколько дополнительных шагов, чтобы позволить играть другим игрокам.


Настройка локального сервера для совместной игры

This next step requires you to port forward, which depends on the brand and type of router you have.

  1. Port forward the UDP port 8303 through your router.
    • The easiest way to do this is to simply search "how to port forward" in your preferred search engine. This process usually requires you to log into your router interface, which, again, varies per household.
    • Make sure to choose the UDP setting, and not the TCP or the TCP/UDP setting.
    • You can forward a port other than 8303 if you set up the desired port using sv_port in your server autoexecutable. However, the default port is 8303 for DDNet. So, if you're not sure what you're doing, just forward port 8303.
  2. If you'd like your server to show up on the Internet tab, use the server setting sv_register 1, either in the f2 console or in the server autoexecutable. Note that this will make your IP publicly viewable if you host the server from your home network. So, use at your own risk.


Настройка локального сервера Linux

Linux

Метод 1 (Компилирование сервера)
[Show/Hide]
1. Обновите сервер
  • sudo apt update && apt upgrade

2. Установите git

  • sudo apt install git

3. Создайте папку

  • mkdir DDNet-Server

3. Склонируйте репозиторий с GitHub

  • git clone --recursive --depth=1 https://github.com/ddnet/ddnet

4. Установите все требуемые зависимости

  • sudo apt install build-essential cmake git libcurl4-openssl-dev libssl-dev libfreetype6-dev libglew-dev libnotify-dev libogg-dev libopus-dev libopusfile-dev libpnglite-dev libsdl2-dev libsqlite3-dev libwavpack-dev python google-mock

5. Перейдите в папку ddnet

  • cd ddnet

5. Скомпилируйте DDNet

  • mkdir build
  • cd build
  • cmake -DCLIENT=OFF ..
  • make -j$(nproc)

6. Откройте сервер

  • ./DDNet-Server

7. Откройте порты для сервера (стандартный порт - 8303)

8. Подключитесь с помощью клиента

  • Press F1
  • connect "Server-IP"

9. Играйте

Больше информации доступно на https://github.com/ddnet/ddnet

Метод 2 (Использование готовых файлов)
[Show/Hide]
1. Скачайте исполняемые файлы с сайта загрузок DDNet

2. Разархивируйте в папку

3. Откройте сервер

  • ./DDNet-Server

4. Откройте порты для сервера (стандартный порт - 8303)

5. Подключитесь с помощью клиента к серверу

  • Press F1
  • connect "Server-IP"

6. Играйте

Больше информации по открытию портов доступно на http://portforward.com/


Server Settings and Maps

Everything settings and map-wise can be found in your Teeworlds folder.

  • On Windows, you can find it in AppData/Roaming/Teeworlds.
  • On Linux, you can find it in (insert location here).
  • On Mac, you can find it in (insert location here).


Server Autoexecutables

Server autoexecutables are files containing server settings that are automatically run every time you start your server. For example, this can be helpful if you want to keep a single rcon password to log in with every time.

To create an autoexecutable, navigate to your Teeworlds folder (not your DDNet folder!), and create a file by the name of "autoexec_server.cfg". Make sure it is a .cfg extension file and not a .txt file or anything similar.

To add commands, simply edit the autoexec_server.cfg file and add each command on a new line. Here are examples of commonly used commands:

  • sv_rcon_password <rcon password>
  • sv_password <password to join>
  • sv_name <server name>
  • sv_register 1 (shows the server on the Internet tab)
  • sv_test_cmds 1 (allows the use of cheat commands)


Server Maps

Server maps can be found in Teeworlds/maps. To load a map ingame, use the server command sv_map <mapname>.


See also