SRB2 Message Board  

Go Back   SRB2 Message Board > Archived > Outdated Releases (2.0.X) > Mods (2.0.X)

 
 
Thread Tools
SRB2CS: With new Match/CTF netcode! (BETA 5) Details »»
SRB2CS: With new Match/CTF netcode! (BETA 5)
Version: 1.10.6, by LXShadow LXShadow is offline
Developer Last Online: Dec 2015

Version: SRB2 Rating: (12 votes - 4.42 average)
Released: 07-16-2011 Last Update: Never Installs: 20
Code Changes Additional Software Is in Beta Stage

LATEST VERSION: BETA 5 (see updates below)


Hi all! It's taken a long time, but it's finally gone public. This is the official (beta) release of:

SRB2CS - SRB2 with client-side networking [v1.10.6]

Features:

*) SRB2 with no control lag! This is the first time SRB2 has seen client-side netcode; and as such, it plays a bit differently than you might expect. Control lag and spike lag have been replaced by the occasional ring miss and jumpy players, as ping/latency is still prevalent. Instead of being struck by lag, others will appear to be struck by it. Good for them!
*) True-blue client-to-client networking!
*) Match (including Team Match), CTF, and partial race support. The rest of the gametypes are not yet available, and have been deactivated for the time being. Sorry!


Due to the ambitious nature of this mod (as well as its beta status), there are still some issues with the game's features and their synchronization. I plan to patch many of these up as soon as possible; but in the meantime, take note of the following:

*) Weapon rings are not yet dropped - this is to save bandwidth and will hopefully be fixed in the future.
*) Emeralds and randomizing monitors (MixUp, Recycler, Random, etc.) are not yet properly synchronised. So if an emerald disappears right in front of you, just be nice and forgive the guy who picked it up on the opposite end of the map!
*) ADDFILE support is currently very limited. In order to play on a custom level, the host must add it using srb2net (or the -file parameter) before starting up SRB2. WAD downloads from the server are not yet supported.
*) The maximum amount of players this can (so far) support in a netgame is twelve, due to the nature of the network packets. We hope to expand this to a larger value in the future.
*) There is often a delay when you hit someone with a ring. As such, rings are not guaranteed to hit players when you see things that way (see: RINGSTATS command). This is the nature of client-side game synchronisation. However, rail rings are very likely to hit when they should; so when in doubt, rails out!
*) There is currently an invisible player limit of 12. Maxplayers can still be adjusted; but be advised that no more than 12 players will be able to join your server at any time - even if maxplayers is above 12.
*) OpenGL has been disabled for now - sorry!



The mod features quite a few commands and console variables specific to the new netcode. Some of them are particularly important:

cshost (BETA 1): Starts up CS mode and hosts. This command *must* be input whenever you start a new server. NOTE: BOTH PORT 5029 and 5030 ARE USED FOR CS GAMEPLAY, AND MUST BE OPEN/FORWARDED IN ORDER TO HOST. Do be sure to open this port if you can, even if you aren't hosting (see clienttoclient). As of Beta 2, cshost is no longer required, and port 5030 no longer needs opening.
- csconnect: Connects to a server in CS mode. This is used to manually connect to servers in CS mode. Use this if you don't want to join an SRB2CS netgame using the master server (which, keep in mind, works completely fine).

The rest of the commands are useful in specific situations, but you shouldn't have to worry about them too much in your average netgame. Changing these may have adverse effects on how the game works, so proceed with caution:

- csdelay: This delays players slightly, increasing their ping. A relatively high delay may make other players seem less jumpy; however, a lower delay will make for more accurate ring hits and is generally recommended. Range of values is 0-2 (delay is done in tics). As of beta 2, a new value - "Automatic" or "-1" - is the default, and it is recommended that it be left that way.
- clienttoclient: This feature - enabled by default - allows clients to connect directly to each other, as opposed to connecting via the host. This allows for a lower ping and also puts less stress on the host; however, network traffic on your end will increase (not very significantly). This feature can be disabled or enabled by you as a client. Players can only be linked if one of them has their ports correctly forwarded - which is highly recommended.
- ringmove: In CS mode, adjustments have to be made to compensate for ping. The type of adjustments made, however, can sometimes be chosen. There are two options to this - "fast" and "jumpy". "Fast" ringmove will cause opponents' rings to move slightly faster under certain conditions. "Jumpy" ringmove, on the other hand, will cause rings to jump ahead of opponents as they are thrown (under the right conditions). Jumpy ringmove is generally more accurate, but fast ringmove is recommended for easier usability.
- ringstats: This command shows a report of how well the netcode has performed in synchronising your hits. It gives you a percentage of successful ring hits against all players you've hit so far, and also lets you know how many were unsuccessful.
- playerlinks: If you are the host, this command will show who is linked to whom. If you are a client, this shows your links with other clients - like ping.

Adjustments to some of SRB2's official commands have been made, too:

- nodes: Shows the IDs and names of all players connected, as well as their IP address. Due to clienttoclient, all clients can see IP addresses.
- ping: As always, ping exists, and it is shown with this command (as well as player links). However, it is worth noting that ping may appear to be different to each player. If you want good points, it is recommended that you fight the players with the lower ping- unless they're the server champions, of course. =P

I'd like to thank the many friendly players and netgamers who had helped me test this mod during its development. (If you're out there, make yourself known!) Also of particular mention is Spazzo, who helped lead the direction of this mod, introduced me to the world of SVN, and motivated me to give this mod a public release. Along the way, he added a pretty interesting program that logs SRB2 battles. I've included this as a little add-on - check SRB2Stats.zip if you're interested!

Feel free to contact either myself or Spazzo on IRC if you have any questions/bug reports/feature suggestions. We'd love to hear from you!


Latest updates (Beta 5):
[This is another small bugfix update- but it's bigger than it looks.]
- The setlives command has been disabled. (Thanks Kitoko and Hinote!)
- Fixed an issue where the wrong gametype would show up on the rankings. (Thanks Hinote!)
- Fixed an issue where disabling clienttoclient would break synchronisation.
- Made many further updates to Race mode so as to include support for single-player maps, and to properly order the winning players.

Past updates:

BETA 4:
- Beta 3 had a serious bug involving ring drops and scoring - this has now been fixed.
- A minor sound effect fix was made.
- On a similar note, sound effects can now be heard while spectating someone else.
- Some internal updates were made to make the game run more efficiently online.
- Work on Race mode has begun, but is in its very early stages. You may now try it out if you like, but there are some de-synchronising bugs I'm aware of that have yet to be fixed. Be advised also that players who appear to be crossing the finish line first may not necessarily be in first place, due to ping issues.

BETA 3:
[No real updates were made other than a few small bugfixes. Sorry!]
- Attempted to fix a few crash bugs that have been showing up lately. Hopefully they're gone now, and hopefully no more have been created!
- Fixed team-nuke issue.
- Hopefully fixed an issue where lagging players release 'ring lasers'. Ring lasers are not an official part of SRB2's gameplay and have as such been disabled.

BETA 2:
- SRB2CS's netcode now uses SRB2's standard interface. This means that port 5030 no longer needs forwarding, and that MS support should now be more stable. However, glitches are likely to arise, so let me know if odd things start to happen. This change is completely reversible, so don't panic if things stop working!
- cshost no longer needs to be called when you start up the server.
- The "GOT FLAG!" in Match bug has been fixed. (Thanks Sky, Kitoko and Hinote!)
- Autoaim will appear to work, but it is not yet synced; so please disable it before you play!
- csdelay has been updated to account for network instability. A new value, "Automatic", is now the default, and ping will hopefully be generally lower than it was in the past.
- The ping command now shows player links, and also displays average ping "jumpiness".

BETA 1:
- Initial release.

Download Now

File Type: zip SRB2CSBeta5.zip (3.48 MB, 4063 views)

Show Your Support

  • This addon may not be copied, reproduced or published elsewhere without the author's permission.

Comments
Old 07-30-2011   #82
Andy
 
Andy's Avatar
Default

Love this idea. However, I tried it out recently in a match netgame and it seemed much more chaotic and random, probably because of the delay that occurrs when you actually hit someone with a ring to the time it actually shows them getting hit. I had a ping of about 400 and it felt as though rings were spawning in front of my face/behind me. I also felt like I was fighting ghosts, as in, shooting at Sonics shown at point A when in actuality they're at point B and the control lag is just showing me where the opponent was 1-2 seconds ago (but this might be just poor aiming on my part and I'm not sure if that's how SRB2CS even functions). However, when I do hit somebody and they are shown getting hit seconds later, it quite affects my judgement and decisions as to where I'm going to shoot, maneuver next, blah blah, in that small amount of time, considering this is a fast-paced game for me, and my playing style tends to be hit and run. Consequently, I ended up thoking back to my opponents in the direction opposite of where I wanted to go very often, thinking I'd need to go back when I'd already hit my opponent. I suppose this, along with the "fighting ghosts" thing is where the "chaos and randomness" comes in for me, as well as a possible reason to why I see a lot of less experienced players beating the more experienced, but then again, I may be the only one seeing this as chaotic at points.

I did move on to another server in which ping was lower, in its 100's I believe, and though it still felt somewhat awkward with occasional expected delay in hits (and also because I'm probably just not used to it yet), it was certainly less chaotic. It is great that this can finally allow players across the world to connect and play without c-lag. But I just hope that the huge difference between the chaos I'm getting from a server of 400 ping vs 100 ping won't ever be enough to make CS as equally aggravating as c-lag. That being said, this is certainly an alternative, yet interestingly the match I'm seeing in a CS vs regular server seems to play very differently in style. One example being that I've never this often seen two relatively skilled Sonic opponents both running backwards aiming and shooting to their sides at each other very few inches apart, only to result in not one of them injured in the end (yet, this may be just my experience =P)

This is still, however, unquestionably very impressive and gives SRB2's online play some more options now. Great work LXShadow! =)

Edit: Also, csconnect never seems to work for me, or any of my friends. But I think you may already know that?...not sure. =\
__________________
What are you looking at?
Andy is offline  
Old 07-31-2011   #83
LXShadow
Default

Thanks for the feedback. Considering the ping was 400 though, you may as well have been better off in SRB2CS than the standard netcode. =P

The things you've mentioned are all issues I knew would exist before the mod came out. It is indeed harder to engage with another player under such a high ping; in a way, you're fighting a robot. However, SRB2CS doesn't show opponents entirely as they were in the past (as real control lag would) - many tweaks are performed by the system to give a more accurate picture. As you can probably tell, these tweaks don't always work.

I would argue, though, that SRB2's standard netcode is not entirely accurate either. Fighting in control lag is hard, even after you've had it in half the servers you've played since 2006. As a client, you're forced to predict everything yourself, including successful ring hits (like SRB2CS) and precision platforming. You are a past image of yourself. And when gamemiss (packet loss) is high, things become all the more challenging.

...and even when you're the host of the netgame, you're still seeing past images of the other players as well, so properly engaging with them is also hard. SRB2CS does two things: it attempts to deal with all these issues itself, and also attempts to make the game fair between opponents. The latter is something I value - a lot. 1-vs-1 might actually have a proper meaning now.

Anyway, SRB2CS does have room for improvement in terms of synchronisation, and I'll try and work on that soon. In the meantime though, I've been working on something else SRB2-related; until I'm bored of that, SRB2CS won't be seeing many updates for the moment.

(BTW - yes, csconnect unfortunately broke during the switch to SRB2's standard netcode. =/ I'll try to work on that one soon. There is probably a simple solution that I'm simply not aware of yet.)
LXShadow is offline  
Old 07-31-2011   #84
Mystic
チェン!
Administrator
 
Mystic's Avatar
Default

Actually, I'd say that vanilla SRB2's netcode is accurate to a fault. It always properly displays exactly what's going on, but in high latency situations it displays what's going on with such a delay that it's impossible to have precise control. Vanilla SRB2 sacrifices precise control for perfect accuracy. SRB2CS does the opposite.
Mystic is offline  
Old 08-01-2011   #85
Sergeant Brown
I am the EggMaaaaan!
 
Sergeant Brown's Avatar
Default

Say, doesn't Rail bypass the lag on the shots, since it's a lazer that goes through the whole map in less than a second?

Last edited by Sergeant Brown; 08-01-2011 at 09:00 AM.
Sergeant Brown is offline  
Old 08-09-2011   #86
Josh
joshman196 in-game
 
Josh's Avatar
Default

Great mod! Really helps me and my friend, that lives on another continent, play online. But I never see servers pop up when I search for them...
__________________
Projects:
mt_squareshowdown (100%)
Josh is offline  
Old 12-29-2011   #87
BotanicJet989
 
BotanicJet989's Avatar
Default

Whenever I try to join a server on the MS in client siding, it says that I need to download a new update pack on the forums. I've downloaded what's there but I can't find the updates.
__________________
<Sonic> Hey where's my chaos emerald?
<Tails> (worried) Um... I dunno.
<Sonic> Where is it Tails? What did you do?
<Tails> Um... Shadow took it for chaos control.
<Sonic> Though so...
BotanicJet989 is offline  
Old 02-09-2012   #88
Kopper
Does not use Sonic.
 
Kopper's Avatar
Default

So, all this happened while I was on holiday from this game? And now the topic's dead?
Great... Bump!
Bah, I guess this is what happens when you spend too much time sleeping.

This netcode needs to be an option in 2.1, and the default for Race.
(well, pretty sure that was already said)
Kopper is offline  
Old 02-09-2012   #89
I'll Begin
💪🐑
 
I'll Begin's Avatar
Default

It still needs more work though.
I'll Begin is offline  
Old 02-09-2012   #90
MascaraSnake
aka SpiritCrusher
Moderator
 
MascaraSnake's Avatar
Default

Quote:
Originally Posted by I'll Begin View Post
It still needs more work though.
Like what?
MascaraSnake is offline  
Old 02-10-2012   #91
Kopper
Does not use Sonic.
 
Kopper's Avatar
Default

Quote:
Originally Posted by I'll Begin View Post
It still needs more work though.
It still needs to be an option, though. (Well, needs is a strong word)
Life needs more work. Death and taxes are the only things that are certain - and even they need more work.
Kopper is offline  
Old 02-11-2012   #92
I'll Begin
💪🐑
 
I'll Begin's Avatar
Default

Quote:
Originally Posted by SpiritCrusher View Post
Like what?
Whatever makes people raging buttmad at me when I say that SRB2Kart would be better with the netcode from this.
I'll Begin is offline  
Old 02-11-2012   #93
MascaraSnake
aka SpiritCrusher
Moderator
 
MascaraSnake's Avatar
Default

Items would be unusable in high latency situations because your opponents aren't where the game displays them. This has nothing to do with "needing more work", it's just due to the way it's designed.
MascaraSnake is offline  
Old 02-11-2012   #94
I'll Begin
💪🐑
 
I'll Begin's Avatar
Default

Items seem to work fine in Mario Kart Wii/7 online
I'll Begin is offline  
Old 02-11-2012   #95
MascaraSnake
aka SpiritCrusher
Moderator
 
MascaraSnake's Avatar
Default

Those are different games with a different structure and different netcode. You can't compare them to SRB2.
MascaraSnake is offline  
Old 02-12-2012   #96
I'll Begin
💪🐑
 
I'll Begin's Avatar
Default

I thought the whole point of SRB2CS is to give SRB2 new netcode that doesn't suck. I can't see how your argument is valid
I'll Begin is offline  
Old 02-12-2012   #97
MascaraSnake
aka SpiritCrusher
Moderator
 
MascaraSnake's Avatar
Default

Maybe it would help if you had any knowledge at all what SRB2CS does. Its netcode isn't "better" or "worse", it's just different. Vanilla SRB2's netcode sacrifices fluid controls for absolute accuracy, SRB2CS sacrifices accuracy for fluid controls. There is no control lag, but that comes at the cost that your opponents aren't necessarily where your screen shows them to be. This is obviously a fatal flaw in a game with any kind of player interaction, and that includes SRB2 Kart. I have no idea what the netcode of MKWii and MK7 is like, but you have to understand that they run on an entirely different engine that implements things differently. Things like player movement, collision and items are handled differently than in SRB2. This makes a huge difference for the netcode, because what the netcode does is determine how all this information is sent back and forth between the players.

MKWii and MK7 were designed with netplay in mind. All the information that needs to be sent back and forth is optimized so you can send it quickly and with maximum accuracy. While Doom had netplay, it's radically different from SRB2's netplay because SRB2 works at much higher player speeds. This means that a. the information needs to be transferred much more quickly because the players change their position quickly and b. accuracy is much more vital. Because the players are so fast, tiny inaccuracies can make a huge practical difference as to where the player is located. And not only was Doom's netcode not tailor-made for SRB2, you must also understand that it was made in 1993. Game design has come a long way since then, especially in professional circles. You must understand that LXShadow is an amateur. His netcode is by no means perfect. And for all he changed, he's still working within the limits of Doom's 19-year-old code.

Now add to this that SRB2 Kart is essentially a hack. It uses an FPS engine to make a racing game. I hope you can imagine what a difference this makes. None of Doom's code was made with a racing game in mind and many things would be different if that was the case. This further complicates the netcode situation. The official Mario games have none of these problems. They use an engine and netcode made specifically for a racing game. SRB2, SRB2CS and SRB2 Kart all "misuse" Doom's code to do something that Doom wasn't made for. The resulting games are in no way efficient in their design and this makes it difficult to make a good netcode. Pasting SRB2CS' netcode onto SRB2 Kart would add another layer of inefficiency.

Essentially, you're making the wrong assumption that SRB2CS improves upon SRB2's netcode, when in reality it's just another equally inefficient way of doing things.
MascaraSnake is offline  
Old 02-15-2012   #98
CobaltBW
I do things sometimes
 
CobaltBW's Avatar
Default

The inaccuracies are worth it. I don't care if I get hit by a red ring that I thought I passed a second ago. Almost all of the weapons are spamming and mostly used for area denial anyway, with the exception of the bomb ring (which has a splash radius to compensate) and a rail ring (which is already hitscan compensated). I would still be more likely to play ringslinger games under the new system than I am with the current.

The fact of the matter is that SRB2 is a platformer first and shooter second. You can say what you want about its effects on Match on CTF, but the benefits to coop and race are staggeringly clear, plainly because your character moves when you tell it to move. I cannot stress how important this is to SRB2's mechanics. This is a game that involves tight platforming that is made more complicated by the character's ever-changing movespeed. If your controls are not on the dot, maps like Nimbus Ruins and Mystic Realm are going to drive you fucking insane, as if they haven't already. In race, this is the only thing that matters.

And don't get me started on individual laggy clients slowing down the entire server to a crawl. Have the devs fixed that yet? They really should even if they never do anything else to this game again.
__________________
~CobaltBW

Check out my soundcloud profile for music stuff
CobaltBW is offline  
Old 02-15-2012   #99
Mystic
チェン!
Administrator
 
Mystic's Avatar
Default

Honestly, if this was stable and supported all gametypes there would be a serious decision involved here, but it doesn't. I'd love to have improved netcode just as much as everyone else, but I'm not capable of doing it myself and therefore am just as stuck with the crappy current netcode as you are.
Mystic is offline  
Old 02-15-2012   #100
CobaltBW
I do things sometimes
 
CobaltBW's Avatar
Default

Well hell, I'll be the first to admit it isn't stable, but at least it's a start. People were clearly involved with improving the netcode in 2.0, so what exactly is stopping them from working toward this?

I mean, do you guys use github or anything? I think you ought to coerce MattW or JTE or whoever the fuck did the netcode to help LXShadow finish this thing. Doesn't have to be today, I just want to know that some day everyone can just play in this kind of netplay environment.
__________________
~CobaltBW

Check out my soundcloud profile for music stuff
CobaltBW is offline  
Old 02-16-2012   #101
Mystic
チェン!
Administrator
 
Mystic's Avatar
Default

Well, the basic answer is that nobody is working on fixing the netcode because nobody WANTS to. It's a royal pain to do and other improvements, like new bosses and other more glamorous things are simply more fun to implement and are infinitely easier to do. This is a volunteer project we work on for fun, after all, so there's no way to force people into doing things they don't want to do.

Essentially no improvements to the netplay have been made for 2.1. In fact, right now the current beta has massive problems with netplay to the point where netgames are basically inoperable. Obviously we won't release like that, but the focus of 2.1 is most definitely single player content.
Mystic is offline  
 

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:49 AM.


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