This is my problem of today, last Garry’s Mod update seems to have changed how lua is handled, and now it’s very tied to thinkrate (either that, or I never encountered servers with tickrate other than 66 before).
I used this CPU program to output a byte each think call:
testloop: mov #65536,123; jmp testloop;
CPU was attached to Address Bus, which output data rate per second. I expected value 52 at all times (although naÑ—vely, it should have been 100 to be honest). The value varied between servers… (I never noticed this before). This is a major problem, because it also affects amount of instructions per second!
This is how tickrate correlated with the resulting value (addr_rate is rate on address bus, ops is operations per second, should have been 2500):
- tickrate=33, addr_rate=28, ops=1250
- tickrate=66, addr_rate=52, ops=2500
- tickrate=100, addr_rate=80, ops=3750
I will fix this. The number of operations per second will always be 3750 (assuming frequency is equal to 5000), but rate on address bus would differ (because IDLE synchronizes with tickrate). This means instructions per tick calculations will change…
This means nothing much, except that contraptions which are already made will run slightly faster (approx. ~1.5 times faster).
By the way, frequency doesn’t match operations per second, and this won’t be changed I’m afraid. It’s historical, deal with it. ZCPU generally contains a lot of flaws that aren’t supposed to be there (I was stupid when I wrote it), but I can’t really change them now without breaking a lot. Things like why there is extra “0″ byte even if opcode has only 0 parameters…
Recent comments