A way to move Programmagle block out of experimental mode
As I understand, the programmable block was moved to experimental mode due to it's unpredictable performances strain and so, it's PCU score can't be defined.
But what if the user could define the PCU by himself?
My idea it to implement a configurable watchdog on the programmable block. This watchdog would make sure the script runs within a predefined time. Otherwise, the watchdog will stop the execution and lock the PB until recompiled.
The time limit of that watchdog would be directly linked to the PCU cost of the PB and could be adjusted at the compilation time by the user.
That way, a small airlock script that runs fast could be set to cost less PCU than an heavy inventory management scripts.
Thank you for your attention. Please tell me if this is a good or bad idea.
We've wanted to do this ever since the beginning, but I'm afraid you can't arbitrarily kill the PB after an arbitrary time. It's not running on an interpreter or anything like that. It's normal compiled code just like the game itself. It's not running on a thread but the main game thread, because the game engine isn't threadsafe and there's no threadsafe layer between the PB and the game. Even if you could kill it, it might very well be in the middle of changing some game state... and then you're in an undefined state which is quite likely to either crash your game or at best glitch it out badly. We've spent a lot of time trying to solve these issues. The only real solution I see is a complete PB API rewrite, to separate it and make it threadsafe, and I can't say I see that happening any time soon. It would also probably break a whole lot if not all scripts out there. I would do this job as well if I knew it would be merged and had a chance at making it go into non-experimental mode.
We've wanted to do this ever since the beginning, but I'm afraid you can't arbitrarily kill the PB after an arbitrary time. It's not running on an interpreter or anything like that. It's normal compiled code just like the game itself. It's not running on a thread but the main game thread, because the game engine isn't threadsafe and there's no threadsafe layer between the PB and the game. Even if you could kill it, it might very well be in the middle of changing some game state... and then you're in an undefined state which is quite likely to either crash your game or at best glitch it out badly. We've spent a lot of time trying to solve these issues. The only real solution I see is a complete PB API rewrite, to separate it and make it threadsafe, and I can't say I see that happening any time soon. It would also probably break a whole lot if not all scripts out there. I would do this job as well if I knew it would be merged and had a chance at making it go into non-experimental mode.
We've wanted to do this ever since the beginning, but I'm afraid you can't arbitrarily kill the PB after an arbitrary time. It's not running on an interpreter or anything like that. It's normal compiled code just like the game itself. It's not running on a thread but the main game thread, because the game engine isn't threadsafe and there's no threadsafe layer between the PB and the game. Even if you could kill it, it might very well be in the middle of changing some game state... and then you're in an undefined state which is quite likely to either crash your game or at best glitch it out badly. We've spent a lot of time trying to solve these issues. The only real solution I see is a complete PB API rewrite, to separate it and make it threadsafe, and I can't say I see that happening any time soon. It would also probably break a whole lot if not all scripts out there. I would do this job as well if I knew it would be merged and had a chance at making it go into non-experimental mode.
We've wanted to do this ever since the beginning, but I'm afraid you can't arbitrarily kill the PB after an arbitrary time. It's not running on an interpreter or anything like that. It's normal compiled code just like the game itself. It's not running on a thread but the main game thread, because the game engine isn't threadsafe and there's no threadsafe layer between the PB and the game. Even if you could kill it, it might very well be in the middle of changing some game state... and then you're in an undefined state which is quite likely to either crash your game or at best glitch it out badly. We've spent a lot of time trying to solve these issues. The only real solution I see is a complete PB API rewrite, to separate it and make it threadsafe, and I can't say I see that happening any time soon. It would also probably break a whole lot if not all scripts out there. I would do this job as well if I knew it would be merged and had a chance at making it go into non-experimental mode.
Currently the game without scripts (and some mods) ranges from tedious at best, through frustrating to impossible at worst when you build something a little bit more complicated than one big grid with few supporting subgrids that use only "reverse" on pistons/rotors. (Even then looking at button bar is confusing with many same-looking buttons).
What about keeping programming block in but allow only "signed" scripts to run on them if experimental mode is disabled ?
Currently the game without scripts (and some mods) ranges from tedious at best, through frustrating to impossible at worst when you build something a little bit more complicated than one big grid with few supporting subgrids that use only "reverse" on pistons/rotors. (Even then looking at button bar is confusing with many same-looking buttons).
What about keeping programming block in but allow only "signed" scripts to run on them if experimental mode is disabled ?
Replies have been locked on this page!