Skip to content

Commit

Permalink
Netcode Overhaul
Browse files Browse the repository at this point in the history
Rewrote netcode to be more stable and functional. Packet-server mode has been restrategized and will now be the default netmode when playing with 3+ non-LAN players. TryRunTics has been cleaned up with older tick control behavior removed to account for the rewritten renderer. The main thread is now more consistent when playing online to prevent potential slow downs and lock ups. Load barriers are better accounted for to prevent spikes on level transition. Improvements to chat and lobby systems including a force start game button. Added a suite of new host options such as kicking and controlling who can pause the game. Max players increased from 8 to 16 since the new code can now handle it.

Note: Demo functionality is untested. This will be rewritten at a later time alongside improvements to GZDoom's playback features (e.g. freecam mode).
  • Loading branch information
Boondorl committed Mar 4, 2025
1 parent 52a5452 commit b51574d
Show file tree
Hide file tree
Showing 45 changed files with 3,119 additions and 2,669 deletions.
16 changes: 16 additions & 0 deletions src/common/console/c_dispatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,22 @@ static const char *KeyConfCommands[] =

// CODE --------------------------------------------------------------------

bool C_IsValidInt(const char* arg, int& value, int base)
{
char* end_read;
value = std::strtol(arg, &end_read, base);
ptrdiff_t chars_read = end_read - arg;
return chars_read == strlen(arg);
}

bool C_IsValidFloat(const char* arg, double& value)
{
char* end_read;
value = std::strtod(arg, &end_read);
ptrdiff_t chars_read = end_read - arg;
return chars_read == strlen(arg);
}

void C_DoCommand (const char *cmd, int keynum)
{
FConsoleCommand *com;
Expand Down
2 changes: 2 additions & 0 deletions src/common/console/c_dispatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ void C_ClearDelayedCommands();

// Process a single console command. Does not handle wait.
void C_DoCommand (const char *cmd, int keynum=0);
bool C_IsValidInt(const char* arg, int& value, int base = 10);
bool C_IsValidFloat(const char* arg, double& value);

FExecList *C_ParseExecFile(const char *file, FExecList *source);
void C_SearchForPullins(FExecList *exec, const char *file, class FCommandLine &args);
Expand Down
Loading

0 comments on commit b51574d

Please sign in to comment.