The Oolite Extended Project - Fork, no oxp
Moderators: winston, another_commander
-
- Dangerous
- Posts: 100
- Joined: Sat Oct 10, 2009 7:19 pm
- Lestradae
- ---- E L I T E ----
- Posts: 3095
- Joined: Tue Apr 17, 2007 10:30 pm
- Location: Vienna, Austria
..
matthewfarmery, multiple people working on each other's scripts (at least as far as oxps are concerned) is a fairly new development that came about indirectly via the OSE project.
I think it is already producing fruit (the debates here will clarify diverse things for diverse people, methinks, they sure have for me) and we all have to get our heads around of how to do this (develop/debug each others' scripts together) outside the veteran developers' of Oolite itself!
I think pmw57 will publish the newest scripts folder version here soon.
And I believe that Cmdr McLane's explanation about the differences between world scripts and ship scripts belongs onto the wiki. It is crystal clear, and while it didn't contain a lot of information totally new to me, it will sure help noobs and even java-script-capable coders wanting to understand the peculiarities of Oolite.
Cheers everyone
L
I think it is already producing fruit (the debates here will clarify diverse things for diverse people, methinks, they sure have for me) and we all have to get our heads around of how to do this (develop/debug each others' scripts together) outside the veteran developers' of Oolite itself!
I think pmw57 will publish the newest scripts folder version here soon.
And I believe that Cmdr McLane's explanation about the differences between world scripts and ship scripts belongs onto the wiki. It is crystal clear, and while it didn't contain a lot of information totally new to me, it will sure help noobs and even java-script-capable coders wanting to understand the peculiarities of Oolite.
Cheers everyone
L
-
- Dangerous
- Posts: 100
- Joined: Sat Oct 10, 2009 7:19 pm
and that is a good thing, but what Im saying is, at least someone should have a link in their sig, so that everyone working on the project knows where to download the latest versions of the scripts, and would be helpful if there was a date beside the link, that is what Im saying, that way I think would help everyone to know where the latest scripts can be downloaded from, I think that would help a great deal rather then backtracking through many posts to find the latest download link
-
- Dangerous
- Posts: 100
- Joined: Sat Oct 10, 2009 7:19 pm
-
- Dangerous
- Posts: 100
- Joined: Sat Oct 10, 2009 7:19 pm
-
- ---- E L I T E ----
- Posts: 389
- Joined: Sat Sep 26, 2009 2:14 pm
- Location: Christchurch, New Zealand
Very clear thanks.Commander McLane wrote:All clear now?
So what is needed as far as the timers go, is to conceptually divide the scripts into world scripts and ships scripts.
World scripts don't need their timers to be cleaned up, but they can be done so using playerWillEnterWitchspace
Ship scripts must have their timers cleaned up using playerWillExitSystem
What is the issue with stopping and starting timers? Someone was saying that you cannot stop a timer and then immediately start the same one?
A trumble a day keeps the doctor away, and the tax man;
even the Grim Reaper keeps his distance.
-- Paul Wilkins
even the Grim Reaper keeps his distance.
-- Paul Wilkins
Ship scripts need timers stopped when the ship they refer to cease to exist (either due to the player leaving the system or the ship being removed/killed).
If you don't then the timer ends up trying to call script functions that no longer exist, and you're on a short journey to your desktop.
If you don't then the timer ends up trying to call script functions that no longer exist, and you're on a short journey to your desktop.
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
-
- Dangerous
- Posts: 100
- Joined: Sat Oct 10, 2009 7:19 pm
I've updated my sig with the script download link, hope people won't mind, but I think it would help if we all knew where to go for the scripts,
OSE SVN checkout
http://ooliteshipyardsextension.googlec ... svn/trunk/
http://ooliteshipyardsextension.googlec ... svn/trunk/
-
- ---- E L I T E ----
- Posts: 389
- Joined: Sat Sep 26, 2009 2:14 pm
- Location: Christchurch, New Zealand
This is the part that I'm meaning.Thargoid wrote:Ship scripts need timers stopped when the ship they refer to cease to exist (either due to the player leaving the system or the ship being removed/killed).
If you don't then the timer ends up trying to call script functions that no longer exist, and you're on a short journey to your desktop.
I presume that checking that a timer exists before starting it is an appropriate safety measure.Commander McLane wrote:And still there is no need to delete or remove world script timers when the player enters witchspace. Especially if these timers are to be started again when he exits witchspace (just look at the script snippet in question). You can't start a timer which you just before have deleted.
A trumble a day keeps the doctor away, and the tax man;
even the Grim Reaper keeps his distance.
-- Paul Wilkins
even the Grim Reaper keeps his distance.
-- Paul Wilkins
Worldscript timers don't need to be removed as the (world)script that they refer to will exist after a player jumps (as it's essentially the player ship, which will tend to go with him or her ).
But in the case of a ship script, when the player jumps, the remaining NPC ships in the system that the player just left get removed. Hence your ship script timer is then trying to refer to code that now no longer exists, and you get your problems and desktop moment.
But in the case of a ship script, when the player jumps, the remaining NPC ships in the system that the player just left get removed. Hence your ship script timer is then trying to refer to code that now no longer exists, and you get your problems and desktop moment.
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
-
- Dangerous
- Posts: 100
- Joined: Sat Oct 10, 2009 7:19 pm
just an update, been running Oolite now for well over an hour and not a SINGLE crash
so happy days are here, as this build is once more stable, at least for the time being, nice work all
so happy days are here, as this build is once more stable, at least for the time being, nice work all
OSE SVN checkout
http://ooliteshipyardsextension.googlec ... svn/trunk/
http://ooliteshipyardsextension.googlec ... svn/trunk/
-
- ---- E L I T E ----
- Posts: 389
- Joined: Sat Sep 26, 2009 2:14 pm
- Location: Christchurch, New Zealand
Something else I will bring up as and when they are spotted, is where timers are started only on exiting the station, but not on entering from witchspace.Thargoid wrote:Worldscript timers don't need to be removed as the (world)script that they refer to will exist after a player jumps (as it's essentially the player ship, which will tend to go with him or her ).
In most situations they are wanting to be started in both situations.
I think that I will start a new testing thread for each oxp that a script comes from. This will make it much easier for issues to be tracked and resolved, and for the authors to be more easily included in the conversation.
Those will be updated to instead use playerWillLeaveSystem to tidy up the timers.Thargoid wrote:But in the case of a ship script, when the player jumps, the remaining NPC ships in the system that the player just left get removed. Hence your ship script timer is then trying to refer to code that now no longer exists, and you get your problems and desktop moment.
The order in which the scripts that will be updated is:
- ship script timers first
- world script timers
- remaining scripts
- Compare and migrate into WiP any differences between Screet code and Lestradae code
- Update the timer destruction as appropriate for its environment
- Ensure the remaining javascript code meets minimum coding standards
- Report any issues discovered during this process into a new thread, and link from here to there
Last edited by pmw57 on Wed Oct 14, 2009 9:18 pm, edited 1 time in total.
A trumble a day keeps the doctor away, and the tax man;
even the Grim Reaper keeps his distance.
-- Paul Wilkins
even the Grim Reaper keeps his distance.
-- Paul Wilkins
-
- Dangerous
- Posts: 100
- Joined: Sat Oct 10, 2009 7:19 pm
sounds like a good plan, any updates I will will happy test, but I can't contribute to the code, as Im not a programmer, my major weakness, but testing is what Im good at though
OSE SVN checkout
http://ooliteshipyardsextension.googlec ... svn/trunk/
http://ooliteshipyardsextension.googlec ... svn/trunk/
- Lestradae
- ---- E L I T E ----
- Posts: 3095
- Joined: Tue Apr 17, 2007 10:30 pm
- Location: Vienna, Austria
..
@Screet, pmw57, matthewfarmery and anyone who wants to get involved! Can I suggest the beginnings of a "proper procedure" here (?):
1) The starting point for the further script reworking is the Screet-reworked pmw57 - version of the scripts which matthewfarmery has linked in his sig - OK everyone? They seem to run without crashes on at least four systems now.
2) pmw57 & Screet continue work on these scripts, and you coordinate that so that you don't work on the same thing twice and valuable time is lost.
3) A new thread is made in the Testing Forum for each oxp the scripts originally come from. That way, the original oxp authors can get involved if they choose to do so.
4) If and when the four regular OSE testers here agree that a script has been "bettered", matthewfarmery includes it into the script assembly in his sig and drops a note about that here in the OSE thread.
We continue this until everyone is happy.
Do you all three concur, can this work like that, criticism, discussion, etc.?
L
1) The starting point for the further script reworking is the Screet-reworked pmw57 - version of the scripts which matthewfarmery has linked in his sig - OK everyone? They seem to run without crashes on at least four systems now.
2) pmw57 & Screet continue work on these scripts, and you coordinate that so that you don't work on the same thing twice and valuable time is lost.
3) A new thread is made in the Testing Forum for each oxp the scripts originally come from. That way, the original oxp authors can get involved if they choose to do so.
4) If and when the four regular OSE testers here agree that a script has been "bettered", matthewfarmery includes it into the script assembly in his sig and drops a note about that here in the OSE thread.
We continue this until everyone is happy.
Do you all three concur, can this work like that, criticism, discussion, etc.?
L