I think he's talking more about sending GUI data to clients instead of making them download the add-on first
This is correct. I am have been acquainted with the mission editor; although it has been some years since I last used it. To be more precise, though, they would only have to download a single add-on
once.
With the way GUIs work in Blockland something like this wouldn't really be too helpful. If all you could do is create gui controls and menus for people with no code attached with it, the functionality would be pretty bare.
Again drawing an brown townogy with web development, think of how HTML forms work. An HTML page can include a button that, when clicked, sends a POST request to the web server. In the spirit of this idea, the GUI layout that a server sends a player with this mod would include the server command (i.e.
serverCmd____) that will be send to the server when clicking a particular button.
The closest thing to this that we have is the "required clients" portion of Blockland Glass which hasn't really been used very much, but it basically prompts people to download an add-on and will download and execute it automatically before connecting (documentation in the manual).
This could be good enough. Would probably work the same. I'll look into it later.
I like how Garry's Mod leaves F1-4 as spares.
I think this is where I got the idea from. Why shouldn't GUIs in Blockland load like GUIs in Gmod?
clients get assurance that the code they download is safe.
Honestly, I would be more wary about downloading a client than using a prexisting API. It would depend, however, on how much functionality the GUI API would be given. If we tried to implement some kind of JS into it, security concerns would be higher given it would be automatically run. However, if the GUI API simply sends over a GUI layout with some info regarding what server commands each button sends, then I can't really see how this would be more of a security risk.
So, this is actually what Blockland Glass was originally (2012) and I've thought about re-implementing this in a new innovative way in a future update. Many have dismissed it as unfeasible but it's actually very do-able. The downside of this old implementation is that it's not very kind to developers, but I believe I have a remedy to that. Could make an appearance in Glass 4.2
That's good to hear! I was certain someone else had already thought of this before. What you say about this not being friendly to developers is my main concern, too. I would like developers to be able to continue using the mission editor to create GUIs. However, if we just arbitrarily send GUI code to a user, that could pose a huge security risk (I think this is what otto-san is specifically concerned about). Perhaps there would be a way to sandbox the GUI code? Would converting everything to XML, JSON, etc. on the server-side and then back again on the client-side be feasible (i.e. not drive the people developing the GUI API insane)? These are my primary concerns at this stage.
If you have some code you'd be cool with sharing, I would love to see it. Post it here, or PM me.
I may try to get a proof-of-concept working by the end of the week. I'll try to upload a video to accompany it. Hopefully it will help clear up some confusion on exactly what I'm proposing.