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, 3606 views)

Show Your Support

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

Comments
Old 07-16-2011   #22
Alice
Widowmaker
 
Alice's Avatar
Default

Even though it has bugs, it's still a step :D..
Alice is offline  
Old 07-16-2011   #23
ToBeFree
Linux enthusiast
 
ToBeFree's Avatar
Default

Client-to-client networking is a nice idea, but doesn't it open new ways to cheat/hack in SRB2 netgames? I do not know if I am right, but I think so. :/
__________________
Spoiler: srb2.freiwuppertal.de & Linux help
ToBeFree is offline  
Old 07-16-2011   #24
MascaraSnake
aka SpiritCrusher
Moderator
 
MascaraSnake's Avatar
Default

Quote:
Originally Posted by Prime 2.0 View Post
stuff about me playing CTF in Nimbus Ruins yesterday
I don't know what you are smoking, but I left the netgame after five minutes when we were still in Noxious Factory. Also, no need to call me "competent in his own right", I'm a pretty inexperienced player ;)

But I admit your story sounds much more awesome this way :)

Quote:
Originally Posted by Agent Hack View Post
I'm soooo downloading now, and if I don't see this in 2.1... I'll nuke STJr. :P
I have the impression that some of you guys don't read. There's no way this will be added to 2.1. The official netcode is much more accurate and stable than this one. It's just that with high latency, this allows you to play more easily and stand a chance against people with low latency or the host. But I don't think the official EXE should cater to users with bad connections at the cost of accuracy. This should stay an alternative.
MascaraSnake is offline  
Old 07-16-2011   #25
Violo
Resisting Pony Avatar
 
Violo's Avatar
Default

Why can't it be added as an alternative? Like, as you're hosting a server, you can choose either the normal netcode or the CS netcode notifying that each one has its ups and downs.
Unless this is impossible, I wouldn't see this as being bad.
Violo is offline  
Old 07-16-2011   #26
MascaraSnake
aka SpiritCrusher
Moderator
 
MascaraSnake's Avatar
Default

Don't know if that is possible, but if it were, I would support that.
MascaraSnake is offline  
Old 07-16-2011   #27
EternallyAries
That Aries Title
 
EternallyAries's Avatar
Default

Well I'm so glad LXshadow got this to ready for release.

Now I got some things to ask.

Why cant I connect to the Master server at all? Even though you said it works fine.
__________________
There is nothing much to read here.
EternallyAries is offline  
Old 07-16-2011   #28
MascaraSnake
aka SpiritCrusher
Moderator
 
MascaraSnake's Avatar
Default

Quote:
Originally Posted by EternallyAries Red X View Post
Why cant I connect to the Master server at all? Even though you said it works fine.
If by "can't connect to the MS" you mean "it doesn't show any servers", that's normal. You can only join servers that run on this mod.
MascaraSnake is offline  
Old 07-16-2011   #29
EternallyAries
That Aries Title
 
EternallyAries's Avatar
Default

No I mean it wont let me connect at all to the Master Server at all

When i click join game net game it wont load up the list at all.
__________________
There is nothing much to read here.
EternallyAries is offline  
Old 07-16-2011   #30
Bbop800
hey
 
Bbop800's Avatar
Default

For some reason the EXE wont let me connect to the master server whenever I tried to host. "cshost 5030" gives me a connection error after a while, and choosing "Join Game" gives me no servers at all. And I know for a fact that there ARE servers out there, because I showed a couple of servers being hosted right now in vanilla SRB2. Port 5030 IS forwarded, and using "csconnect" doesn't work either. I have absolutely no idea what the problem is.

EDIT: Ignore what I just crossed out, that problem has already been resolved. Hosting still isn't working for me though.
EDIT2: asdfg, Never mind, when I try to join someone's server on the list, it said I was unable to join the game. Ugh.
__________________
Not sure what to put here.

Add me on Steam!

Last edited by Bbop800; 07-16-2011 at 01:54 PM.
Bbop800 is offline  
Old 07-16-2011   #31
LXShadow
Default

Thanks everyone for the feedback. I've got a lot of things to address here...

Quote:
Originally Posted by Sky The Destroyer View Post
Spoiler: Big Image
This happened to someone after we switched from CTF to Match with him holding the flag before we switched.
Quote:
Originally Posted by Hinote View Post
After changing from CTF to Match.. This is what happened.
Spoiler: Big image.


Quote:
Originally Posted by Kitoko View Post
I also noticed a few issues, my friend Sky quickly changed to Tails and started to fly, but he appeared to be as a flying Super Sonic for a bit, as well as when switching from Match to CTF, everyone was flying as solid spectators for a bit, it was silly for sure :P Also when shooting someone, I saw them in their death state for a moment, and they didn't get hurt.
Thanks for these reports! The "GOT FLAG!" and death state isues have been fixed. On the other hand, the spectator and character issues are only visual and temporary; so in the name of bandwidth conservation (and overall better gameplay), I'm letting those slip for now. (They're pretty fun to watch anyway. =P)



There are indeed times when players teleport and rings miss when they shouldn't. This is SRB2CS's equivalent of spike lag and control lag, respectively. Changing your playstyle may help - when under high ping, keep your distance from opponents and/or use rails more frequently. Doing this will generally make gameplay more accurate on the high-ping battlefield.

I'm also going to agree with most of what Prime 2.0 has said. But there's a point I'd like to make. As far as Match and CTF go, this mod was designed purely to give players a new alternative. We now have a choice between trying to play in control lag, or being assisted by automated lag compensation. We can now choose whether the host and nearby clients have an advantage, or whether all players have a fighting chance against each other. That's the focus of this mod. After five years of playing this game, I'd rather have a few unregistered ring hits than try to aim everything 200ms ahead of time.

Race mode... I'm still a bit iffy about implementing this. Because SRB2 is indeed very fast, the player prediction will be hard to do - as anyone with control lag could tell, predicting where a player will be in 200 milliseconds isn't easy. If anyone's interested in seeing how it may look without it, though, there's always the -force parameter!

Thanks again for your feedback, everyone! I can't wait to get in a big netgame and see how it performs. Unfortunately, not many people are around yet... guess I'd better start work on a time-zone mod!

Edit: I'm afraid MS support is new, and is still largely untested. It's worth reminding that you won't be able to successfully join a server if it doesn't have CS mode (cshost) enabled. There may also be some conflicts between this mod and SRB2CB (due to a similar version number). Other errors may be beyond my control - make sure no firewalls are blocking SRB2, and make sure that both ports (5029 and 5030) are opened on the UDP protocol. (Hopefully, this won't be necessary for much longer.)

Edit 2: Bbop800, you're right - MS support seems to have completely broken overnight. I'll be looking into this.

Last edited by LXShadow; 07-16-2011 at 02:33 PM.
LXShadow is offline  
Old 07-16-2011   #32
Prime 2.0
Actually a decent lazy bum
Moderator
 
Prime 2.0's Avatar
Default

Quote:
Originally Posted by SpiritCrusher View Post
I don't know what you are smoking, but I left the netgame after five minutes when we were still in Noxious Factory. Also, no need to call me "competent in his own right", I'm a pretty inexperienced player ;)

But I admit your story sounds much more awesome this way :)
Fff, mixed you up with Boinciel, sorry.
__________________
Science tells us that nothing can be proven, only rendered more likely to be true. If we do not question what we already know, how can we know, much less admit, when we're wrong? Such things are vital to progress.
Prime 2.0 is offline  
Old 07-16-2011   #33
Alice
Widowmaker
 
Alice's Avatar
Default

A question about this mod. Am I able to host a dedicated server? Every time I try to do so, it sigsevs me when someone joins.

I'm pretty sure in the batch file I do this.
Code:
srb2cs.exe -dedicated -internetserver -room 33
But when I do host, it turns out like this:
Code:
Map is now "MAP80: LIME FOREST ZONE"
Time limit disabled
Levels will end after a team scores 5 points.
>cshost 
Attempting to host on port 5030...
>cshost 5030
Player 1 has joined the game.
Unregistering this server to the master server...
I_ShutdownTcpDriver: shut down
signal_handler() error: segment violation
Alice is offline  
Old 07-16-2011   #34
Mystic
チェン!
Administrator
 
Mystic's Avatar
Default

Quote:
Originally Posted by LXShadow View Post
Race mode... I'm still a bit iffy about implementing this. Because SRB2 is indeed very fast, the player prediction will be hard to do - as anyone with control lag could tell, predicting where a player will be in 200 milliseconds isn't easy. If anyone's interested in seeing how it may look without it, though, there's always the -force parameter!
The thing is, SRB2's race mode is not interactive between players, so even when it breaks down and looks quirky, the fact that your opponent is teleporting a bit isn't an issue like it is in match.
Mystic is offline  
Old 07-16-2011   #35
LXShadow
Default

Quote:
Originally Posted by Hinote View Post
A question about this mod. Am I able to host a dedicated server? Every time I try to do so, it sigsevs me when someone joins.
I'm afraid dedicated servers aren't supported yet - sorry. People are still getting the occasional sigsegv during gameplay, so I think it's best that the game be made more stable before support for dedicated servers is added.

Quote:
Originally Posted by Mystic View Post
The thing is, SRB2's race mode is not interactive between players, so even when it breaks down and looks quirky, the fact that your opponent is teleporting a bit isn't an issue like it is in match.
That's true, but it's quite important that everyone knows who crossed the finish line first. This can be really hard to work out behind a ping of ~200 ms or more - in 200 ms, one could thok and appear several hundred fracunits away before anyone else notices it. I don't know... I haven't really experimented with Race mode yet.


In the meantime, many bug fixes are being done. Expect a new beta release soon!
LXShadow is offline  
Old 07-17-2011   #36
Iceman404
Tyler52 Forever
 
Iceman404's Avatar
Default

Quote:
Originally Posted by LXShadow View Post
I'm afraid dedicated servers aren't supported yet - sorry. People are still getting the occasional sigsegv during gameplay, so I think it's best that the game be made more stable before support for dedicated servers is added.



That's true, but it's quite important that everyone knows who crossed the finish line first. This can be really hard to work out behind a ping of ~200 ms or more - in 200 ms, one could thok and appear several hundred fracunits away before anyone else notices it. I don't know... I haven't really experimented with Race mode yet.


In the meantime, many bug fixes are being done. Expect a new beta release soon!
Is a player judgement necessary? Wouldn't the server announce who finished in order like it normally does? And what about the results screen? Or am I getting this wrong here?
__________________
Kart Krew Workshop Thread
SRB2 Top Down & SRB2 Kart
Iceman404 is offline  
Old 07-17-2011   #37
Jeck Jims
Oh, THAT guy...
 
Jeck Jims's Avatar
Default

This sounds great, but I don't understand why mismatchment is a factor in COOP, other than Tails flying people, there is no interaction. As for who finished first, who the hell cares, it's coop.
Other than that it seems like a great alternative for some. (although if OpenGL is dropped because this is implemented, I'm out of a hobby)
Keep up the great work!
Jeck Jims is offline  
Old 07-17-2011   #38
犬夜叉
aka: Inuyasha
Administrator
 
犬夜叉's Avatar
Default

Quote:
Originally Posted by Jeck View Post
but I don't understand why mismatchment is a factor in COOP
Enemies, linedef executors, et cetera.

While there's very little interaction between players in Co-op, there's a LOT of interaction between each player and the environment, which has a significant affect on everyone else.
犬夜叉 is offline  
Old 07-17-2011   #39
Jeck Jims
Oh, THAT guy...
 
Jeck Jims's Avatar
Default

Didn't know, but now I do!
Thanks!
I guess if I played this once I'd be able to answer questions like this myself. But I'm not big on the 1st person shooters, that's why I play Sonic. :p
I think I'll try CTF again though if for no other reason than to get the flag and run! Which will be easier with perfect control.
Jeck Jims is offline  
Old 07-17-2011   #40
I'll Begin
 
I'll Begin's Avatar
Default

Quote:
Originally Posted by LXShadow View Post
That's true, but it's quite important that everyone knows who crossed the finish line first. This can be really hard to work out behind a ping of ~200 ms or more - in 200 ms, one could thok and appear several hundred fracunits away before anyone else notices it. I don't know... I haven't really experimented with Race mode yet.
No, honestly, all you need to know is when each player finishes. You don't have to see them crossing the finish line as long as they can see themselves crossing it. Once they cross the finish line they'll send that time to the server, which in turn tells all the other players that that player has finished, start the runoff timer if it's the first player to finish, and then you compare the results at the end. Then the rest can just be the same as match's netcode (rings, monitors, some race maps have enemies).

Last edited by I'll Begin; 07-17-2011 at 01:05 PM.
I'll Begin is offline  
Old 07-17-2011   #41
LXShadow
Default

Quote:
Originally Posted by I'll Begin View Post
No, honestly, all you need to know is when each player finishes. You don't have to see them crossing the finish line as long as they can see themselves crossing it. Once they cross the finish line they'll send that time to the server, which in turn tells all the other players that that player has finished, start the runoff timer if it's the first player to finish, and then you compare the results at the end. Then the rest can just be the same as match's netcode (rings, monitors, some race maps have enemies).
Doing it that way wouldn't be too bad, but I'm reminded of a beta test I did before this was released. Even though it was incompatible, we tried out Race mode. All the time I was racing, however, I was constantly worried that my opponent was actually in front of me, even when it might have seemed otherwise. Their ping was about 257 ms, so when we were close-up I had no idea who was really in front. (This was a real downer for my confidence, so I lost the race, too. =P </excuse>)

However, I'll try my best and will probably implement Race mode soon, when Match and CTF are stable enough. In the meantime, give Beta 2 a try!
LXShadow 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:05 PM.


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