This is a horrible idea because it limits peoples imaginations. You might tackle a problem differently then I, as I am - and others are - more experienced programmer in regards to Javascript.
This core script idea, unless it was like C's main library or C++'s main library or something like that, is a bad idea ...
This is still a horrible idea.
First you wont have "multiple scripts" if you program properly, you will have one script that has all the script concatenated in it. Second, if you are smart you'll provide two versions - minified and non minified for those who want to edit. Second "Core" is subjective to what you are doing, it is also suppose to me core functionality of your script, like common functions your script uses, common patterns and methodologies. It can also mean changing core aspects of the system - how ever since Javascript is not ruby and you cannot technically monkey patch or override functions (some one correct me if I am wrong, I don't work with prototypes ... ) so you wont have to (again in theory) have to worry is bobs scripts will screw over your scripts.
Second, to avoid that possibility you should scope your changes to "classes" for example
var ClassName = {
functionName: function(){ ... },
functionNameTwo: function(param){ ... }
};
ClassName.functionName();
And most of all you should never use "global variables" as it will mess with others peoples code, you should write immutable Javascript.
These are some ideas to get around your "core" script idea.
Ok, yesterday I was trying to be nice. Now I can see that's not what you deserve. Do you know why we need a common core plugin?
Victor Sant. Victor made many awesome features for games on Ace, as I'm sure you've seen, but his scripts downright sucked. Everything he did was overwrite other peoples stuff except his own. Every time Victor's core script was included in any project I've seen with other custom scripts, it broke
something. With a community core script, we can expect most, if not all, scripts to be compatible with it. We can all suggest our own changes to it and then as it gets updated we can test it on multiple different projects with the help of others to ensure it's still in working condition.
I can also see, now, that you're quite a jerk. You
directly claim that you are more experienced than Hudell in regards to javascript, and yet you don't even know you can alias and overwrite functions with the prototype. Is that a small part of Javascript? Maybe so. But for someone
so experiences with it, you should know it like the back of your hand. You can writhe, squirm, and protest a community core script all you want, but it's the best chance we have to get MV coding standards before people just jump in and start to change things, and have horrible code that "just works". With the disappearance of Victor, I really though that MV had a chance at something nice and compatible, but I can clearly see that you don't intend to go by what is best for the community, and just want to be
exactly like Victor, telling everyone else the incompatibilities are the other programmer's fault because your code is perfect and they broke yours. I'll be damned if I ever try to work with someone who programs like Victor again.
I intend to have MV start with a set of community standards to keep everything as compatible as possible, and if you try to come in here and tell us that we shouldn't do that by
insulting us and telling us "
I'm better than you", then I'm sorry but the door out is to close the tab, because honestly we won't want anything to do with you. Everyone else is open to the idea of a community core because we can have well-made, common functions that benefit everyone and don't break everything.
/rant
Back onto the topic of a core script,
Do you have any suggestions?
I have for example 3 core scripts, each dealing with a certain set of classes.
They only came about because I wrote a couple scripts and found that it would've been really nice if a certain set of methods were more abstract. Unless you were writing scripts that touched those methods, the core scripts are pretty much useless.
Instead of offering one big "core" script, I offer smaller scripts in an attempt to minimize compatibility issues: people don't need to download something they're not going to use.
With the plugin manager, this should be much easier because even if they download all of the core scripts, they can just check off which ones they don't need.
And I'm sure there would be some scripts that would be useful as a core script (eg: damage calculation)
One thing we could do is, within the community core script, segment our code. For example, in order to emulate the module structure from ruby, we'd something like this:
var Zale = Zale || {}; // Equivalent to Ruby's ||=Zale.PluginName = {};Zale.PluginName.value = 1;Zale.PluginName.awesomeFunction = function(arg1, arg2) { /* cool stuff here */ };So, what we can do in the core script is have different code sections for different purposes. That way if we have functions that are the same or similarly named, we have a better idea of what we're using and what it does. That can help resolve issues where you said you had 3 core scripts. We can make different sections for different purposes if we need to.