Page 1 of 1

Only Java-Script?

Posted: Sat Dec 22, 2007 9:09 pm
by Svengali
Should Oolite only support Java-Script in future releases? Some thoughts about that.

With JS we'll get a lot of new stuff to play with and if it's the only language any new scripter can learn it within 3-4 month. The development for Oolite will be a lot easier to handle and even the translation of 'old' scripts shouldn't be to difficult. Currently I'm learning JS (there are a lot of tutorials online).

What do you think?

Posted: Sun Dec 23, 2007 10:14 am
by LittleBear
No. A lot of contributors are no longer active, so woudn't be able to translate their script. And it would be a major undertaking to translate a big script like Assassins (5,000 lines) or Random Hits (15,000 lines) and then playtest it. Please don't make me do it! :shock:

Posted: Sun Dec 23, 2007 11:27 am
by Eric Walch
Svengali wrote:
Should Oolite only support Java-Script in future releases? Some thoughts about that.
Not do-able as you will loose a lot of existing OXP's. And there are a lot of OXP's that just have a few lines to add special ships. Those will not take much execution time and are for starters much easier to write than JS. And translating existing large scripts is also to much work as LB says. (UPS currently has about 2800 lines)

I think it is more important to write a good document about the differences between the two script systems. When the difference is clear, a programmer that wants to write a larger script will more likely choose for JS. But I agree that new functions should not be implemented with the old scripting system to motivate programmer to use the new scripting system for new oxp's.

But with the old scripting system you can also improve the execution-time of a lot of oxp's by not putting the majority of conditions in the main level. One long oxp alone will not take much time, but with installing of more and more OXP's time becomes an issue.

Posted: Sun Dec 23, 2007 11:32 pm
by JensAyton
The plan, such as it is, is to maintain support for the old scripting system but not add new features, and discourage its use once the mythical next stable release comes out. In an ideal universe, old-style scripts would be translated to JavaScript at load time, but the efficiency problem caused by the “tickle event” approach would still be there for most cases.

Posted: Thu Dec 27, 2007 4:56 pm
by Svengali
Ahruman wrote:
The plan, such as it is, is to maintain support for the old scripting system but not add new features, and discourage its use once the mythical next stable release comes out.
Thanks Ahruman, that was the question behind this thread.

Eric wrote:
But I agree that new functions should not be implemented with the old scripting system to motivate programmer to use the new scripting system for new oxp's.
Yupp. Second that.