Distance indicator?

An area for discussing new ideas and additions to Oolite.

Moderators: winston, another_commander

Post Reply
User avatar
treczoks
Deadly
Deadly
Posts: 162
Joined: Fri Sep 25, 2009 9:32 am
Location: Königswinter, Germany

Distance indicator?

Post by treczoks »

As the Advanced Space Compass logs into the systems buoy network and knows where the beacons are - why does it not show the distance to the selected compass target?

The Rock Hermit Locator once indicated a target, so I turned my ship in this direction and I flew, and flew, and flew... It felt a bit like trying to reach the next system without witchspace fuel :wink: If I had known beferohand that the RH was halfway to the next system, I would have scrapped the idea of visiting him altogether...

Yours, Christian
[It/we/I] [awoke]. [Identity]:[Undetermined], [Location]:[Undetermined], [Objective]:[Destroy]. [Priorize([Determination]:[Identity])]:[High]. [Execute].
User avatar
Frame
---- E L I T E ----
---- E L I T E ----
Posts: 1477
Joined: Fri Mar 30, 2007 8:32 am
Location: Witchspace

Post by Frame »

Not being a developer but yeah a distance indicator, but where would you put such a new indicator and still preserve backward compatibility. on the HUD.

So the advanced Space Compass should maybe also show a white reticle like the wormhole scanner (cyan color), with the name and distance to the side...
like this ASCII drawing

And as a side benefit it would solve the beacon confusion that can arise from beacons having the same Letter to begin with

Code: Select all


 __
|  |  Beacon:Rock Hermit Locator
       Distance: 325000 meters
|__| Docking Status: freindly


Note that only the targeted beacon carrier should be shown...

This is a good suggestion IMHO

or are we still in feature freeze mode ?
Bounty Scanner
Number 935
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

Not really, we've been adding quite a few features this weekend.

Mind you, this functionality could already be achieved with an OXP, one working along the lines of the bounty scanner.

Hint, hint! :D
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
Frame
---- E L I T E ----
---- E L I T E ----
Posts: 1477
Joined: Fri Mar 30, 2007 8:32 am
Location: Witchspace

Post by Frame »

Kaks wrote:
Not really, we've been adding quite a few features this weekend.

Mind you, this functionality could already be achieved with an OXP, one working along the lines of the bounty scanner.

Hint, hint! :D
svn up to 2810 :D
Bounty Scanner
Number 935
User avatar
Frame
---- E L I T E ----
---- E L I T E ----
Posts: 1477
Joined: Fri Mar 30, 2007 8:32 am
Location: Witchspace

Post by Frame »

I'm sorry, I cannot find anything that grants me the above abilities,
one of them being

1 How to target a beacon object at beyond scanner range, for the player ship... being pretty essential for this to work...

2 How to write this in a non invasive way onto the HUD like with the bounty scanner...

The bounty scanner approach will not work as it only targets ships within range and changes their displayNames.

What treczoks wanted is the distance to said beacon targeted... at beyond scanner range that was half a system away..

nor oojsplayer.m or oojsplayership.m contains anything new regarding beacons.. nor oojsship.m

a text search regarding beacons WHICH IS essential for this to work turns up anything but

Code: Select all

----------------------------------------
Find 'beacon' in 'D:\MYOOLITE5\TRUNK\SRC\CORE\SCRIPTING\OOJSShip.m' :
D:\MYOOLITE5\TRUNK\SRC\CORE\SCRIPTING\OOJSShip.m(126): 	kShip_isBeacon,				// is beacon, boolean, read-only
D:\MYOOLITE5\TRUNK\SRC\CORE\SCRIPTING\OOJSShip.m(127): 	kShip_beaconCode,			// beacon code, string, read-only (should probably be read/write, but the beacon list needs to be maintained.)
D:\MYOOLITE5\TRUNK\SRC\CORE\SCRIPTING\OOJSShip.m(179): 	{ "beaconCode",				kShip_beaconCode,			JSPROP_PERMANENT | JSPROP_ENUMERATE | JSPROP_READONLY },
D:\MYOOLITE5\TRUNK\SRC\CORE\SCRIPTING\OOJSShip.m(189): 	{ "isBeacon",				kShip_isBeacon,				JSPROP_PERMANENT | JSPROP_ENUMERATE | JSPROP_READONLY },
D:\MYOOLITE5\TRUNK\SRC\CORE\SCRIPTING\OOJSShip.m(389): 		case kShip_isBeacon:
D:\MYOOLITE5\TRUNK\SRC\CORE\SCRIPTING\OOJSShip.m(390): 			*outValue = BOOLToJSVal([entity isBeacon]);
D:\MYOOLITE5\TRUNK\SRC\CORE\SCRIPTING\OOJSShip.m(394): 		case kShip_beaconCode:
D:\MYOOLITE5\TRUNK\SRC\CORE\SCRIPTING\OOJSShip.m(395): 			result = [entity beaconCode];
Found 'beacon' 13 time(s).
Search complete, found 'beacon' 13 time(s).


So did you send me out on a ghost hunt ? :(

Clarification is the basis of all communication.. ;-)
Bounty Scanner
Number 935
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

Oops, I might well have done that. :oops:

You can filter all the system objects on the basis of isBeacon, irrespective of whether they're in scanner range or not, and you can get the distance from the player.

The thing that's missing is a way to tell js which of the beacon objects is the one targeted by the compass. I'll be 'right back' with a solution for that!

Sorry about that!
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
Dr Beeb
Dangerous
Dangerous
Posts: 127
Joined: Sun Mar 23, 2008 10:28 pm
Location: Mt. Vista, Oosa, Biarge System, Galaxy 1

Post by Dr Beeb »

while we are on the subject of feature creep, and assuming that this hasn't been discussed before ...

How about setting a broadcast range for each beacon, the default being that the beacon can broadcast the witch-point : planet range as default. If further away, like the rock-hermit above then maybe not picked up on an advanced space compass (unless compass set to higher gain mode ?). That would be a clue how far that target as.

Some beacons could be set up to broadcast huge ranges (with advanced space compass at normal setting) cant think of a use right now, maybe to find other planets? And some other beacons could be set up to nominally broadcast quite short ranges, like approaches to a runway or something else that you need to search for by getting fairly close to the target?
White dots were so much easier to hit
User avatar
treczoks
Deadly
Deadly
Posts: 162
Joined: Fri Sep 25, 2009 9:32 am
Location: Königswinter, Germany

Post by treczoks »

Dr Beeb wrote:
How about setting a broadcast range for each beacon, the default being that the beacon can broadcast the witch-point : planet range as default. If further away, like the rock-hermit above then maybe not picked up on an advanced space compass (unless compass set to higher gain mode ?). That would be a clue how far that target as.
I'm not sure about the interna, but is the planet-to-witchpoint distance really fixed? I don't think so. And this would imply that you loose the station beacon as soon as you fly outward (or up- or downward) from the witchpoint, a quite common tactic to avoid the pirates on the main route.
Dr Beeb wrote:
Some beacons could be set up to broadcast huge ranges (with advanced space compass at normal setting) cant think of a use right now, maybe to find other planets? And some other beacons could be set up to nominally broadcast quite short ranges, like approaches to a runway or something else that you need to search for by getting fairly close to the target?
The station already does that, it puts a rectangle on the compass when you are within station range or at least sufficiently near.

According to the advanced compass' description, it logs into the beacons network, implying that the beacons know each other in a way. So as long as there IS a witchpoint or station beacon, you will be hard pressed not to have been within reach of the network...
[It/we/I] [awoke]. [Identity]:[Undetermined], [Location]:[Undetermined], [Objective]:[Destroy]. [Priorize([Determination]:[Identity])]:[High]. [Execute].
User avatar
Frame
---- E L I T E ----
---- E L I T E ----
Posts: 1477
Joined: Fri Mar 30, 2007 8:32 am
Location: Witchspace

Post by Frame »

yes witch point - planet distance, differs, due to the procedural random number generator, that determines everything from planet size - Inhabitants. economy and so on...

And to the idea of having ranges on buoy broadcasting, is already doable via Java scripting, however since then you must assume that the authors the various buoys wanted unlimited range...

Cheers Frame...
Bounty Scanner
Number 935
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

Sorry Dr Beeb, I don't think we'll implement the 'short range advanced compass mode' in code any time soon, but I've got good news for treczocks & Frame! :)

In trunk we now have a new world script event

compassTargetChanged (compass target, compass mode)


As well as the player.ship.compassTarget and player.ship.compassMode read only properties. (rev 2836)

On changing compass target, you can now figure out what's happening, and get all sort of information about the item targeted by the compass, including its distance from the player's ship!


In other words, now there's nothing to stop you guys from creating a 'beacon analyser' OXP, which can display all sorts of relevant info about the targeted beacon. It appears that
Not really, we've been adding quite a few features this weekend.

Mind you, this functionality could already be achieved with an OXP, one working along the lines of the bounty scanner.

Hint, hint! :D
While slightly premature on my part, is now quite accurate... ;)
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
Post Reply