Multiplayer - FailedIndustry/Industrial-Failure GitHub Wiki

Multiplayer

Multiplayer is comprised of one hierarchy:

multiplayer/Multiplayer.gd

Constants:

  • PORT where the game is hosted
  • MAX_PLAYERS that the game can hold
  • COMPRESSION type to use for packets from and to server

Enums:

  • GenericResult is the generic enum that we use to represent simplistic errors for our specific use case

Functions:

  • retry_function retries the function passed to it a certain amount of times

multiplayer/Client.gd (extends multiplayer/Multiplayer.gd)

Functions:

  • join_server is where the client joins the server with specified address

multiplayer/Server.gd (extends multiplayer/Multiplayer.gd)

Functions:

  • start_server is where a server starts the server.