Wuzzy wrote:I personally have to agree with taikedz here. I am too pretty skeptical of the idea, to be honest.
It would open a huge can of worms. Especially in terms of complexity.
Yup. Complexity is a necessity, but not beyond the necessary complexity. I do not recall what essay/philosophy talks of "inherent" and "emergent" complexity, but the problems bubbled up by adding client side scripting, both for engine devs and for modders, would be definitely non-inherent.[/quote]
Wuzzy wrote:If I understand correctly, the “client-side scripts” have to come from the server. This is a big problem already. First: Can the client trust the server? Second: Can the client trust the connection (no man in the middle)? Say “No” to either question and your client may end up happily executing rogue code.
Nail on head. I can imagine there might be a suggestion to limit the effects of a passed-on script to non-filesystem, non-OS operations, but who's to say there isn't going to be an obscure hole in the Lua engine? Nothing is 100% secure, so the less opening you give a potential attacker, the better.
It is only because of the nature of the game that mods are allowed and 3rd party code is running on a ton of servers, and unfortunately that means server admins do have to make sure their servers don't get compromised by bad code - but if lazy administration may compromise a server, it should certainly not mean as a result that client machines get compromised too.
Wuzzy wrote:I also opine that client-sided scripting should not be introduced lightly, because this would be a major design change. I would also say that the modding community should have a say in this.
Yes - to add to this, it would either mean that mods need to explicitly register client code -- say for example
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
minetest.register_client_script("is_protected", function(pos,player)
-- some code
end)
Or it would mean passing all registered functions to the client -- warts, arbitrary code and all -- to be interpreted there too. No we wouldn't pass just a subset of `minetest.register_*` functions over, because eventually requests for adding and adding and adding would pile up to include the entire scripts set. Just better not to start.
Wuzzy wrote:I would be glad if some core dev could step up here and maybe tell us more about the idea.
Frankly Wuzzy, I think you have it hit it squarely and fully.
To argue the other side however, I guess it would be of interest to take another view - object state machines (to use a big word).
Say for every block loaded, a compressed summary of the current state of the meta-data was passed to the client, and for each piece of metadata, the states it can change to with possible states/values, that could be interesting....
Say for a door, it can be {open or closed}, and may have an owner with {owner can action | custom} calls. You could possibly have something implemented generally engine-side, and if-and-only-if it has a "custom" action set, it would have to wait for server validation -- this is purely for improved prediction, and even that looks like it would be a massive overhaul so am not saying it is "desirable" in any way.
It would cause an entirely new API too, adding extra code and, whilst I appreciate the prediction gain from this, I still think network latency is an issue unto itself and separate.
From the cheating side, I could easily throttle my network ad-hoc to enable lag-griefing abilities in the current setup, but who's to say I can't use a non-client-side-scripting-enabled version of the client to bypass client processing of predictions?
Honestly....... still not worth it IMHO.