Oolite Bulletins

For information and discussion about Oolite.
It is currently Mon Aug 21, 2017 10:02 am

All times are UTC




Post new topic  Reply to topic  [ 51 posts ]  Go to page Previous 1 2 3 4 Next
Author Message
PostPosted: Mon Jun 09, 2014 8:56 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Mon May 20, 2013 9:53 pm
Posts: 2359
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Quote:
player.ship.AI. If it's "dockingAI.plist" then the docking computer is active.
Thanks cim, I put this fix into [wiki]ReverseControl[/wiki] v1.2.
Now docking computer is working well in the aft view also.

_________________
OXPs by Norby


Top
   
PostPosted: Tue Jul 15, 2014 6:41 pm 
Offline
---- E L I T E ----
---- E L I T E ----

Joined: Tue Nov 09, 2010 1:44 pm
Posts: 1393
Uh, Norby, with your OXP it reversed my controls in the front view, too.


Top
   
PostPosted: Tue Jul 15, 2014 10:48 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Mon May 20, 2013 9:53 pm
Posts: 2359
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Quote:
it reversed my controls in the front view, too.
I can't reproduce your problem, nor imagine how this happen. The whole code is very short and all relevant lines are within the following condition (ps=player.ship):
Code:
if( ps && ps.isValid && !ps.docked && ps.viewDirection == "VIEW_AFT" 
		&& ps.AI != "dockingAI.plist" ) {
You must debug due to the problem is at you only, for example put a log(this.name, ps.viewDirection); call after the quoted line. If you can proof that this return aft while you are in the front view then maybe the core dev team will do something.

_________________
OXPs by Norby


Top
   
PostPosted: Fri Jan 23, 2015 12:07 am 
Offline
Average
Average

Joined: Thu Jan 08, 2015 12:56 pm
Posts: 10
I've just started looking at the Expansion Packs and the first one I decided to try was the Reverse Control one, however although it says "In Oolite v1.79 or later do not unzip the .oxz file, just move into the AddOns folder of your Oolite installation", when I tried to run the game I got a message "Reversecontrol_1.3.ocx does not have a valid manifest plist and could not be loaded".

I don't know what this means, but I'm using the latest release version.

Can someone help, please?


Top
   
PostPosted: Fri Jan 23, 2015 12:45 am 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Mon May 20, 2013 9:53 pm
Posts: 2359
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
The wiki say how can you install it by hand but the best way is to use the built-in expansion manager. This oxz contain a valid manifest.plist at me so I do not know how can you get this message - maybe you use a Mac (where I can not test)? If not then I guess something is changed at you due to the problem is not reported by the other one thousand downloaders.

_________________
OXPs by Norby


Top
   
PostPosted: Sat Jun 20, 2015 6:48 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Mon May 20, 2013 9:53 pm
Posts: 2359
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
[EliteWiki] ReverseControl v1.4 normalize controls in left and right views also.

There is a bit strange effect during roll in side views, it seems the centre of roll is not the centre of view, but I can not fix this by moving the viewpoint in shipdata due to the centre moving further with my changes. :shock:
Still usable imho and no problem with yaw which is much better in side views to compensate the forward movement of your ship.

Thanks to Lone Wolf for a performance idea which is implemented now also, and here is an answer to his question arrived in pm about the math, maybe others are interested also.

In my code ps.pitch is the current pitching speed in angle/second what the player set with his controller in this moment. I multiply ps.pitch with delta (the fraction of a second elapsed since the last frame) to get the angle what the ship rotated since the last frame. Then I apply the double of this angle in reverse direction to cancel the rotation added by the core and make a similar opposite one.

When I set pitch then I rotate around prevori.vectorRight() which points to "right" from the orientation vector of the previous frame.
Imagine the forward vector of your ship, then turn right (press F4 ;)), then rotate yourself clockwise around your centre: this is what your ship do when pitching up. In js:
Code:
	var a = ps.pitch * delta;
	var c = prevori.vectorRight();
	ps.orientation = ps.orientation.rotate( c, 2 * a );
Then I do the same with roll also, then the variations of this to the side views. After I imagined the situtation in a side view I applied the current roll to the new pich and pitch to roll, then I tried and corrected the direction by a minus sign before 2*a where needed.

_________________
OXPs by Norby


Top
   
 Post subject: Reverse Y Control v1.5
PostPosted: Sun Aug 16, 2015 3:29 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Mon May 20, 2013 9:53 pm
Posts: 2359
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Reverse Y Control, which is a variation of ReverseControl to satisfy this request, now got a small fix in v1.5 to work instantly after hyperjump in the case when one of the views accessible by F5-F8 are shown at the point when the countdown ends.

_________________
OXPs by Norby


Top
   
PostPosted: Fri Mar 17, 2017 2:02 am 
Offline
Competent
Competent

Joined: Fri Mar 17, 2017 1:49 am
Posts: 38
Norby: I've been playing around w/ your code & this fixes the prob on my rig. Try it out:
Code:
this.$ReverseControl_FCB = function( delta ) { //FrameCallBack
	var ps = player.ship;
	var a, c = null;
	if( ps && ps.isValid && !ps.docked && this.$ReverseControlOn && ps.AI != "dockingAI.plist" ) {
		var prevori = this.$ReverseControlPrevOri;
		if( prevori ) switch ( ps.viewDirection ) {
			case "VIEW_AFT":
				//reverse up-down
				a = ps.pitch * delta;
				c = prevori.vectorRight();
				ps.orientation = ps.orientation.rotate( c, 2 * a ); // 2 * incl's correcting for pitch cmd that got us here
				//reverse roll
				a = ps.roll * delta;
				c = prevori.vectorForward();
				ps.orientation = ps.orientation.rotate( c, 2 * a ); // 2 * incl's correcting for roll cmd that got us here
				break;
			case "VIEW_PORT":
				//pitch -> roll
				a = ps.pitch * delta;
				c = prevori.vectorRight();
				ps.orientation = ps.orientation.rotate( c, 1 * a ); // - 1st undo this frame's pitch
				c = prevori.vectorForward();
				ps.orientation = ps.orientation.rotate( c, -1 * a ); // - now apply pitch cmd as roll
				//roll -> -pitch
				a = ps.roll * delta;
				c = prevori.vectorForward();
				ps.orientation = ps.orientation.rotate( c, 1 * a ); // - 1st undo this frame's roll
				c = prevori.vectorRight();
				ps.orientation = ps.orientation.rotate( c, 1 * a ); // - now apply roll cmd as pitch
				break;
			case "VIEW_STARBOARD":
				//pitch -> roll
				a = ps.pitch * delta;
				c = prevori.vectorRight();
				ps.orientation = ps.orientation.rotate( c, 1 * a ); // - 1st undo this frame's pitch
				c = prevori.vectorForward();
				ps.orientation = ps.orientation.rotate( c, 1 * a ); // - now apply pitch cmd as roll
				//roll -> -pitch
				a = ps.roll * delta;
				c = prevori.vectorForward();
				ps.orientation = ps.orientation.rotate( c, 1 * a ); // - 1st undo this frame's roll
				c = prevori.vectorRight();
				ps.orientation = ps.orientation.rotate( c, -1 * a ); // - now apply roll cmd as pitch
				break;
			default:
				this.$Stop();
		}
		this.$ReverseControlPrevOri = ps.orientation;
	} else {
		this.$ReverseControlPrevOri = null;
	}
}


Last edited by cag on Sat Mar 18, 2017 11:25 pm, edited 1 time in total.

Top
   
PostPosted: Fri Mar 17, 2017 2:07 am 
Online
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
User avatar

Joined: Sat Jul 04, 2009 9:31 pm
Posts: 12716
Location: Corke's Drift
Welcome aboard, Commander! Tip: click edit and highlight that code, then hit the Code button.

_________________
The only good fnord is a dead fnord!


Top
   
PostPosted: Sat Mar 18, 2017 11:36 pm 
Offline
Competent
Competent

Joined: Fri Mar 17, 2017 1:49 am
Posts: 38
Thanks for the heads up. Out of curiosity, who audits the code that goes into OXP's?
My framerate is suffering and that appears to be the culprit.
[I've a quad-core CPU @ 3 GHz, 8 GB RAM, Radeon R7 graphics and run from an SSD]
I even tried wire frames w/ min. detail; made no diff!

_________________
"Better to be thought a fool, boy, than to open your trap and remove all doubt." - Grandma [over time, just "Shut your trap... fool"]
"The only stupid questions are the ones you fail to ask." - Dad
How do I...? Nevermind.


Top
   
PostPosted: Sun Mar 19, 2017 1:10 am 
Online
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
User avatar

Joined: Sat Jul 04, 2009 9:31 pm
Posts: 12716
Location: Corke's Drift
<scratches head> What sort of framerate are you getting? GFX drivers, perhaps? What's in the Latest.log?

_________________
The only good fnord is a dead fnord!


Top
   
PostPosted: Sun Mar 19, 2017 2:01 am 
Offline
Competent
Competent

Joined: Fri Mar 17, 2017 1:49 am
Posts: 38
no oxp: 110-160 fps just sun, planet, station & buoy
min oxp: 90-115 fps traffic around station
basic oxp: 85-105 fps station stuff, BGS, CCL, all in Ambiences_recommended_by_Norby
However, once I get into oxp's w/ framecallbacks (HUDs, MFD's, reverse control, telescope, etc.) I drop into the low 20's when things are calm, high teens when it gets busy.
When I first went thru the games oxz manager, I'd picked a few hundred - mistake!
So, I've got what I believe are more essential and/or less intensive ones (around 90 in ManagedAddOns) and get the85-105 fps stated above.
I've split out missions, Povray's Planets into galaxy specific folders, so it loads less.
I've been optimizing the framerate intensive ones as I go and found, how to be polite, code w/ not fully realized potential(?).
Hence my query re: code audits, who or if?
Take the preceeding post; I tried to pm Norby w/ the fix but the BB wouldn't let me. I don't want to code-shame people, oxp's take hard work but esp. creativity & imagination. I could help w/ the coding - I worked on an interpreter (for Fortran) back in the dark ages (pre-web) - but not via a BB.

[can't really give you a Latest.log at the moment, as its full of my debugging. Is it possible to get line #'s in the log when there's a script error?]

_________________
"Better to be thought a fool, boy, than to open your trap and remove all doubt." - Grandma [over time, just "Shut your trap... fool"]
"The only stupid questions are the ones you fail to ask." - Dad
How do I...? Nevermind.


Top
   
PostPosted: Sun Mar 19, 2017 2:50 am 
Online
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
User avatar

Joined: Sat Jul 04, 2009 9:31 pm
Posts: 12716
Location: Corke's Drift
I know zilch about coding/audit stuff - I'm merely a dumb pilot.
Quote:
Is it possible to get line #'s in the log when there's a script error?]
You mean like this:
Code:
14:03:35.062 [script.javaScript.exception.unexpectedType]: ***** JavaScript exception (BGS 2.0): TypeError: this._aid.keepOnScreenID is undefined
14:03:35.062 [script.javaScript.exception.unexpectedType]:       ../AddOns/BGS2.0.oxp/Scripts/BGS.js, line 191.
Which text editor are you using?

_________________
The only good fnord is a dead fnord!


Top
   
PostPosted: Sun Mar 19, 2017 3:40 am 
Offline
Competent
Competent

Joined: Fri Mar 17, 2017 1:49 am
Posts: 38
YES, exactly. All I get is:
n23:35:09.016 [script.javaScript.exception.notDefined]: ***** JavaScript exception (MFDRestoreAfterLoad 0.1 alpha 1): ReferenceError: junk is not defined

I'm using NotePad++ with the JSLint plug-in. That catches all the syntax & variable declaration errors.

I've tried the "logging..." options in the .GNUstepDefaults file but no joy.

_________________
"Better to be thought a fool, boy, than to open your trap and remove all doubt." - Grandma [over time, just "Shut your trap... fool"]
"The only stupid questions are the ones you fail to ask." - Dad
How do I...? Nevermind.


Top
   
PostPosted: Sun Mar 19, 2017 5:41 am 
Offline
Commodore
Commodore
User avatar

Joined: Tue Jan 21, 2014 10:37 pm
Posts: 1646
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...
I think you also need the Debug OXP, found here: http://wiki.alioth.net/index.php/Debug_OXP

And possibly the developer release: http://www.oolite.org/download/

_________________
My OXP's


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 51 posts ]  Go to page Previous 1 2 3 4 Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
Powered by phpBB® Forum Software © phpBB Limited