Jump to content

Allow A Little Bit More CPU On Request


Hirnsausen
 Share

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

Oh, I did not know that. Thanks.

However, the strange thing is, that the same Damage Control script runs on some of my ship, but not on some others. I need to look more into the possible causes.

Link to comment
Share on other sites

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...