SRB2CS: With new Match/CTF netcode! (BETA 5)

Status
Not open for further replies.

LXShadow

Member
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.
 

Attachments

  • SRB2CSBeta5.zip
    3.5 MB · Views: 4,834
Last edited:
Awesome, now maybe I'll actually stand a chance in match mode instead of getting 200+ ping all the time from being so far away :O I'll play this once I'm uncapped
 
Interesting, I was wondering when this would be released. Going to try it out.
 
A few hours ago I played this as part of a final test before release; before I say anything else, I'll get the bad stuff out of the way.

Client-side networking is a very big tradeoff, and not always a favorable one: if you've played another FPS online, I'm sure you're familiar with the issues of lag in which shots you fired that appear to hit on your end don't count, or shots that you didn't see on your end or saw somewhere else somehow hit you. Perhaps inadvertently, SRB2's shooter gameplay surrounds most everything that gets punished by this the most; extremely fast and instantly changeable player movement and a central focus on dodging projectiles that take time to get to you. The uncertainty of lag in this situation thus causes much greater issues in SRB2 than it would in a normal first person shooter. In the end, in a reasonable latency situation the ability to see accurately what is happening(hereto referred to as object accuracy) and compensate for that is often more valuable in SRB2 than some of the gains here.

Rings aren't the only thing to bug up from this, however; as mentioned in the opening post, object behavior, not just timing, is sometimes adversely affected by this; oftentimes, a console message would pop up informing me that a monitor had erroneously been popped twice. What this means is that more complex things, such as in singleplayer and coop, would function incorrectly or not at all under the netcode as it currently exists. SOC is completely out of the question. Netcode like this could never be used as a replacement for what is already in vanilla SRB2 because of this instability.



But you know what? I said this was a big tradeoff. A BIG tradeoff. And I got the honest problems out of the way first so I could point out how amazing this is without an uncomfortable "but" on the end.

I mentioned that I tested this a few hours ago, that I got to see it in all of its glory and all of its folly. I saw instantaneous response, I saw player joins not freezing up the server, and I saw all those things I mentioned earlier along with the instability of OGL that caused it to be removed from this release.

And then I saw Nimbus Ruins. I saw myself flinging myself around recklessly as sonic, jumping off sides and thokking back on to higher elevations, moving full speed. I saw myself, spiritcrusher, and spazzo pitted against Inuyasha, and the author of this mod, who lives in the United Kingdom.

I've been playing SRB2 for more than 5 years, Spazzo for just as long as well as being the host, with spiritcrusher being competent in his own right; us three VS a team of two, one of whom lived across the Atlantic ocean, a distance of at least 3,000 miles.


We were beaten 5 captures to 3.


Something like this was so unthinkable, so impossible before SRB2CS's development that it's hard for me to process that it actually happened; A massive latency netgame that wasn't only playable, but playable enough that someone so overwhelmingly farther from the host, who was on the team opposite of the host which also outnumbered his own team, could win on Nimbus Ruins by a wide margin.

For people with connection issues, this is a convenience and an improvement. For people outside of the United States, this is godsend, something that takes a part of the game that was almost completely locked off from them and suddenly brings it within reach; for me, it will mean being able to play with friends who I would never ask for a netgame, or be asked for one, because of the simple understanding of the time that such a thing was impossible.

And now it's not impossible. It's not just possible, it's plausible, it's feasible, it's damn near practical.


And for that, I'll forgive what instability I saw, and the annoyance of not being able to compensate for my latency. For that, I'll wait in anticipation of LXShadow's next move, because in some ways, it could be an even bigger one for us back in the states.


Because sitting in zones.dta are 10 maps belonging to a gametype that has very little, if any, direct interaction between players, almost no complex object interaction to worry about, and that place a very high value on timing, platforming, and quick aerial control.


Because if, and I dare hope when, circuit mode becomes supported by this netcode, there will be no downside to this netcode's use. And when that happens, LXShadow's work will truly, truly shine.
 
Mister Prime Two Point Zero said:
For people with connection issues, this is a convenience and an improvement. For people outside of the United States, this is godsend[...]
Because if, and I dare hope when, circuit mode becomes supported by this netcode, there will be no downside to this netcode's use. And when that happens, LXShadow's work will truly, truly shine.

Amen to that. A-fucking-men.
 
Last edited by a moderator:
Just gave it a lagless-shot in an actual match server with 2 players. That was unthinkable.

Finally I'll have the pleasure of shooting down people in the servers without that horrible lag on my end.
 
Last edited:
Nice! You finally released this! I remember beta-testing with Spazzo a while back. Going by the name "Wind".

I'm soooo downloading now, and if I don't see this in 2.1... I'll nuke STJr. :P
 
Just in time for the 2.1 Public Beta maps eh? I will try this when someone hosts a server that's not full.
 
This is Amazing!, I played in a server with 12(+)players with no Clag at all. I still cannot believe this actually works!.
 
This pretty much fixes the one thing I hated about SRB2 while playing online. You might occasionally miss an enemy you should have hit, but I think it's a great tradeoff to have the netcode run really smooth, without c-lag or spike lag.
 
rmr14m.png
This happened to someone after we switched from CTF to Match with him holding the flag before we switched.
 
Also, when switching from match to CTF, everyone starts flying around as visible, visible spoectators are awesome!
 
Alright so I went to go host this not long ago and I will say a few things on regards of Spazzo asking a favor.

This is absolutely amazing! I'm not kidding. Hosted on the ms, first started up with a player limit of 7-8 (Usually for me, because after 8 that's when my server starts to lag normally.)
Players joined, I noticed it was solid at 8 players. Boosted up the player limit to 10, then 12. Amazing how everyone was able to play I was astonished. I got to play with players who are amazing at this game, without the complaint of clag or lag being in the way, the netcode defiantly has improved.
So to say I am indeed impressed with the work you did on the netcode LXShadow. Don't be so modest that it isn't big, it is a big step to improving the srb2 netcode. It does have potential.

Now all we need to do is see OpenGL in this, and a few gametypes like Race and Coop, and all will be happeh and a few things from 2.0 like the admin tidle and the verify command. Oh who am I kidding? Let's say a bunch of things to make it complete. It would be great to see this all! I know it is just a beta, but I hope to see more compiled into this.

A few concerns though, I noticed sometimes when I shoot someone I miss even though I know I hit them. Players sometimes teleport, but I guess you guys already know this from the start.

A glitch has happened as well:
After changing from CTF to Match.. This is what happened.
srb20051.png
Other than that, this mod is amazing. In terms of netplay, because we all know how much we love to play in netgames. This does make srb2 more enjoyable, since mostly my complaints about srb2 is its netgame lags (this probably goes for the most of you.)

Keep it up! I'm sure going to be hosting this more if I want a great netgame. C:

Those who were in my netgame, should probably post something awesome.. Because.. I know you usually lag in my server by how far away I am.

---------- Post added at 04:54 AM ---------- Previous post was at 04:50 AM ----------

EDIT: I just noticed Sky was the one posting this...

He beat us to it.. I just posted that as well.
 
A long and very fruity post!

So that's what I looked like! O_o wow!

Also yes, i did join your netgame Hinote, there was absolutely no lag at all, it was truly astounding, it felt like magic hit all through me, theres no explanation for this, except complete astonishment, and I'm sure everyone else will be feeling that same astonishment too, our friend N.Cenz was having no troubles at all, and the gam played very smoothly, no graphical glitches, no graphical spike lags, no spike lag on my end, it was all very very pretty! I was hoping to be an admin, to help out Hinote, but there was no verify yet, but you knew that already!

I'm also suggesting, maybe add an ability to have multiple admins, as well as voices, or an admin list, that automatically gives admin to a specific IP address, that would probably help out a lot in netgaming, and maybe you could, since you're reworking the netcode and all.

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.

Hinote' server was much more enjoyable (I already enjoy it to bits.. :P) And I know she was happy too, being able to hold more players, and nobody around was having lag, except some people who's internets were starting to fail out, but that didn't disrut the game at all, and I had lots of fun!

This game, has my golden thumbs up!
000042065839.jpg
 
Last edited:
ALSO JUST TO CLEAR THINGS UP
This isn't lagless netgaming, not by a long shot. That is simply unfeasible!

Also, it's a beta, bugs are bound to come out at night and loot your house and then killing your relatives in their sleep.

ALSO!!!!! This is not a substitute for the regular netcode, this is an alternative for people (LIKE ME!) who can't play in ANY server without a minimum of 300 latency.

That said, I'm from south america and beat the canadian host on several games:
2zh1mya.png
 
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top