Unity has changes how to create server build in 2021
replace:
if (serverBuild)
buildOptions |= BuildOptions.EnableHeadlessMode;
These instructions are based on this blogpost by Anton Semjonov and this video by Animortis Productions. Please follow the link if you want more details, they go into much more detail about each step, whereas this document is more focused on being a concise cheat sheet. Let's go.
Boot the Ubuntu installation medium. When asked, choose the "Try Ubuntu" option and open a terminal.
Switch to root, otherwise you'll have to type sudo
all the time:
sudo su -
/* Hide border on tab bar, force its state to 'scroll', adjust margin-left for width of scrollbar. | |
#tabbar { | |
border: 0; | |
overflow-y: scroll !important; | |
margin-left: -18px !important; | |
} | |
*/ | |
/* Hide .twisty and adjust margins so favicons have 7px on left. */ | |
.tab .twisty { |
Readme: In the following pseudo code, [] indicates a subroutine. | |
Sometimes I choose to write the subroutine inline under the [] in order to maintain context. | |
One important fact about the way rollbacks are handled here is that we are storing state for every frame. | |
In any real implementation you only need to store one game state at a time. Storing a game | |
state for every frame allows us to only rollback to the first frame where the predicted inputs don't match the true ones. | |
==Constants== | |
MAX_ROLLBACK_FRAMES := Any Positive Integer # Specifies the maximum number of frames that can be resimulated | |
FRAME_ADVANTAGE_LIMIT := Any Positive Integer # Specifies the number of frames the local client can progress ahead of the remote client before time synchronizing. |
time_t time (time_t *result) | |
int stime (const time_t *newtime) | |
int fcntl (int filedes, int command, ...) | |
size_t mbstowcs (wchar_t *wstring, const char *string, size_t size) | |
size_t wcstombs (char *string, const wchar_t *wstring, size_t size) | |
int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param) | |
int sched_getscheduler (pid_t pid) | |
int sched_setparam (pid_t pid, const struct sched_param *param) | |
int sched_getparam (pid_t pid, struct sched_param *param) | |
int sched_get_priority_min (int policy) |