
NET, and used IL injection to insert security systems. The original PB made by Keen used the built-in compiler of. They prioritize using those resources Noone "implemented a whole compiler". But Keen as a company isn't willing to spend the time and money to do it. I've been fighting to get it since day 1 as - like you - I dislike the current one, since it's way too close to the game engine itself. That API would have made the current PB a whole lot better and safer as it is, we could even shunt the PB over on its own thread and it would have been better performance wise than any other solution. You will need an API in between to support it. You can't "just add a simple" anything if the very base of the game doesn't support being called in such an off-hand way. I think you underestimate the amount of work that would be. They would not have spent the time needed to add a secondary runtime, no matter how simple. The only reason we have scripting at all is the fact that they could use a preexisting compiler. I added support for the newer Roslyn compiler instead, which provides easy access to source code based security injection instead to avoid all the complexity and bugs of an IL based system. I should add that to your suggestion, shouldn't Noone "implemented a whole compiler". 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. It would also probably break a whole lot if not all scripts out there. 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. We've spent a lot of time trying to solve these issues. and then you're in an undefined state which is quite likely to either crash your game or at best glitch it out badly. Even if you could kill it, it might very well be in the middle of changing some game state. 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.

It's normal compiled code just like the game itself. It's not running on an interpreter or anything like that. 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.
