Home Artists Posts Import Register

Content

This weekend I've been working on a version of the Sector's Edge server that you can run on your computers. This is the most requested feature I've heard over the past week and I was surprised to hear that people play Sector's Edge on their game nights! I would love for you to continue to do this post-shutdown.

Standalone servers will be available to download in a couple weeks.

Technical Changes

For self-hosted servers to work, I needed to remove a few sections of code responsible for:

  • Initialising Easy Anticheat (EAC) and kicking clients for not using EAC
  • Loading maps from the Steam workshop
  • Sending data to our backend logging systems
  • Sending HTTP requests to our APIs to update the server list, read/write player stats, etc

By disconnecting the server from the above functionality, it becomes a 'standalone' server as opposed to a dedicated / official server. 

I didn't want to create two versions of the codebase or have two branches in Git, so I used one of my favourite C# features: preprocessors. This feature allows me to build two copies of the same codebase with certain code included/excluded.

For example if I build the server with DEDICATED set to true, this EAC code will be included:

If I build the server DEDICATED set to false, all the EAC code will be removed. Magic!

Client Changes

I don't want to have to build two versions of the Sector's Edge client, so it has to be compatible with both dedicated and standalone servers. Thankfully the only changes were to send extra info to the server about your character and weapon skins, and a new menu on the play screen:

Custom Maps

This feature required zero effort as servers already load maps from a folder! This means you can add your custom maps to the map folder, say /forcemap mapname gamemode in chat, and it'll all work nicely.

More info on maps is available on our mapping Discord server.

Extra Features

I'm working on some extra features like IP whitelists and blacklists, as well as the ability to read lobby settings (gravity, max HP, movement speed, etc) from a config file when the server starts up. If there's anything else you'd like me to work on, let me know!

Comments

Anonymous

Oh you bet I'll be hosting at least 1 server! Will it come with the default maps in the game? Also, it'd be great to have minimum/recommended specs for hosting a server

Anonymous

Would it be possible to have each match's stats saved to a JSON file?