Page 1 of 3

Advanced Naval Targeting System

Posted: Sat Mar 25, 2006 7:09 pm
by winston
OK, so I'm working in an experimental branch, playing around with concepts for the ANTS (Advanced Naval Targeting System).

Here are some screen shots of an early prototype.

Features - targets colour coded by type and hostility status
Info block displayed (like the normal Targeting Enhancement) for currently selected target
Fighter jet style deadly diamond of death target highlighter on currently selected target to make it easy to spot amongst the mass of potentials

http://www.alioth.net/tmp/loot.png - It makes it MUCH easier for you to spot your loot.
http://www.alioth.net/tmp/targetrich.png - A target rich environment
http://www.alioth.net/tmp/thargs.png - A Thargoid encounter

Yes, some of the colours need fixing :-)

Other features I want to do - a *brief* info block (maybe just small icons) on non-selected targets, and a target 'pipper' to help you line up your laser (this is trivial).

Code-wise, currently I'm just putting this over the normal Scanner Targeting Enhancement since I've done nothing to actually make it into a piece of equipment. If you're interested in running it, the change is under the 'FancyTargetter' branch in SVN.

Posted: Sat Mar 25, 2006 7:35 pm
by the alberts
Looks great! I particularly like the colour coding too. Good stuff.

Is this going in possibly as an OXP or as part of a game update?

Posted: Sat Mar 25, 2006 7:41 pm
by winston
It involves code changes to the HUD so it'd have to be a game update. Of course, Giles needs to approve too :-)

Posted: Sat Mar 25, 2006 10:33 pm
by JensAyton
How about a lead indicator for plasma cannons? :-)

Re: Advanced Naval Targeting System

Posted: Sun Mar 26, 2006 8:10 am
by TGHC
winston wrote:
and a target 'pipper' to help you line up your laser (this is trivial).
What is that?

I'm hoping it's something like the crosshairs changing colour (to red for example) when a target is in the crosshairs and able to be hit by laser. Very useful on long range targets and also helps to conserve laser temperature by not wasting shots.

Posted: Sun Mar 26, 2006 6:28 pm
by winston
Ahruman wrote:
How about a lead indicator for plasma cannons? :-)
That sounds disturbingly like it would need differential calculus to do. The last time I tried to do that my head exploded.

Posted: Sun Mar 26, 2006 7:26 pm
by JensAyton
Only if the plasma pulses accelerate, which’d be a strange thing for them to do. If they don’t, it’s a simple matter of projecting the target’s velocity vector onto the camera plane and scaling by distance. Taking ship acceleration into account would make the scaling polynomial. Supporting accelerating munitions would make it go all differential-shaped.

Posted: Sun Mar 26, 2006 8:39 pm
by winston
OK - on those long range shots, well, I think the general consensus is we don't wanna do anything that makes Oolite a 'Press F3 to kill all enemies and collect cargo' type of thing...so hopefully this strikes a balance.

For the ANTS, a 'precision targeting helper' appears when your laser crosshairs come close enough to the target's 'centre of gravity'. Its appearance doesn't guarantee you'll hit at long range, but you can use it to see a bit more easily how well lined up the target is since you can see how far the extensions are from your cross hairs (in most cases, having the extensions lying exactly on your cross hairs should mean you'll hit). It looks like this:

So, you're lining up your target:

http://www.alioth.net/tmp/helper-not-showing.png

and now he gets into your crosshairs, and the helper shows:

http://www.alioth.net/tmp/helper-showing.png

If anyone wants to try and play with this I'll build the branch (for Linux and Mac OS X, I don't have a viable Windows system at the moment unfortunately) and put them up for download.

I also had a go at making the ANTS a piece of equipment you could purchase, and I didn't realise how easy that was to code! (Thanks Giles!)

Posted: Sun Mar 26, 2006 9:22 pm
by Odo987
winston wrote:
and now he gets into your crosshairs, and the helper shows
Looks great!

Just a word of caution, I found that the original Elite's guns got worse and worse as you bought better models. Sure the firepower was superior, but the crosshairs became more elaborate. The end result was that the military laser could blow up anything, but its crosshairs were so large they obscured anything smaller than a planet. Just keep this consideration in mind while adding HUD stuff.

Maybe use dotted lines for the cross hair? Or lines with alpha transparency?

Posted: Sun Mar 26, 2006 9:48 pm
by lex_talionis
tbh, i have to say that the helper is just a bit too cumbersome. like Odo987 pointed out, it gets to the point where you can't see the target for the targetting equipment. the crosshairs chainging colour is a better idea - assuming it can be done with a minimum of hassle.

i agree with the idea of making them partly transparent... definately a good way to go.

Posted: Sun Mar 26, 2006 10:21 pm
by winston
Well, I'll play around with the alpha channel. Perhaps just tick marks on the corners of the 'diamond of death' rather than a full cross may be better too.

Posted: Sun Mar 26, 2006 10:28 pm
by oO
Great! just bought mine :P

What about some range indication for the non-selected targets?

In example, alpha value of the reticle decreases with distance:

Code: Select all

Index: src/Core/HeadUpDisplay.m
===================================================================
--- src/Core/HeadUpDisplay.m	(revision 370)
+++ src/Core/HeadUpDisplay.m	(working copy)
@@ -2029,7 +2029,15 @@
 	//rotate to face player1
 	glMultMatrixf(back_mat);
 	// draw the reticle	
-	glColor4fv(targetColor);
+	if (!show_info) //distance hint for non-targetted items
+	{
+		double mass_lock_range2 = 25600.0*25600.0;
+		double dist_alpha = 1 - target->zero_distance/mass_lock_range2;
+		GLfloat targetColorAlpha[4] = {targetColor[0], targetColor[1], targetColor[2], dist_alpha};
+		glColor4fv(targetColorAlpha);
+	} else {
+		glColor4fv(targetColor);
+	}
 	glBegin(GL_LINES);
 		glVertex2f(rs0,rs2);	glVertex2f(rs0,rs0);
 		glVertex2f(rs0,rs0);	glVertex2f(rs2,rs0);

Posted: Sun Mar 26, 2006 10:58 pm
by TGHC
Sorry to keep going on about this ( too much wine and Belgian beer) yes I'm flying a kite right now! The most useful enhancement I've used is in Xelite, where the croshhairs target changes from the normal green to red when the "target" can be hit by laser fire. If its's green you miss, if it's red you hit, very simple and very very effective.

Posted: Mon Mar 27, 2006 2:18 am
by ArkanoiD
TGHC wrote:
Sorry to keep going on about this ( too much wine and Belgian beer) yes I'm flying a kite right now! The most useful enhancement I've used is in Xelite, where the croshhairs target changes from the normal green to red when the "target" can be hit by laser fire. If its's green you miss, if it's red you hit, very simple and very very effective.
btw what is Xelite?

Posted: Mon Mar 27, 2006 7:55 am
by winston
The trouble is as you say - it's TOO simple and effective - it reduces aiming to moving around waiting for a cross hair to change colour. The idea behind the 'precision targeting designation' is to make it more visible when something is properly lined up, but without going as far as suggesting when to fire and still requiring the pilot to aim as before (the problem at the moment isn't that it's difficult to aim on a distant target, it's that it's virtually impossible).

IMHO, the problem with 'long range shooting' is it's very difficult to see when a ship is actually lined up into the cross hairs for two reasons:

- the cross hairs don't actually cross so you can't easily tell when something is precisely lined up
- space is very dark.

To amplify on the second point, Oolite is *very* much harder when it comes to aiming than the original Elites for a couple of reasons - one, more precision is needed but, two - just as importantly - in the 8-bit Elites ships were always bright white against a black background and so were very easy to see even at a large distance. In Oolite, a distant ship is virtually invisible (especially in a planet's shadow).

Anyway, I'll play with it a bit more tonight. It is of course all experimental anyway so anything goes :-)