S&Box Starfall Addon

Starfall allows coding freedom to all players in realtime and with enough restrictions to not break the game.

I’d like to start experimenting with porting it to S&box if I can get a key.

This is the current Garry’s mod version:
StarfallEx: GitHub - thegrb93/StarfallEx: Starfall, but with active development and more features. Write Garry's mod chips similar to E2, but in lua

Bunch of StarfallEx stuff I made:

6 Likes

I think the main hurdle will be dealing with infinite loops. I think this may be dealt with by keeping a thread to monitor the main thread execution time and interrupt it if it should get stuck.

The next issue is ensuring that there’s a way to restrict the compilation so that only provided functions are allowed to be used. I’ll also have to make sure unsafe is completely off limits as well as other potentially harmful language features. Perhaps requires a module for sandboxed C#.

1 Like

I am really sorry for the inconvenience but even after reading this post and looking at the GitHub, I don’t really know what this is. :sweat_smile:

But I can see that there was a lot of work put into this and I hope you could elaborate a bit for me so that I could understand appreciate this better. Thank you in advance :slightly_smiling_face:

1 Like

It’s so you can code in real-time inside the game with other people.

1 Like

Do you know Expression2? It is like that. Check out some of the videos to get more of an idea if not.

1 Like

I’ve used Starfall many times in the past, it would be great if you could get a key!

2 Likes

I have little experience with E2 but what I get from your guys’ answers is that it’s basically like the E2 chip in the way that other people can access and edit my code.
Please correct me if I’m wrong and thanks for your patience! :pray:

Big thanks again :slightly_smiling_face:

1 Like

in the way that other people can access and edit my code.
Please correct me if I’m wrong and thanks for your

No, like E2, your code is yours. The difference is it uses pure lua which is a much better language than E2 and performs much more efficiently.

2 Likes

Started porting and proof-off-concept to C#. GitHub - thegrb93/StarfallSBox: Sandboxed C# script hotloader for the game S&box

(Just realized I’ll have to work within the constraints of the access list: Code Accesslist - S&box Wiki)

3 Likes

Maybe I’ll have to use moonsharp and keep it in lua :stuck_out_tongue:

1 Like

Lua is ready, but can’t test until Failed to join game and, a little later, format of .exe/.dll is invalid · Issue #287 · Facepunch/sbox-issues · GitHub is fixed

1 Like

My own attempts at a Lua interpreter have gone up in flames. I built my own interpreter for LuaJIT bytecode, and then used a Lua compiler written in Lua because I really did not want to write a parser. This is a hilarious way of doing things but unfortunately has some issues. Trying to parse a modest-sized (~238 line) file takes over 100 seconds and doesn’t even produce usable bytecode.

So the end result is that I’m probably just going to fork and/or contribute to your project. I’m curious to see how my interpreter’s performance compares to KopiLua but I do not want to write a parser, or implement most of Lua’s disaster of a string library, so it’s probably the best option.

Idk what you were trying, but I’m using Kopilua which is a nearly 1 to 1 port of lua to C#. I’m still refactoring a bit of it though. Won’t know how well it works until the bug linked earlier is fixed though.