Latest update: 2.2.4 is now supported.
MOUSE ERRORS: I'm aware there may be issues with mouse input in this build. This may affect Software mode, but OpenGL mode seems to be fine. I'll investigate a fix when I can.
SRB2NetPlus is a networking-enhancing mod for SRB2 2.2. Its key objective is to reduce or eliminate control lag. You can join regular 2.2 servers using it, and it works best on small maps in match/CTF/tag/circuit race modes. It is not guaranteed to work with all .wads and .pk3s.
SRB2NetPlus reduces control lag by predicting the future game state before the server tells it. This is great for race and ringslinger modes, although ringslinger modes have a slight caveat: other players can shoot faster than you, and your shots' accuracy will depend on the configuration you choose. They may also jump around as they change directions, because the game can't predict what the players will decide do. Check out what you can do about this in 'ways to play'. :)
When set up correctly, this mod is the definitive way to play SRB2 in online modes. Have fun!
This is an alpha proof-of-concept and doesn't tend to behave well in co-op maps. See Known Issues. However, there is something in there for everyone -- even if it's just autotimefudge. Don't host servers with this mod though, you don't need to!
Key features
2.2.4-v4
* 2.2.4 now supported!
* Due to more changes in the official save/load code, stability may be reduced, but my hour of testing in tag modes has worked well so give it a shot!
2.2.2-v3
* 2.2.2 now supported!
* Stability isn't guaranteed, but I've run a few tests and it seems to work. Give it a try!
2.2.1-v2
* 2.2.1 now supported!
* Added simcull. This speeds up the game in larger maps.
* This version is more resistent to desynchs. However, if a desynch is reoccurring it is recommended to rejoin the game.
Ways to play
Note: With all game modes, it is advised to run autotimefudge if the game feels jumpy. Try and do it when the game isn't spike-lagging. A good time fudge can make the frame rate feel much smoother!
No control lag, predicted players (default)
In this configuration, control lag is minimised and your shots are instant. However, other players' movements are predicted based on their last controls, and they might not reflect their realtime positions. They can look very jumpy, and your shots may sometimes miss when they look like they should hit. To play like this, do the following:
simsteadyplayers 0
No control lag, steady players, delayed ring slings
In this configuration, control lag is minimised, and other players don't jump around too much. When you see your ring hit someone, it is usually accurate. However, there is a delay when you throw rings.
simsteadyplayers max
simslingdelay Yes
No control lag, steady players, predicted shots
In this configuration, control lag is minimised, and other players don't jump around. Your shots are also instant. However, the game is internally trying to predict your shots for you. This may cause inaccuracies, but could be useful for some play styles.
simsteadyplayers max
simslingdelay No
Some control lag, steadier players
In configurations like this, you can tweak the amount of control lag you'll have. More control lag means the game doesn't need to predict other players' actions as much, making them less jumpy. If you do this:
simtics 3
simsteadyplayers 0
...then the game will simulate 3 frames into the future, meaning you have 3 frames less control lag than you would in the normal version.
Console vars
sim Enables simulation. Default: On
simtics The maximum number of tics the game will simulate locally. This means *how many tics of control lag are cancelled out*. 200 ms, for example, is about 7 tics. Default: MAX
simsteadyplayers The maximum number of tics that other players will be steadied. Instead of trying to predict where other players will go, the game will put them slightly in the past, closer to the location we last received from the server. A max value will put players at their last known position from the server, i.e. no prediction at all. A value of 2 will mostly predict the player, except for the latest 2 frames. When this is enabled and netslingdelay is disabled, the game will try and predict your ring shots when it sends them to the server. Default: 0
simslingdelay This works in combination with netsteadyplayers. If enabled, the game delays your ring shots by as much as netsteadyplayers, instead of trying to predict them as mentioned above. If this is enabled and steadyplayers is max, your rings will have the same delay as you would have control lag in a normal game. Default: Off
simtrails Optionally specifies the length and lifetime of player trails. These can be generated when players make large jumps due to prediction inaccuracy. They can help you see other players' motion. Default: 5
simcullWhen set, objects will only simulate when you are within a certain distance to them. If you get severe frame rate lag, try this. The smaller the distance, the faster the game will run, but the closer objects will be deactivated. 1000-9999 is a good starting value. This is great for co-op maps (if they work ^^;), but not ideal for competitive games. If your game is running smoothly, keep it disabled. Default: Min (disabled)
timefudge This is a percentage 'nudge' of your game tic timer. This can reduce frame jutter (see illustration). You can set this manually if you like, but autotimefudge will usually do the trick. Default: 0
autotimefudge This does the hard work for you and finds a good time fudge. You can occasionally use this if the game becomes jumpy, as network conditions can change, and the server and client timers become out of sync over time.
netsimstat View all the juicy debug information! Default: Off
Known Issues
The source code is available at: https://github.com/LXShades/SRB2/tree/netplus
MOUSE ERRORS: I'm aware there may be issues with mouse input in this build. This may affect Software mode, but OpenGL mode seems to be fine. I'll investigate a fix when I can.
SRB2NetPlus is a networking-enhancing mod for SRB2 2.2. Its key objective is to reduce or eliminate control lag. You can join regular 2.2 servers using it, and it works best on small maps in match/CTF/tag/circuit race modes. It is not guaranteed to work with all .wads and .pk3s.
SRB2NetPlus reduces control lag by predicting the future game state before the server tells it. This is great for race and ringslinger modes, although ringslinger modes have a slight caveat: other players can shoot faster than you, and your shots' accuracy will depend on the configuration you choose. They may also jump around as they change directions, because the game can't predict what the players will decide do. Check out what you can do about this in 'ways to play'. :)
When set up correctly, this mod is the definitive way to play SRB2 in online modes. Have fun!
This is an alpha proof-of-concept and doesn't tend to behave well in co-op maps. See Known Issues. However, there is something in there for everyone -- even if it's just autotimefudge. Don't host servers with this mod though, you don't need to!
Key features
- Reduce or remove control lag!
- Use autotimefudge to remove jitter!
- Compatible with regular 2.2 servers!
2.2.4-v4
* 2.2.4 now supported!
* Due to more changes in the official save/load code, stability may be reduced, but my hour of testing in tag modes has worked well so give it a shot!
2.2.2-v3
* 2.2.2 now supported!
* Stability isn't guaranteed, but I've run a few tests and it seems to work. Give it a try!
2.2.1-v2
* 2.2.1 now supported!
* Added simcull. This speeds up the game in larger maps.
* This version is more resistent to desynchs. However, if a desynch is reoccurring it is recommended to rejoin the game.
Ways to play
Note: With all game modes, it is advised to run autotimefudge if the game feels jumpy. Try and do it when the game isn't spike-lagging. A good time fudge can make the frame rate feel much smoother!
No control lag, predicted players (default)
In this configuration, control lag is minimised and your shots are instant. However, other players' movements are predicted based on their last controls, and they might not reflect their realtime positions. They can look very jumpy, and your shots may sometimes miss when they look like they should hit. To play like this, do the following:
simsteadyplayers 0
No control lag, steady players, delayed ring slings
In this configuration, control lag is minimised, and other players don't jump around too much. When you see your ring hit someone, it is usually accurate. However, there is a delay when you throw rings.
simsteadyplayers max
simslingdelay Yes
No control lag, steady players, predicted shots
In this configuration, control lag is minimised, and other players don't jump around. Your shots are also instant. However, the game is internally trying to predict your shots for you. This may cause inaccuracies, but could be useful for some play styles.
simsteadyplayers max
simslingdelay No
Some control lag, steadier players
In configurations like this, you can tweak the amount of control lag you'll have. More control lag means the game doesn't need to predict other players' actions as much, making them less jumpy. If you do this:
simtics 3
simsteadyplayers 0
...then the game will simulate 3 frames into the future, meaning you have 3 frames less control lag than you would in the normal version.
Console vars
sim Enables simulation. Default: On
simtics The maximum number of tics the game will simulate locally. This means *how many tics of control lag are cancelled out*. 200 ms, for example, is about 7 tics. Default: MAX
simsteadyplayers The maximum number of tics that other players will be steadied. Instead of trying to predict where other players will go, the game will put them slightly in the past, closer to the location we last received from the server. A max value will put players at their last known position from the server, i.e. no prediction at all. A value of 2 will mostly predict the player, except for the latest 2 frames. When this is enabled and netslingdelay is disabled, the game will try and predict your ring shots when it sends them to the server. Default: 0
simslingdelay This works in combination with netsteadyplayers. If enabled, the game delays your ring shots by as much as netsteadyplayers, instead of trying to predict them as mentioned above. If this is enabled and steadyplayers is max, your rings will have the same delay as you would have control lag in a normal game. Default: Off
simtrails Optionally specifies the length and lifetime of player trails. These can be generated when players make large jumps due to prediction inaccuracy. They can help you see other players' motion. Default: 5
simcullWhen set, objects will only simulate when you are within a certain distance to them. If you get severe frame rate lag, try this. The smaller the distance, the faster the game will run, but the closer objects will be deactivated. 1000-9999 is a good starting value. This is great for co-op maps (if they work ^^;), but not ideal for competitive games. If your game is running smoothly, keep it disabled. Default: Min (disabled)
timefudge This is a percentage 'nudge' of your game tic timer. This can reduce frame jutter (see illustration). You can set this manually if you like, but autotimefudge will usually do the trick. Default: 0
autotimefudge This does the hard work for you and finds a good time fudge. You can occasionally use this if the game becomes jumpy, as network conditions can change, and the server and client timers become out of sync over time.
netsimstat View all the juicy debug information! Default: Off
Known Issues
- Many co-op maps, enemies, etc may cause desynchs
- Enemies can cause desynchs
- Large maps may lag. See simcull for a possible solution.
- Some maps may outright crash (RIP CEZ1)
- Sometimes you may synch fail outright. If this happens, restart your game before rejoining.
- Precipitation (rain, snow, etc) may cause stability problems. Consider disabling precipitation entirely when using this mod.
- If these issues prevent the game from playing adequately, you could still rejoin and play with sim off. This will reintroduce control lag, but you can still use autotimefudge to smoothen your experience!
The source code is available at: https://github.com/LXShades/SRB2/tree/netplus
Attachments
Last edited: