View Single Post
Superjazz Superjazz's Avatar

JCF Member

Joined: Jan 2003

Posts: 976

Superjazz is OFF DA CHARTSuperjazz is OFF DA CHARTSuperjazz is OFF DA CHART

May 22, 2023, 01:30 PM
Superjazz is offline
Reply With Quote
The above test build has now been updated to include a community requested enhancement to the networking code. Direct link here.

In addition to the bullet reporters functionality and configuration as described above, this build now includes additional configurations to change the interval of how often an online game server and its clients exchange packets.

Just a disclaimer, that since I didn't work on this enhancement from start to finish (and this is just a public testing phase with configuration options before finalizing the actual enhancement for the next JJ2+ release), there may be some gaps or assumptions in my knowledge on things, and I'm basing the description on what I've been told/heard my teammates discuss about this enhancement.

Just like the bullet reporter commands, the packet exchange intervals are controllable with commands for the server and remote admins. In addition, the server menu of the game window has been temporarily adjusted to include menu options to switch between different interval levels, plus the levels can be configured into the server section in the server's plus.ini-configuration file.

The server/remote admin commands are as follows:
  • /pxiserver (-1-5/auto)
  • /pxiclient (-1-5/auto)

The command /pxiserver, sets the interval in game ticks, of how often the server should send packets to its clients, and the command /pxiclient sets the corresponding interval of how often clients should send packets to the server, when they are connected to that server. The acceptable values for the command are -1 to 5 and auto (where auto stands for automatic and -1 is an alias for auto). The value auto (or -1) stands for the current, original behavior of the game (or Plus) regarding this, which is that the game adjusts the packet exchange interval dynamically based on the number of active players in that server.

In JJ2 the game ticks are run 70 times per second, so 1 tick takes roughly 14 milliseconds. As an example, if we issue command /pxiserver 1, it means that the packets get sent by the server based on the time it takes for 1 tick to be executed, so every 14,2857... milliseconds. Issuing /pxiserver 2 will then increase that interval to 2 ticks, so 28+ milliseconds, and so forth. Issuing /pxiserver 0 is practically the same as /pxiserver 1, since the packets won't be sent more often than once every tick anyway, so roughly 14 milliseconds, but setting the interval to 0 will guarantee that the packets get sent every tick even in theory, since there are some corner cases where an interval of 1 game tick is not always reliable.

As mentioned earlier, the packet exchange intervals can also be controlled via configuration in the plus.ini, under [Server] as in the example below:

PXIServerInTicks=1
PXIClientInTicks=2
PXIServerInTicksLAN=2
PXIClientInTicksLAN=3

The configuration keys with the LAN-suffix are currently used as a default for games hosted via the Local Network TCP-menu or simply just delisted servers. For global internet games, just use the top-most keys without the LAN-suffix.

Finally, this test build is still a very raw version of the enhancement and like with the bullet reporters-feature, there may still be some cases what we have overlooked or it could be that some of the configuration values available are of no other use than simply discovering the differences between different values. In essence, the lowest intervals ensure the best responsivity of the game between the server and its clients, but they will be also more heavy on your internet connection. This build is here to try those things out.

As with the previous build; This build is only interoperable with other players running this same build: you cannot join servers running other builds, nor can servers running this build be joined by clients running other builds. So if some players are running a build that has only the bullet reporters-functionality in it, they'll need to re-download this patch again.

Enjoy!
__________________
Find It Out
SP: https://www.jazz2online.com/downloads/9371/find-it-out-single-player/
MP: http://www.jazz2online.com/J2Ov2/downloads/info.php?levelID=5021

Last edited by Superjazz; May 22, 2023 at 02:11 PM.