aubergine wrote:As long as there's a way to determine what version of the API you're working with (often by examination of specific functions, globals or constants) then in JS it's relatively straight forward to handle the changes in the API. Problems arise when something changes in such a way that it's very difficult for a .js script to determine whether it's in an environment before or after that change.
It's also important to note that the changes we are currently experiencing are part of a process to deal with some age old problems in terms of the WZ architecture. Due to limited time availability, it's not possible to do re-writes - it's generally better to nudge things in the right direction over several iterations. While this can be frustrating for modders affected by the changes, it has the advantage of maintaining WZ's evolution, without which devs, modders and end-users alike would probably lose interest.
IMHO it is good idea to make high level js api over current api. It will help to make small changes in low level api with out breaking old mods.
It should be object based api (like https://developers.google.com/maps/docu ... erence#Map
). I has some expirience with maps, I like this api approch.
I don`t like current api. It takes too many chars to do simple things. (see high level implementation of distBetweenTwoPoints https://github.com/haoNoQ/nullbot/blob/ ... js.inc#L23
) There is some other good ideas as cache. Adding standart js library will make mod development more easy and api changes more smooth.