This object is in archive! 

[Programmable Block] Dynamic PCU depending on script complexity

TheWarMaster97 shared this feedback 2 years ago
Not Enough Votes

I understand the difficulty in moving programmable blocks outside of experimental mode, but I think there must be some way to do it.


One way could be to use PCUs that vary depending on the complexity of the script that is running on the programmable block. For example while the script is running the game keeps track of the number of instructions that are executed on average each second, and assigns PCUs to the programmable block accordingly. If the PCU budget of the player / faction is exceeded the execution of the programmable block that is using more PCU is automatically interrupted.


Currently if I recall correctly each programmable block has a budget of instructions that can be executed in a tick, but players can still abuse programmable blocks by using more of them. Using PCUs will allow a single programmable block running a complex script to prevent more programmable blocks from being used, while still allowing the usage of many programmable blocks running efficient scripts.


If using PCUs is problematic since it's used also for other blocks a new performance cost unit specific for programmable block scripts could be created.


Players who use scripts should also be able to specify a PCU limit for every programmable block they build (obviously the limit should be lower than the limit decided by server admins) by using a slider. This will allow players to know that their programmable block won't exceed a certain amount of PCUs.


Alternatively if dynamically modifying the PCU count of the programmable block is a problem, the game could let the player decide in advance the PCU count of a programmable block, and the programmable block will always use that amount of PCUs even if it's not running. A certain amount of PCUs will correspond to a certain amount of instructions that can be executed every tick / second, and if the script exceeds that limit it will be terminated.


Server admins should be able to specify how much PCUs running a single instruction costs (can be a fraction of a PCU).


Furthermore for people playing offline, they could set PCU limit to unlimited and use as many scripts as they want.


If you agree with this suggestion please give this post a thumb up, thank you.

Replies (1)

photo
1

the problem with programmable block is multiplayer and lag can create

good idea but lets me add something from my self. (multiplayer only)

1 stoping script from running on server if owner of grid is offline

2 programmable block requests manual activation to work to prevent lag

3 special update function with hz slider more hz more power consumption this can prevent user from

spamming a lot of programmable block on one grid and create lag (this can be in single player)

4 turning on/off programmable block is keeping time to next update to prevent "force reset"

6 turning script off is vehicle is unloaded

7 if server is overloaded all active programmable block is gets stooped

+ your stuff

and this can get on multiplayer to be onset

is be nice to use it on multiplayer to make simple task more easy to do

Leave a Comment
 
Attach a file