If I understand correctly (and I am a rank neophyte in such matters), the old .oxp's were (partially?) written in Python and from 2008 (Oolite v.1.67) had to be converted to Javascript.
I assume that that means that Python is no longer supported and just does not work.
But: Javascript needs a 'host environment' eg a web-browser or presumably Oolite. Python doesn't.
Javascripts 'inputs' are mediated by this host environment - so if Oolite does not allow the Q key to do anything, then a Javascript oxp will be unable to allow it to do anything either.
Am I correct in further assuming that a Python oxp would have been able to allow input from the Q key?
Javascript vs Python
Moderators: winston, another_commander
- Cholmondely
- Archivist
- Posts: 5365
- Joined: Tue Jul 07, 2020 11:00 am
- Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
- Contact:
Javascript vs Python
Comments wanted:
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
-
- Quite Grand Sub-Admiral
- Posts: 6683
- Joined: Wed Feb 28, 2007 7:54 am
Re: Javascript vs Python
No, it's nothing like that I'm afraid. Let me explain:
We never used Python in Oolite. The only application written in Python is the external Windows and Linux debug console and Oolite does not require the console to run. Python in Oolite was never a thing and the older OXPs used the standard XML or GNUstep plist format for everything. We still keep these around for compatibility reasons.If I understand correctly (and I am a rank neophyte in such matters), the old .oxp's were (partially?) written in Python and from 2008 (Oolite v.1.67) had to be converted to Javascript.
I assume that that means that Python is no longer supported and just does not work.
Oolite itself is the host environment for the Javascript engine. The JS library we use is stripped of all browser-specific and almost all disk-output functionality for security reasons (As far as I can recall, the only disk-write capability available from JS in Oolite is by executing the takeSnapShot script command, which is available only in the test release versions of the game). Python, as can be expected from all the above, is irrelevant.But: Javascript needs a 'host environment' eg a web-browser or presumably Oolite. Python doesn't.
Since input receiving functionality is stripped from our JS, yes, it is Oolite that decides which keys are usable and which aren't.Javascripts 'inputs' are mediated by this host environment - so if Oolite does not allow the Q key to do anything, then a Javascript oxp will be unable to allow it to do anything either.
No, because Python has nothing to do with Oolite's scripting language and there has never been a Python oxp.Am I correct in further assuming that a Python oxp would have been able to allow input from the Q key?
- Cholmondely
- Archivist
- Posts: 5365
- Joined: Tue Jul 07, 2020 11:00 am
- Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
- Contact:
Re: Javascript vs Python
Thank you!
Comments wanted:
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Javascript vs Python
Well, there is always Griff's Python!