r1ch.net forums
* Home Help Search Login Register
r1ch.net  |  r1ch.net stuff  |  R1Q2  |  Topic: netcode
Pages: [1]
Author Topic: netcode  (Read 7666 times)
« on: September 23, 2004, 04:38:36 am »

Ok, now you got me all confused..

Played a match on a server running your dedicated binary some days ago, here's what I experienced:

Used nocheat client and had 60-70 ping but it felt like 40, so me and my clanmates had a blast, great gameplay feeling.. actually alot better "feeling" than other servers (not running your stuff) where I have ping ranges from 30 to 40.

Today I tested you client files on a server NOT running your binary.
cl_maxfps 30 (ping 55)
r_maxfps 1000

The fps felt great, only thing was that my ping got high and everything felt wrong.

changed to cl_maxfps 250 (ping 39-45)

Now everything felt alot better..

explain this to me: if everyone on the last server would've used cl_maxfps 30 would I have had a better gameplay experience, and a lower ping? (since the others then aren't flooding the server with packets)

or is it just something like that binary isn't really optimized or fast enough, and yours is?

btw, imo your server binaries rule

« Reply #1 on: September 23, 2004, 06:36:03 am »

Setting cl_maxfps 30 and r_maxfps 1000 means my ping gets higher (not important) but it also doesn't let me jump boxes in AQ2! I need to make myself a proper config for this client before I try and critisise it.

Posts: 2625

« Reply #2 on: September 23, 2004, 09:47:46 am »

The FPS thing is a tricky issue. It's even harder to effectively measure differences beyond "feel" because of the way Q2 protocol works. The more packets/sec you send, the lower your reported ping will be - but it will still have the same latency no matter what FPS you use, it will just be reported incorrectly. Thus you can't really trust what your in-game ping is reported as.

The net/render FPS separation is a major change to the client so there will be a different feel to how Q2 originally works. In normal Q2, the event loop goes something like read input -> send packet -> render frame. With R1Q2, this changes and becomes read input -> apply input to the packet -> (send packet sometimes) -> render frame. So for every 3 or 4 rendered frames you are simply applying the movement to a packet that hasn't been sent yet. Then when a "packet frame" comes up you are sending the cumulative input of the 4 previously rendered frames in one packet. Obviously this has some limitations since your movements will no longer be 1:1 with input:packet. I've tried as best as I can to keep it as close as possible to the original, but short of increasing cl_maxfps it will never be the same.

This also has a lot to do with q2 physics on the server side. There exists an exploit in Q2 where a player can jump onto crates of 64 units when running at >= 100 packets/sec. Unfortunately many people regard it as part of gameplay now so it doesn't get considered a cheat as such. How this works is kind of hard to explain, but I'll try:

When you do a jump, imagine yourself doing a semi-circle movement. At the very peak of that movement, you are 64 units high. However the server will only apply your movement every time you send a packet, so the semi-circle is "sampled" every time the server gets a packet. This diagram should explain better:

The blue dots are what happens with a low cl_maxfps - less packets are received so your moves are not sampled as often. The green shows a high cl_maxfps - notice that at the very top of the circle there is now a sample taken, thus you are able to get onto a crate or whatever.

Unfortunately this isn't really fixable other than disallowing high FPS on servers so everyone has a fair playing field. It's just the way the engine works.

I really would advise against going over 100 cl_maxfps. Most of the original Q2 clients and modified clients limit internally at 100 fps, but due to R1Q2's separation, no such limit exists. By using cl_maxfps of 250 you will be uploading at almost 15KB/sec to the server!! Compare this to the 1.8KB/sec of a cl_maxfps 30 client and you realise you will be using a LOT of server bandwidth and CPU time for all those extra packets.

To be honest I've no idea why you are getting a better gameplay on R1Q2 server. I can't imagine how any of the small netcode changes I've made would cause such a drastic effect as you describe, but who knows, maybe they did Smiley.

For now though to maintain the feel of other clients you are probably best using cl_maxfps 100 to be able to crate jump and exploit other physics bugs Smiley. I'll see if I can improve how the lower FPS experience feels, personally I play with cl_maxfps 30 for a long time now and I'm quite used to it and it feels no different to normal clients now. But maybe not for you Smiley. If you can explain how it "felt wrong" in more detail I'll see if I can focus on some kind of area that would be causing it.

Thanks for giving my client a try! Please let people know about it, especially if you know someone running a server, there still exist a lot of Q2 servers that are vulnerable to some major security problems by not running an updated binary.
« Reply #3 on: September 23, 2004, 04:30:30 pm »

[23:19:22] <@[j]`FragBait> I dunno who played on the german server
[23:19:28] <@[j]`FragBait> but we had like 60-70 ping
[23:19:38] <@[j]`FragBait> and I contacted r1ch and asked
[23:19:41] <@[j]`FragBait> haven't read it yet
[23:19:44] <@[j]`FragBait> but here's his reply:
[23:19:45] <@[j]`FragBait> http://www.r1ch.net/forum/viewtopic.php?p=243#243

[23:22:19] <@[j]`FoxX> pretty sick answer
[23:22:24] <@[j]`FoxX> making alot of shit
[23:22:25] <@[j]`FoxX> to show u
[23:22:25] <@[j]`FoxX> lol

[23:24:12] <@[j]`FragBait> Cheesy
[23:24:21] <@[j]`FragBait> I'm going to try to help this guy out
[23:24:26] <@[j]`FragBait> it's a frikkin nice thing he's done
[23:24:49] <@[j]`FragBait> and whoever played, didn't it feel kinda sick to play with that high ping and that "low ping" feeling at the same time?
[23:25:00] <@[j]`FragBait> he's obviously on to something with his binaries..
[23:25:11] <@[j]`eX> sant <-- (this means "true" in swedish)

(chatlog taken from our private channel)

I'm at quakenet channel: #j come by sometime and we'll chat Smiley
I think we could be good for eachother Smiley ..I'm a member of the united aq2admins so I know alot of people that runs servers Tongue .. anyways, welcome to #j  !

Pages: [1]
r1ch.net  |  r1ch.net stuff  |  R1Q2  |  Topic: netcode
Jump to:  

Powered by SMF 1.1.19 | SMF © 2013, Simple Machines