Jump to content

Allow A Little Bit More CPU On Request


Hirnsausen

Recommended Posts

Some of my ships have a problem: some scripts don't run on them. In particular, the Damage control script aborts always with the error "CPU Overload Shutdown".

I suggest, that a player can request a GM to come and inspect that ship, and assign just enough CPU that the scrip the player ponts to, will function. Of course, the GM also looks what this script does, before making the decision to allocate a bit more CPU to that ship. NQ would have to make some rules and publish them, what kind of scripts would be supported with such a CPU request.

Edited by Hirnsausen
Link to comment
Share on other sites

  • 2 weeks later...

CPU overload refers to an instruction limit being reached. It has nothing to do with your actual PC struggling. It's simply a number NQ have decided to lock down to some arbitrary amount. Damage Control is a complex script. The number of elements factors into the overload and a bunch of other things.

Many of my scripts are highly optimized, and execute at 4ms, but will still overload at 5ms. Then other scripts execute at aa cool 24 ms and don't overload. The reason is because not all instructions are equal. Mine can still do more than a 24 ms script, but time and true CPU resources play zero part in any of it.

NQ should allow a slider for the player to set their own limit.

Link to comment
Share on other sites

7 hours ago, EasternGamer said:

...It's simply a number NQ have decided to lock down to some arbitrary amount. 


...NQ should allow a slider for the player to set their own limit.

I'd assume this cap prevents it from either running in to other issues in the client, or causing problems when someone either intentionally or not triggers a bad script, but such a slider in the game-settings somewhere would probably assist with optimization to a degree.

Link to comment
Share on other sites

On 3/4/2022 at 8:41 PM, Taelessael said:

I'd assume this cap prevents it from either running in to other issues in the client, or causing problems when someone either intentionally or not triggers a bad script, but such a slider in the game-settings somewhere would probably assist with optimization to a degree.

Yes, and no. I'm not from NQ, so I wouldn't know the reason behind the limit being a specific number, but Lua is poorly made in a way that it's an instruction based limit based on Lua instructions, rather than actual time based. I know plenty of ways a script well below CPU overload can lag a client for longer than 5 seconds. As in, only one frame will be sent every 5 seconds. 

What I'm getting at is it may have been placed there to prevent it, but it doesn't necessarily prevent it if someone is intentionally doing it or unintentionally doing it. 
I, of course, won't say what will cause such lag on a public forum such as this, but it's not uncommon.

Just as an example that won't cause lag but has a different execution time, but the same instruction count, is multiply and addition. A multiply operation at a CPU level is far slower than an addition operation. You can look it up. So is a division slower than a multiplication.
It's an interesting thing really.

Anyway, yeah, a slider would be great addition. If I want my game to burn, I want it to burn! XD

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...