Re: [Beta] Release of Telescope 2.0
Posted: Mon Apr 22, 2024 4:58 pm
If I remember correctly, OoliteStarter is a Java app. Bundling jython could be the answer
For information and discussion about Oolite.
https://bb.oolite.space/
If I remember correctly, OoliteStarter is a Java app. Bundling jython could be the answer
Looking at the original OXZ, it's as if the directories have no timestamps. Current time is used. After putting it through the script, or using zip manually, directory timestamps are set. Presumably this original OXZ will always have directory timestamps unset, or set to first run of script.cag wrote: ↑Mon Apr 22, 2024 2:24 amD'oh!
was the same file as before!
Once more from the top:
https://www.dropbox.com/scl/fi/7f5hi7jf ... 8d50q&dl=0
I do not object. But if we are talking about such functionality, I'd rather use Nashorn than jython.Commander_X wrote: ↑Mon Apr 22, 2024 4:58 pmIf I remember correctly, OoliteStarter is a Java app. Bundling jython could be the answer
Do not worry. The starter has a list of OXPs - after all it knows what is installed, required, conflicting etc.
I believe any dependency we need to look for makes Oolite less portable. Also consider the fact that an OXP developer needs to know two programming languages is not a plus. I would be reasonable to stay within one programming domain.MrFlibble wrote: ↑Mon Apr 22, 2024 3:42 pmExternal dependency might become a useful (though potentially hazardous/chaotic) means to extend Oolite OXPs capabilities beyond those of the core capabilities.
Regarding python versions. That may become less of an issue if the executables we're playing with in DebuxOxp2 become a solid thing, though I suppose OoliteStarter could probe for python, and decide whether to pull in the large binary, or lighter scripts.
For a start we can run the script every time.
Does it have a list of OXPs from the last use of starter? Some of us manipulate other OXPs locally, or use the built-in manager from time-to-time. I confess I rarely use the starter to launch a normal game, but I do find it useful as lint to sanity check OXP dependencies/conflicts.
I largely agree with your point, though AFAICT, the OXP devs don't "need" to know two programming languages. That could I suppose be an option they *could* leverage.
That sounds like a very good idea.hiran wrote: ↑Mon Apr 22, 2024 7:03 pmSo here is my suggestion:
We add a field in the manifest that declares when to run which script (that must be contained inside the OXP). OoliteStarter will ensure the script is run using a JavaScript engine. Variables will be prepopulated allowing the script to know directories or other OXPs - whatever may be reasonable and required.
Telescope would be the first OXP to make use of that and others may follow.
How does that sound?
No, it does not. But I'd say it does not need to. If OoliteStarter just saved the timestamp it last executed the script, that timestamp could be matched with the expanion's timestamps. And as mentioned before: If unsure, just run it.MrFlibble wrote: ↑Mon Apr 22, 2024 8:10 pmDoes it have a list of OXPs from the last use of starter? Some of us manipulate other OXPs locally, or use the built-in manager from time-to-time. I confess I rarely use the starter to launch a normal game, but I do find it useful as lint to sanity check OXP dependencies/conflicts.
And still I'd not step out of the JavaScript domain unless required.
I like that idea. Seriously.MrFlibble wrote: ↑Mon Apr 22, 2024 8:10 pmIf skies are clear, and the game can be tweaked to allow it, then this is what I was really thinking about:-
Consider for a moment the 'assistant external program' idea, where an OXP running without visible error "could" depend on a program being installed, and be able to call it, and depending on platform, communicate with it via pipes/files/sockets/TCP, or any other means implementable in the core game. Would that not expand possibilities without enforcing anything on any dev who didn't want to use it. No check should need to be done at OXP handling level to allow it, rather the OXP itself should handle not being able to reach the executable/script in question.
Such an approach would make it possible to have an OXP which could interface with oddball hardware. If one were to install the OXP where the hardware and its handler are non-existant, then the OXP could warn at game start and silently shut itself down. Same if platform is not supported by the OXPs external requirement.
This would also allow things like DebugConsole variants to (re)launch themselves from within the game via an OXP shim. Maybe a MOTD OXP could get files from the net. The possibilities are endless.
Devs like me could attach an esp8266 project via USB serial and a bash script to oolite using an OXP shim without needing to learn much javascript at all.
Across the whole notion, no dev is forced to learn any other language. The external dependencies/programs whatever would remain independent of starter and game.
Starter would not have to be directly involved. Telescope could take care of itself.
Right.. that's got that out of my head. I'll get back in my box.
Your idea is so much better, but a bird in the hand... It is achievable.MrFlibble wrote: ↑Mon Apr 22, 2024 8:10 pmThat sounds like a very good idea.hiran wrote: ↑Mon Apr 22, 2024 7:03 pmSo here is my suggestion:
We add a field in the manifest that declares when to run which script (that must be contained inside the OXP). OoliteStarter will ensure the script is run using a JavaScript engine. Variables will be prepopulated allowing the script to know directories or other OXPs - whatever may be reasonable and required.
Telescope would be the first OXP to make use of that and others may follow.
How does that sound?
Don't forget about security. Disk access should be read-only or write restricted to text files w/ limited extensions. Similar precautions wrt net access. We don't want Oolite to become a conduit for malware and securtiy is a lot easier if it's baked in from the start.
I don't know if anyone has prodded this potential issue. Unless anyone has a better idea, I'll wave 2to3 over any of the python2 tools I find and see if I can't beat them into working with 3, reporting any I struggle with.Cholmondely wrote: ↑Fri Apr 26, 2024 4:36 pmQuestion: Oolite's various converters are written in Python 2.7
I presume that they are used by the Griffs and Killer Wolfs of this world to convert ship model files to oolite's ".dat" format
Will they need tweaking to work with Python 3.0?
Reference: Oolite converters
Apologies if this has already been answered...
Code: Select all
Appearance on Navigation Beacons MFD and ASC.
Real Phantom
Fuel Station fuelStation_station
Witchpoint Beacon OJ2-018 W0100 Navigation Buoy (Witchpoint)
GalCop Station Buoy N0100 Navigation Buoy
Satellite Telescope RSSatellite_location
Surveillance Satellite RSSatellite_location
COMLR Satellite RSSatellite_location
Code: Select all
Appearance on Navigation Beacons MFD
RRS Waystation RRS Waystation
Rock Hermit No phantom!
Planet landing sites No phantom!
Main station No phantom!
It might well be nothing to do with it, but just to mention that I've also had phantoms in Strangers World - I understand that they were probably phantom suns, with the sun being moved twice by different SW oxp's - the first time to a more reasonable distance, and the second to place the main planet (and possibly others) in the "Habitable Zone". This has left some very peculiar beacons (if that is what they are) and even more peculiar two-dimensional phantoms which look like distorted space.
Aren't Oolite suns two-dimensional?Cholmondely wrote: ↑Fri May 10, 2024 5:58 pm... and even more peculiar two-dimensional phantoms which look like distorted space.
But when I fly around the sun it does not turn into a 2D disk!Cody wrote: ↑Fri May 10, 2024 6:49 pmAren't Oolite suns two-dimensional?Cholmondely wrote: ↑Fri May 10, 2024 5:58 pm... and even more peculiar two-dimensional phantoms which look like distorted space.
Regardless from which side you look at the sun it always looks like a 2D disk. That sun is smart enough to never show you it's back side...Cholmondely wrote: ↑Fri May 10, 2024 7:14 pmBut when I fly around the sun it does not turn into a 2D disk!Cody wrote: ↑Fri May 10, 2024 6:49 pmAren't Oolite suns two-dimensional?Cholmondely wrote: ↑Fri May 10, 2024 5:58 pm... and even more peculiar two-dimensional phantoms which look like distorted space.