SRB2 Message Board  

Go Back   SRB2 Message Board > Sonic Robo Blast 2 > Releases > Custom Builds

Reply
 
Thread Tools
SRB2NetPlus 2.2.4-v4: Play without control lag! Details »»
SRB2NetPlus 2.2.4-v4: Play without control lag!
Version: 4, by LXShadow LXShadow is offline
Developer Last Online: May 2020

Version: SRB2 Rating: (3 votes - 4.00 average)
Released: 01-18-2020 Last Update: 05-16-2020 Favourites: 7
Re-Useable Content Code Changes Is in Beta Stage

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
  • Reduce or remove control lag!
  • Use autotimefudge to remove jitter!
  • Compatible with regular 2.2 servers!
Updates
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!
Source code
The source code is available at: https://github.com/LXShades/SRB2/tree/netplus

Download Now

File Type: zip srb2netplus.zip (1.72 MB, 754 views)

Show Your Support

  • The author of this addon has given explicit permission for its content to be re-used and/or reproduced.

Comments
Old 01-22-2020   #2
MellowJacket
The unreliable judge
Judge
 
MellowJacket's Avatar
Default

NetPlus is not something I expected to come back for 2.2 after we didn't get a version of it for 2.1, but this is a very nice surprise indeed. But this works out just fine after testing it in a CTF netgame so it's good for releases!
__________________
Meanwhile in Aerial Garden Zone
MellowJacket is offline   Reply With Quote
Old 01-22-2020   #3
MK.exe
The one and only!
 
MK.exe's Avatar
Default

This looks very appealing.

Definitely giving this a shot later.
__________________
~ MK
MK.exe is online now   Reply With Quote
Old 01-22-2020   #4
softchassis
Call me Nadia
 
softchassis's Avatar
Default

So this is essentially (or similar to?) the kind of rollback-based netcode you see with things like GGPO? That's awesome. I'll have to give this a go.
softchassis is offline   Reply With Quote
Old 01-22-2020   #5
Frostiikin
Insert funny hahas here
 
Frostiikin's Avatar
Default

do not try to run on a computer with a bad cpu, it will lag extremely hard
Frostiikin is offline   Reply With Quote
Old 01-23-2020   #6
LXShadow
Default

Quote:
Originally Posted by softchassis View Post
So this is essentially (or similar to?) the kind of rollback-based netcode you see with things like GGPO? That's awesome. I'll have to give this a go.
Yep, that's exactly it!

Quote:
Originally Posted by Frostiikin View Post
do not try to run on a computer with a bad cpu, it will lag extremely hard
It requires significantly more processing, and on many co-op maps it will lag even for extremely decent CPUs. SRB2NetPlus doesn't support co-op at this time, and it's not on my radar currently, but I encourage developers to look into that if they're interested.

If you're experiencing frame drops even on ringslinger maps, consider reducing simulatetics to a level where the frame rate is steady. If the frame rate is not steady it will introduce a lot of jutter.

For any developers who are interested (as I'm unlikely to have the time to develop this much further), it's worth looking into adding distance culling for objects during simulated frames, e.g. only tic objects that are within a certain distance of the players during simulated frames. This would make massive maps more tolerable as there aren't a bunch of scenery and enemy objects being ticced when they're not needed.

A bigger priority is fixing the desynchs and polyobjects mind ^^;
LXShadow is offline   Reply With Quote
Old 01-23-2020   #7
SCOTT0852
 
SCOTT0852's Avatar
Default

Nobody ever puts 64-bit builds up, so I compiled one myself. Commit 9c1fee91de (Snarky timefudge message should now only appear in the correct cond…), probably the same one as the 32-bit version.
Attached Files
File Type: zip srb2netplus-x64.zip (1.93 MB, 126 views)
SCOTT0852 is offline   Reply With Quote
Old 01-23-2020   #8
Chrome
KartKrew™
 
Chrome's Avatar
Default

Quote:
Originally Posted by LXShadow View Post
It requires significantly more processing, and on many co-op maps it will lag even for extremely decent CPUs. SRB2NetPlus doesn't support co-op at this time, and it's not on my radar currently,
This is a deal breaker for most of the new players to SRB2. Many of them came for Sonic, not First-Person-Shooter with ghetto balancing. 2.2 has barely touched what is left of Ringslinging gametypes, and they seem to be heading out of the door in the future.

I remember you working on client-side experiment for 2.0. Would that be more stable with Singleplayer levels?
__________________
Your freedom lies within the Hidden Sanctuary.
Chrome is offline   Reply With Quote
Old 01-23-2020   #9
LXShadow
Default

With caveats, yeah. An SRB2CS-style mod wouldn't have sync fails and there would be no control jutter, but it would struggle to synchronise moving platforms and enemies. Server sizes would probably need to be smaller as well.

It's a lot of work to tear down the netcode and re-make it.

Co-op isn't on my radar at the moment because netplus is basically a passion project I pulled together in a week over Christmas (plus eventual tweaks) to see if it was possible to play ringslinger without lag. I agree that most players came here for a platforming game and it would make the most sense to support the co-op and its humungous maps, but the effort-to-return ratio is high, and I'm spending the majority of my time on other projects. I did look into it quite a bit before release and I may take a look at it in the future but I'm just not able to commit to it.

If you're a developer and have any questions about how the mod works so you can have a look at co-op support, feel free to ask me anytime. :)
LXShadow is offline   Reply With Quote
Old 02-01-2020   #10
Vlad Freeman
JF-049
Default

Pretty interesting that x86 Windows build just crashes for me upon joining the network game without any RPT or other dump, but x64 works very-very fine as it is.
I cannot express all of my happiness to see my dream coming true. I've always wanted to play SRB2 online comfortably, and I'm glad that LXShadow made this a reality. Thank you so much!

BTW, I put x64 Arch Linux Build of this mod here for those who doesn't want to mess with compilation. You'll need srb2 data files already installed in your system, though.
To install the package, just extract the zip and run
Code:
sudo pacman -U srb2netplus-2.2.0-1-x86_64.pkg.tar.xz
Attached Files
File Type: zip srb2netplus-2.2.0-1-x86_64.pkg.tar.xz.zip (1.42 MB, 78 views)
Vlad Freeman is offline   Reply With Quote
Old 02-07-2020   #11
Cyan Ryan
Default

I was afraid this would never come back. You're doing everyone a favor here. 8)
Cyan Ryan is offline   Reply With Quote
Old 02-22-2020   #12
LXShadow
Default

2.2.1 is now supported! And with simcull added, there is potential for eventual co-op and race support. While neither modes are officially supported or stable, it is now possible to play through some of the larger maps without hitches. Enjoy!
LXShadow is offline   Reply With Quote
Old 02-22-2020   #13
CobaltBW
Community Noise Maker
Developer
 
CobaltBW's Avatar
Default

Quote:
Originally Posted by LXShadow View Post
With caveats, yeah. An SRB2CS-style mod wouldn't have sync fails and there would be no control jutter, but it would struggle to synchronise moving platforms and enemies. Server sizes would probably need to be smaller as well.

It's a lot of work to tear down the netcode and re-make it.

Co-op isn't on my radar at the moment because netplus is basically a passion project I pulled together in a week over Christmas (plus eventual tweaks) to see if it was possible to play ringslinger without lag. I agree that most players came here for a platforming game and it would make the most sense to support the co-op and its humungous maps, but the effort-to-return ratio is high, and I'm spending the majority of my time on other projects. I did look into it quite a bit before release and I may take a look at it in the future but I'm just not able to commit to it.

If you're a developer and have any questions about how the mod works so you can have a look at co-op support, feel free to ask me anytime. :)
In fairness, I'm not sure what you could do about co-op anyway. It seems like a lot of the consistency failures that arise from co-op have to do with the fact that the client may not agree with the server on whether a certain mobj exists or whether a sector or polyobject is synched to a certain position, and if movement hinges on that entity, then cfail kicks are guaranteed. I can only imagine this problem is made worse if the client is making its own estimates on player movement relative to the server.

While I'm not an expert at deciphering our netcode, my best educated guess would be some of these problems have to be resolved at the host level and not just the client.
__________________
~CobaltBW

Check out my soundcloud profile for music stuff
CobaltBW is offline   Reply With Quote
Old 02-22-2020   #14
Zanda_Sama
Default

So there is a 64 build in the comments? Thanks
Zanda_Sama is offline   Reply With Quote
Old 02-22-2020   #15
RomioTheBadass
PK3 Fetishist
Default

Quote:
Originally Posted by LXShadow View Post
2.2.1 is now supported! And with simcull added, there is potential for eventual co-op and race support. While neither modes are officially supported or stable, it is now possible to play through some of the larger maps without hitches. Enjoy!
This could potentially be my go-to client to play SRB2 online for all purposes if you manage to do that :)
__________________
Also known as "RTB" on Discord
Quote:
I don't need sex because Azure Temple fucks me everyday

Last edited by RomioTheBadass; 02-22-2020 at 06:15 PM.
RomioTheBadass is offline   Reply With Quote
Old 02-24-2020   #16
SCOTT0852
 
SCOTT0852's Avatar
Default

Quote:
Originally Posted by Zanda_Sama View Post
So there is a 64 build in the comments? Thanks
I'll compile one once a version for 2.2.2 releases.
SCOTT0852 is offline   Reply With Quote
Old 03-21-2020   #17
TehPuertoRicanSpartan
 
TehPuertoRicanSpartan's Avatar
Default

I'm waaaitiiiiiiiing! (for the 2.2.2 release)
__________________
Quote:
Originally Posted by Silver Sonic View Post
Rude. You could at least use the releases thread and cut the cursing...
Quote:
Originally Posted by Icarus View Post
I agree with Silver on this one, could you please refrain from using cuss words?
TehPuertoRicanSpartan is offline   Reply With Quote
Old 04-29-2020   #18
LXShadow
Default

Updated to 2.2.2. No other major changes for now. Enjoy :)
LXShadow is offline   Reply With Quote
Old 05-02-2020   #19
SCOTT0852
 
SCOTT0852's Avatar
Default

As promised, I've compiled a 64-bit build of NetPlus for 2.2.2. I can't test it since there aren't any ringslinger servers currently up, but it probably works fine.
Attached Files
File Type: zip SRB2 2.2.2 NetPlus x64.zip (1.98 MB, 57 views)
SCOTT0852 is offline   Reply With Quote
Old 05-02-2020   #20
Pyrakid Wolfo
 
Pyrakid Wolfo's Avatar
Default

Quote:
Originally Posted by SCOTT0852 View Post
As promised, I've compiled a 64-bit build of NetPlus for 2.2.2. I can't test it since there aren't any ringslinger servers currently up, but it probably works fine.
Question: Is battle technically a ringslinger gametype?

Last edited by Pyrakid Wolfo; 05-02-2020 at 05:38 AM.
Pyrakid Wolfo is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:04 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.