Factorio руководство запуска по сети

Factorio руководство по запуску игры по сети

По большому счёту для игры Factorio по сети не требуются дополнительные программы.
Достаточно открыть необходимые порты(34197) в системе и на роутере, и, очень желательно иметь белый ip. Поэтому первым делом посмотрите этот гайд по созданию сетевой игры без вспомогательных программ, и попробуйте для себя:

Как настроить Сетевую игру в Factorio

Но если возникают какие-то проблемы с открытием портов, или подключением к хосту через ip-адрес, то стоит попробовать поиграть по сети с помощью программ, эмулирующие локальную сеть. Такие как Hamachi, Tunngle, RadminVPN и аналоги.


Просмотры:
131 105

factorio как играть по сети в мультиплеер

  • 27.03.2016
  • Загрузка…

Мануал по игре в мультиплеер по сети в factorio

Прямое соединение к интернету (без роутера)

В этом случае вам не нужно использовать сторонние программы для игры в мультиплеер по сети. Для этого вам нужно:

  • Создать сетевую игру пользователем «A»
  • Сообщить внешний IP-адрес пользователю «B»
  • Ввести в поле «Ip-адрес и порт» IP-адрес пользователя «A». Пример: «xxx.xxx.xxx.xxx:34197»

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

Подключение к интернету через разные технологии(wi-fi, 3g, vpn)

В таких случаях нужно использовать сторонние программы, для создания виртуальной локальной сети между компьютерами пользователей, которые хотят поиграть в factorio.

Таких программ очень много. Зарекомендовавшие и просты в использовании:

  • Hamachi
  • Tunngle
  • Garena (платформа)

В таких случаях нужно указывать локальный IP, который можно увидеть в самой программе.

Также возможна ситуация, что ваше устройство соединение с интернетом не разрешает автоматически открывать порт 34197. Для этого вам придется в ручную открывать его.

Возможно пример открывания портов для robocraft поможет вам.

Содержание

  1. Multiplayer
  2. Contents
  3. Setting Up a Multiplayer Game
  4. Dedicated/Headless server
  5. Setting up a Linux Factorio server
  6. Basic installation
  7. How to list a server-hosted game on the matching server
  8. Technical Implementation Details
  9. DNS SRV Records
  10. Miscellaneous Tips
  11. Joining a Multiplayer game
  12. Joining by IP
  13. Joining via server list
  14. Joining through Steam
  15. Joining a local LAN game
  16. Connecting to a Server Behind NAT
  17. Forces
  18. History
  19. Narrative history
  20. Version history

Multiplayer

In addition to being a single-player game, Factorio also supports multiplayer, allowing many players to cooperate and assist each other, or work against each other in pvp. This page documents how to set up a multiplayer game, how to join one, and the Multiplayer Admin features for managing other users and the server. By default, multiplayer games run the CO-OP freeplay scenario where all players work together to launch a rocket with a satellite into space. Other scenarios, including PvP maps, are available for download from the Maps and Scenarios forum.

Contents

Setting Up a Multiplayer Game

Multiplayer games can be joined, hosted while playing, or hosted by a dedicated server. Multiplayer games can be advertised to other players on the same LAN or worldwide.

Use the Multiplayer button in the Play menu to start playing a multiplayer game, choose New or Load or Scenarios to host and play, or Browse or Play on LAN to connect to an already-running game. The host can also choose not to advertise the game at all, in which case you’ll need the server’s (public or otherwise reachable) IP address; you can then Connect directly to that to join the game.

  • All game instances need the installation of exactly the same game-versions and mods.
  • Factorio servers use port 34197. The port can be changed in the config file.
  • Factorio uses UDP only. The game builds its own «reliable delivery» layer built on UDP to deal with packet loss and reordering issues.
    • Make sure you configure your router’s port forwarding correctly for port 34197.
    • Make sure your router does not randomize the source port on packets outbound from 34197. Some routers do this and require additional configuration to prevent it.
    • Make sure there is no firewall or anti-virus blocking the UDP-packets.
  • The hard limit for the number of players is 65,535. However, practical limit for this is much lower, popular streamers have managed to get well over a hundred players.

Dedicated/Headless server

As of Factorio version 0.12.0 onwards, a dedicated (or headless) server can be started using the —start-server command line option. You can run factorio —help to get a list of all command-line arguments that Factorio accepts.

In the headless mode:

  • Graphics are not initialized (faster start up, less memory usage, works on completely headless servers)
  • Game starts immediately and loads a save given as a parameter to the command
  • The server has no character in game
  • Game is paused while there are no players connected (though this can be overridden using the no-auto-pause option in the server-settings.json)
  • Saves the game on exit (and autosaves normally)

0.13 onwards expects —start-server to be followed by a path to a save file.

You will need to create your save file before you start the server, as the dedicated server REQUIRES a save file to be provided. This can easily be done using the —create command-line argument. For example:

There are several JSON configuration files that factorio can make use of to change the server and map settings:

  • map-gen-settings to set parameters used by the map generator such as width and height, ore patch frequency and size, etc. (Added in 0.13)
  • map-settings to control pollution spread, biter expansion and evolution, and more (Added in 0.15)
  • server-settings which consolidated several command-line options into a single file (Added in 0.14.12)

Example files for each of these parameters are included in the data subdirectory.

The —map-gen-settings and —map-settings options must be used with the —create option when you create a new map. For example:

Starting the factorio server requires you to specify the location of the server-settings.json file. By default this is in the factorio data folder. For example to start factorio using the most recent saved map, you would run:

On windows, it may be useful to start the server with a .bat file. The bat file should have the following content:

See Command_line_parameters for more command line parameters.

Setting up a Linux Factorio server

Note: Factorio now requires glibc version 2.18, but CentOS/RHEL 7 only ship with version 2.17 so this guide will no longer work without manually compiling glibc 2.18.

This step-by-step guide has been verified on fresh CentOS 7 and RHEL 7 installs but should be applicable with little to no changes on most distributions.

The guide assumes you will install the headless server under /opt/factorio, adjust paths according to your own setup. We will also suggest that you run the Factorio server as a separate user to harden security of your setup.

Note that there are two distinct packages for Linux that can be used to run a headless server. First is the usual Linux download, that contains the full game. The other is the special headless package. The headless package does not contain any files irrelevant for a pure server, such as graphics and sounds. It is also not linked against libraries that may not be present on a server machine, such as Xlib, libGL or libasound. This option should be selected if running in a 3rd party hosted server.

This guide does not handle firewall/port forwarding since this can be done in various ways on Linux (make sure to read up how this is done as a Linux admin on your particular distribution)

Basic installation

  • Download the selected package — either full game or the headless package — and upload the Linux tar.gz or tar.xz package to your server /tmp
  • Extract the package in /tmp to /opt/factorio
  • Add a new user to your system and assign ownership of the factorio dir to it (please, do not run as the root user, sudo may be needed)
  • Try the binary

As long as it fails saying it cannot find/open the savename.zip you are set! Just upload a save from your own computer and put it in the /opt/factorio/saves directory, or use the —create ./saves/newgame.zip argument.

How to list a server-hosted game on the matching server

In order to publish the game to the matching server, Factorio needs to be given some more information than just the save file location. These information are provided in a server settings file.

To create a server settings file, look at the example file located in data/server-settings.example.json in the Factorio Application directory. The recommended way is to make a copy of this example file and edit the copy.

The following values can be changed:

Name This will be the name under which the server will be listed in the server browser Description A description of your server. May contain up to 5000 characters. MP server description Tags A list of game tags Max Players Allows you to limit the number of players that can be connected to the server at the same time. If you want no limit, just set max_players to 0.

  • Visibility for server browser: May be either public, LAN or hidden.
    • Public: The server will appear in the public server list. This requires the login credentials below to be filled in.
    • LAN: The server will not appear in the public server list, but will be available through the Play On LAN button
    • Hidden: Clients will have to connect using the server’s IP address
  • User credentials using a username and password or authentication token (found on the factorio website or in the player-data.json): These are necessary if you wish to make the server public. Otherwise, they can be left empty.
    • For security reasons it is recommended to use authentication token as this document is stored as plain text. Though it should be noted that an authentication token is a sensitive piece of information as well, and you are well-advised to keep it secret.
  • Server Password
    • Field name is game_password
  • Whether to verify user identity

(There are additional values in v0.14 of factorio.)

Technical Implementation Details

Notes about some technical details surrounding multiplayer have been published by the development team in several Friday Facts blog posts:

DNS SRV Records

Factorio supports DNS SRV records since 1.1.67.

This makes it easier to have multiple Factorio servers on a single host and allow users to connect to them with distinct subdomains instead of having to enter port numbers.

The service name is _factorio and it only supports _udp protocol.

Now a Factorio client connecting to wube.software will actually connect to srv-target.wube.software:34197

  • Factorio will log a «DNS SRV lookup returned [. ]» message when it found a SRV record for the given domain
  • With verbose logging Factorio will also log «DNS SRV lookup for [domain] didn’t return any usable records» when there’s no SRV record

Miscellaneous Tips

  • The key for console commands is also used initiate chat in multiplayer. To execute a command instead of chatting, you need to type /c before the command. Commands executed are visible to all players. Additionally, the multiplayer game must have been started with commands allowable for commands to work.
  • Set the player’s color using the command

r, g and b are for red, green and blue respectively (possible values are between 0 and 1, use this site to convert colors to rgb numbers).

  • To give yourself admin access, you need to create a server-adminlist.json in the same directory as factorio-current.log. The file should contain a list of admins, like so: [ «user1», «user2» ]

This file will be created if you promote a player through the console.

Joining a Multiplayer game

As of version 0.13, players no longer necessarily have to port-forward to play with others. Players may join each other through Steam, or by just the port-forwarded host.

Players wishing to join a game may do so in multiple ways:

  • Joining by directly inputting a public IP and port into Factorio.
  • Selecting the server from the active public server menu.
  • Joining through Steam’s services.
  • Playing a local LAN game.

Joining by IP

To join a multiplayer game by IP, you will need to know the public IP of a valid server. You can find this through social media, websites, or by word of mouth. After acquiring the IP and port, simply go to play -> Multiplayer -> Connect to server, and provide all the information it asks for.

If the server has been set up correctly to accept public connections, you should be able to join the game.

Joining via server list

Factorio’s devs keep a list of all public servers that declare themselves to the service, allowing players to join directly through Factorio. Most of these servers will be password-requiring, but many completely public servers can be connected to. To join via server list, go to Play -> Multiplayer -> Browse public games. Provide your Factorio.com login if asked, and a list of public servers will appear. Simply select one.

Joining through Steam

Steam provides a «game invite» system, simply use that to join. You can find more info about how to use steam in it’s documentation. This is the most recommended way for the average player to use multiplayer with their friends, as it allows Steam to handle everything.

Joining a local LAN game

If you have some friends on the same internet connection as you (in the same building or network), you may play a LAN game. Simply go to Play -> Multiplayer -> Play on LAN.

Connecting to a Server Behind NAT

Factorio requires that the server (in client-server mode) have a publicly accessible IP address or that all players are on the same LAN. If you are behind NAT, you must set up port forwarding (see above for port number) or use virtual LAN software such as Hamachi or Evolve.

Multiplayer games will be launched in client-server mode (also multiplayer forwarding mode). In this mode, all clients send their network traffic to the server and the server forwards the traffic to the other clients. The advantage of this is that it allows games where some players are inside a LAN and others are outside. The disadvantage may be slightly more lag as packets must travel an extra hop (through the server).

In PvP mode, players can be on different forces. Each force can have one (free-for-all) or more players (teams). Each force has its own independent research progression. Additionally, each force’s Military units and structures will attack other players as enemies, unless a cease fire is set. Note that, depending on the scenario, cease fires may be unidirectional — setting a cease fire with an opposing force does not guarantee a cease fire from them in return.

To start a PvP game, you can select the ‘PvP’ scenario from the ‘Play’ menu, or download a custom scenario which also supports PvP.

After downloading a PvP scenario, you need to move it to your application directory, and create the multiplayer game using the scenario.

  1. Download the scenario and place the scenario directory in the scenarios directory within your user data directory.
  2. Launch Factorio
  3. Click Play
  4. Click Multiplayer
  5. Click Scenario
  6. Choose the PvP scenario you want and click Create
  7. Choose latency and other settings, then click Play
  8. Other players can now join the game

Forces

Forces can be manually created via the console. This allows any map/scenario to be used for PvP. This may not be as convenient as a pre-made PvP scenario, as there will be no way for players to turn on/off cease fires other than through the console.

Each created force has its own research progression and different forces may attack each other.

The console commands for setting up and controlling forces are below:

The ability of players and entities belonging to one force to interact with structures belonging to another, non-friendly force is limited. However, some types of interactions are still possible:

Manual pickup from belts Players can pick up items traveling along a transport belt that belongs to an opposing force. Note however that this can’t be automated: Inserters will not take items from an opposing force’s belts. Belt network connection Belts will connect to each other regardless of force membership, so it’s possible to extend an opposing force’s belt line, and items will flow to them. It is also possible to side-load into, and place items onto (with inserters) an opposing force’s belt line. Fluid network connection Pipes (and storage tanks, and pumps, &c) will connect to each other regardless of force membership. For example, it’s possible to pump fluids out of or into a storage tank belonging to an opposing force. Power leeching Players can draw power from an opposing force’s electric network, by building structures inside the coverage area of a power pole belonging to an opposing force. Power poles that you build next to a power pole belonging to an opposing force will automatically connect to it, but will be impossible to connect or disconnect manually.

History

Narrative history

Because of the potentially immense amount of activity on a map, the game engine utilizes a lock step architecture. All instances of the game run full simulations of the entire world and only player actions are transferred across the network.

Multiplayer games were introduced to Factorio with version 0.11.0. The only connection method available was peer-to-peer mode which meant every player had to be able to directly communicate with every other player. In version 0.12.4, a client-server mode of communication was introduced in which the server (either a dedicated one or the player who hosted the game) relays messages to all peers. This means that direct connection between all players is no longer necessary. As of version 0.13, P2P connecting is completely removed.

As of version 0.12.0, the game features «latency hiding» mechanics where the game simulates some of the player’s actions locally to make some common interactions (such as moving the player’s character) more fluid. Not every action is a part of latency hiding – most notably, car or train driving and shooting are not a part of it.

Version history

Maintainer note: The following history may not be fully up to date, or comprehensive. Factorio’s multiplayer has undergone a great deal of small changes since its inception, however this history will provide a rough overview.

Источник

20150121191935_d0bb4ab9.jpg 

Пока игра в альфа-тестировании, работает она не всегда корректно, хоть и удивляет минимальным количеством ошибок. Для того, чтоб игралось веселее и интереснее, в игре присутствует мультиплеер. Если у вас есть белый ip и открытые порты, то все шикарно, а для остальных — инструкция по запуску.

Прежде всего стоит обзавестись программой, которая позволит вам играть по сети. Таких программ несколько, например Hamachi или Tunngle, но я рекомендую Evolve. Имея все достоинства Tunngle, она лишена её багов, а так же позволяет создавать свои комнаты (party), вместо того, чтобы использовать какие-то левые. И, в отличии от Hamachi, она бесплатна. 

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

 После регистрации и скачивания программы, залогиньтесь. Сразу добавьте программу в список исключений брандмауэра, чтобы не делать это в будущем. 

После этого вы увидите примерно такое окно. 

Но для начала заходим в «Пуск» и в поисковой строке вводим «брандмауэр» и выбираем строчку «Брандмауэр Windows в режиме повышенной безопасности».

20150121193354_0481a9aa.png

Перед нами открывается окно брандмауэра. Нам нужны его свойства.

20150121193355_357c89f6.png20150121193355_5c28395a.png

Сразу должно всплыть предупреждение об отключении защиты. Так что не советую вам бегать по всяким подозрительным сайтам в таком режиме. После всех изменений жмем «ОК» и закрываем.

Чтобы включить все снова, достаточно будет щелкнуть на панели задач флажок «Устранения проблем ПК» и там нажать на уведомление об отключении брандмауэра.

Теперь нужно открыть программу и залогиниться. Я думаю, ничего сложного нет. Жмем ПКМ на любом месте и выбираем «Create Party»

20150122133417_8169b55c.png  20150121190218_89d3416b.png

После чего вы попадете в созданное вами пати. Я своё уже создал, так что зайду в него. Ничего страшного вы не увидите, ваше пати будет точно таким же.

20150121191157_cce941f5.png20150121192408_2865a9a8.png

Теперь, не закрывая окно с пати (его можно просто свернуть), заходим в игру.

Там жмем «Настройки» и подгоняем игру под себя.

20150122134122_a1d2a5b0.jpg20150122133938_170bd74f.jpg

После всех настроек нужно перезапустить игру, иначе они не вступят в силу.

Как только вы все настроите — идем в главное меню и выбираем пункт «Сетевая игра».

20150122133939_441d9b1d.jpg20150122133940_91c36e90.jpg

Если вы собираетесь хостить новую игру:

  • Жмите пункт «Свободная игра».
  • Настраиваете параметры генерируемого мира. В принципе, там все просто.

Если вам нужно начать хостить уже сохраненную игру:

  • Выберите пункт «Загрузить игру».
  • Там выберите одно из сохранений.

Если вы хотите подключиться к уже созданной игре:

  • Выберите пункт «Подключиться к игре».
  • Вставьте скопированный ранее IP-адресс и жмите «Подключиться».

20150210110727_62454699.jpg

Понравилась статья? Поделить с друзьями:

А вот и еще наши интересные статьи:

  • Раствор люголя спрей для горла инструкция по применению взрослым
  • Витапрост свечи инструкция по применению для мужчин в урологии отзывы
  • Активированный уголь инструкция по применению таблетки взрослым дозировка по весу
  • Киа спектра 2006 инструкция по эксплуатации
  • Руководство 1 государственной думы кто это был

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии