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, 743 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 05-02-2020   #22
Sandey
 
Sandey's Avatar
Default

When I added this, and replaced the files, ALL of my SFX was gone, only music was left, and now I have no idea how to fix it
Sandey is offline   Reply With Quote
Old 05-02-2020   #23
Lucario_
Lucario
 
Lucario_'s Avatar
Default

Netplus 2.2.2 now drops massively the framerate in both renderers making it unplayable in most cases. At least works fine with netgames. While testing it.
__________________
Having curiosity on modding and enjoying playing.

Lucario - The Aura Pokémon
Lucario_ is offline   Reply With Quote
Old 05-06-2020   #24
Fanthom
Also known as Strawberry
 
Fanthom's Avatar
Default

It took me a while to realize I can use this on regular netgames. I feel so dumb.

Anyhow, this mod is amazing, it makes matches playable. The only issues I've been getting so far, are the frequent "Clearing savestates due to !canSim" messages coupled with having to rejoin in some servers due to de-synching during a map change.
Fanthom is offline   Reply With Quote
Old 05-16-2020   #25
LXShadow
Default

Boy these versions aren't lasting that long. SRB2NetPlus 2.2.4-v4 is out now!



Quote:
Originally Posted by Fanthom View Post
It took me a while to realize I can use this on regular netgames. I feel so dumb.

Anyhow, this mod is amazing, it makes matches playable. The only issues I've been getting so far, are the frequent "Clearing savestates due to !canSim" messages coupled with having to rejoin in some servers due to de-synching during a map change.

Yeah, that is a common issue. Usually it's fine when it happens, but further desynchs can be caused by other small random errors. It's an imperfect mod overall, and I won't have time to refine it to a perfectly working state, but I invite other developers to consider looking into it. (SRB2NetPlus would be most effective if the game's current core state saving/loading code were revamped and optimised so it could be used without heavy code duplication).
LXShadow is offline   Reply With Quote
Old 05-17-2020   #26
That2rb2DUDE
Pro Splatoon 2 Player
 
That2rb2DUDE's Avatar
Default

This mod is a god send and actually makes me want to play Match/CTF more again.
__________________
Youtuber over 50,000 Subs:
http://www.youtube.com/ThatSrb2DUDE

Twitter: @ThatSrb2DUDE
That2rb2DUDE is offline   Reply With Quote
Old 05-17-2020   #27
Vlad Freeman
JF-049
Default

I can't compile SRB2NetPlus on linux x86-64 from the repository you've provided in the main post.

GCC 9.3.0
NASM 2.14.02
sdl2_mixer 2.0.4-3
Flags used: LINUX64=1 NOUPX=1 NOVERSION=1

Quote:
sdl/i_system.c: In function ‘I_GetTime’:
sdl/i_system.c:2212:28: error: ‘lastTimeFudge’ undeclared (first use in this function)
2212 | if (cv_timefudge.value != lastTimeFudge)

make: *** [Makefile:706: ../objs/Linux64/SDL/Release/i_system.o] Error 1
Tell me if there's something wrong I'm doing from my side.
Thanks in advance.
Vlad Freeman is offline   Reply With Quote
Old 05-19-2020   #28
Vlad Freeman
JF-049
Default

Updated srb2netplus package for Arch Linux/Manjaro to the 2.2.4v4 version, excluding changes from 142a801 "Early implementation of variable time fudge" commit.

To install, extract the zip and run:
Quote:
sudo pacman -U srb2netplus-2.2.4-1-x86_64.pkg.tar.xz.zip
Attached Files
File Type: zip srb2netplus-2.2.4-1-x86_64.pkg.tar.xz.zip (1.46 MB, 19 views)

Last edited by Vlad Freeman; 05-23-2020 at 01:27 PM.
Vlad Freeman is offline   Reply With Quote
Old 05-20-2020   #29
Shuffle
Developer
 
Shuffle's Avatar
Default

Any chance of a build that works with SRB2Kart? :)
__________________
Lelouche Vi Britannia commands you.. MAKE BETTER POSTS!
Shuffle is offline   Reply With Quote
Old 05-24-2020   #30
Silver Sonic
ジャヒー様
 
Silver Sonic's Avatar
Default

To be honest, this is exactly what Srb2 netgames need, shame about the bugs and instability though. I would love to see this in a stable state to be merged into the main game!


Strangely some sfx didn't work anymore. Maybe attached log will give you insight why my game Lua panicked.
Attached Files
File Type: zip netgamelog.zip (8.2 KB, 22 views)
Silver Sonic 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 11:40 PM.


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