Facepunch / sbox-issues

176 stars 12 forks source link

Ability to change server tickrate #56

Closed cr4yz closed 3 years ago

cr4yz commented 3 years ago

What can't you do?

I can't update the server tickrate, it is locked at 90 by default.

How would you like it to work?

A property in Time or Game that can change the tickrate. Either an integer or float will do (100/.1)

In skill-based movement gamemodes tickrate makes a difference to how maps are played. 66 tick requires more methodical movement to gain speed. 100 tick makes speed gain much easier and the gameplay becomes more about precision. Mappers will design around this.

Changing tickrate can also be useful for supporting more players in a server, something mmo like might want a tickrate of 20-30

Nickishero commented 3 years ago

Changing tickrate may cause issues.

Tickrate is set to 66 in CSS, DoD S and TF2, and 30 in L4D and L4D2 because changing it causes server timing issues.

Also you could read this. "it was locked back in 2010 due to negative effects at higher tickrates - such as doors not opening as quickly, and potential differences in how the weapons & game physics handled." - A quote about why tickrate was locked to 66 in TF2.

To go further on that topic, you should not use anything else than 66tick on TF2, there are many parts of the game engine where calculations are based on tick 66, so this’ll fuck up a lot of things (e.g. weapon recoil). That’s why the tickrate is locked to 66 in TF2.

On CS GO Valve fixed all these tickrate issues, so it can be modified without any issues. If you really want to be able to change tickrate, this should be taken into consideration early in development.

Also, as the Valve wiki said, a tickrate of 180 (for example) would double the CPU use and bandwidth of your server, and will negatively effect your server provider if you're not certain it's something you can do (compared to the locked 90-tickrate of the server as of now).

So if we'd be able to change server tickrate, in my opinion it should still be limited to a certain max (with possible higher limits in the future due to development and innovation in hardware), and users should be able to choose how much ticks they want to process clientside (of course this cannot be over the server limit).

JustPlayerDE commented 3 years ago

I dont think that Source 2 will have these kind of issues when it is already fixed in CSGO otherwise facepunch could simply implement that fix themselfs (as it would be required anyways)

you also cant really compare CSS, DOD S, TF2 and L4D to s&box as s&box is not limited to one type of gameplay (and it is on source2)

in my opinion you should be able to change the tickrate as in some cases you wanna have a very high (e.g. 120 for a deathmatch one) while you also wanna have a low tickrate (e.g. 20 in a gamemode where it doesnt depend on tickrate to work)

it also doesnt need to be limited as the host can simply limit it by limiting your cpu usage or simply doesnt allow you to change it at all (but it doesnt make much sense to have a 999 tickrate, except when you need that)

Nickishero commented 3 years ago

I dont think that Source 2 will have these kind of issues when it is already fixed in CSGO otherwise facepunch could simply implement that fix themselfs (as it would be required anyways)

Yeah, as I said it may cause issues. Which is probaply why it is locked to 90 as of right now.

you also cant really compare CSS, DOD S, TF2 and L4D to s&box as s&box is not limited to one type of gameplay (and it is on source2)

in my opinion you should be able to change the tickrate as in some cases you wanna have a very high (e.g. 120 for a deathmatch one) while you also wanna have a low tickrate (e.g. 20 in a gamemode where it doesnt depend on tickrate to work)

I agree

it also doesnt need to be limited as the host can simply limit it by limiting your cpu usage or simply doesnt allow you to change it at all (but it doesnt make much sense to have a 999 tickrate, except when you need that)

Should have a limit or some way to make a limit in my opinion, I don't think host providers would like it if you run your server on a tickrate of 999. It would make the CPU run hard and a higher (then probaply needed) bandwith usage.

Tripperful commented 3 years ago

Maybe Facepunch should also limit how many props you can spawn because it will cause lag? Or how many slices of pizza you can eat a day? If a server owner sets their tickrate to 10000 or -3.1415, well, good luck to them.

People should use their brainpower to set appropriate tickrate if they wish and it's not the job of Facepunch to make sure they don't do dumb shit.

Trojaner commented 3 years ago

Having some kind of limit would still make sense as some tick rates are just completely unrealistic and have no real world use case. All they would do is freeze some random devs or server owners game.

cr4yz commented 3 years ago

99.99% of gamemodes are going to be between 20 and 130, could update tickrate on the fly depending on server load.

Clamp it between 20 and 500 or something.

If a variable tickrate is breaking anything those things should probably get fixed.

TomDotBat commented 3 years ago

Afaik the tickrate is only allocated 8 bits in the Source networking protocol so the hard limit is 256. Realistically, no-one should ever have a reasonable excuse to exceed 128 but I don't see the problem in maxing at 256 for the mad scientists out there. I could be completely wrong here, but this is what I've observed from Source 1.

ZehMatt commented 3 years ago

99.99% of gamemodes are going to be between 20 and 130, could update tickrate on the fly depending on server load.

Clamp it between 20 and 500 or something.

If a variable tickrate is breaking anything those things should probably get fixed.

If you have a variable tick rate that makes it a lot harder for the client to predict anything. Also going anywhere beyond 128 is a waste of CPU resources, correctly implementing your logic and having everything consistent is the key.

garrynewman commented 3 years ago

Global.TickRate