Making scripts/Programs more server friendly
First, currently servers can set a limit on the number of Programmable blocks. But how many players only have 1 craft or base? Many craft have special functions and many scripts are only used for certain things. Example a wheeled craft which also can fly. Use driving scripts to control wheel system, but assorted thruster control scripts when flying. Vector thrust with thrusters on rotors, or launch scripts that reduce H2 used when leaving a planet are only used while leaving the planet, compass scripts only used when on planets. And none of them used when using base systems. Or if you switch to a mining craft, you don't need the same scripts.
So instead of a limit on the number of PB's per person, make it a limit of the number of active/powered PB's per person. Players can then just switch off the ones not in use allowing for wide options of scripts without having to reload scripts or grind down and rebuild else were.
Also, Take a page from Stationeers. Some programs don't need the power of a PB or the language it uses. Example, solar trackers, power/cargo monitoring, etc.. For these make a new low level PB that uses a simpler machine code like MIPS and has a limit on the number of lines per tick with only 1 command per line. No long complex math code on a single line. Just comments on the same line as code. Also, make it something like a quad core with 4 LPB's in one block to help keep block count down. Call it a QLPB.
I can get your points.
But for programmable blocks there has to be a limit like "maximum allowed runtime", "maximum script execution time" + some option to set the blocks to a pre-definied schedule time (so it's not getting triggered every second when it's a big script), even with "per person active pb's" it won't be enough
most servers have this thing disabled, and that's for a good reason, just 4-5 Inventory Manager scripts can lead to huge server lags, in this case a simple fixed timer , like ALL programmable blocks the world get triggered at the SAME INTERVAL(1-5min or something is enough for inventory stuff) would give some relief for lag
something like pre-definied scripts would be also awesome, like tested,"lag-free" ones
I can get your points.
But for programmable blocks there has to be a limit like "maximum allowed runtime", "maximum script execution time" + some option to set the blocks to a pre-definied schedule time (so it's not getting triggered every second when it's a big script), even with "per person active pb's" it won't be enough
most servers have this thing disabled, and that's for a good reason, just 4-5 Inventory Manager scripts can lead to huge server lags, in this case a simple fixed timer , like ALL programmable blocks the world get triggered at the SAME INTERVAL(1-5min or something is enough for inventory stuff) would give some relief for lag
something like pre-definied scripts would be also awesome, like tested,"lag-free" ones
With the machine code tick based system, server load would be far less. Because it wouldn't matter how big the program is, only a certain number would be done in a give tick. And math would have to be done 1 function at a time. For next/while loops whould not be doable on a single line. Here is an example of a solar tracking program I use in Stationeers which tracks in both axis, resets to sunrise at night, and turns on an aux gen if batteries get too low. It can run through everything in 1 tick and you are only allowed 128 lines per tick. I think total code size is limited to 256 lines. Comment lines and blank lines count against the 128:
With the machine code tick based system, server load would be far less. Because it wouldn't matter how big the program is, only a certain number would be done in a give tick. And math would have to be done 1 function at a time. For next/while loops whould not be doable on a single line. Here is an example of a solar tracking program I use in Stationeers which tracks in both axis, resets to sunrise at night, and turns on an aux gen if batteries get too low. It can run through everything in 1 tick and you are only allowed 128 lines per tick. I think total code size is limited to 256 lines. Comment lines and blank lines count against the 128:
Replies have been locked on this page!