Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Tomo on August 15, 2009, 10:52:56 am

Title: Feature Request: ELITE style Radar
Post by: Tomo on August 15, 2009, 10:52:56 am
One thing I found annoying from the start of Freespace was the radar - it tells you almost nothing about where a ship is physically located relative to you, only which direction it's in.

This works fine for simple dogfights as it almost forces you into lag/lead pursuit without noticing, but in any 'Stay x km away from' mission, you simply can't monitor your distances without continually cycling targets and/or radar range.

The 3D Orb radar is a great improvement, but it has what I consider to be two flaws:
1) It's referenced to the FRED plane.
I don't care what the FRED plane is. It simply doesn't matter in space, as there's no real 'Up'.
You do care about the orientation of other capital ships, but there's no indication of that in either radar.

2) It's still very difficult to determine the distance to other vessels, although it is at least possible with this radar.

In ELITE, the radar was a simple plane with blobs on sticks. http://en.wikipedia.org/wiki/Elite_%28video_game%29 (http://en.wikipedia.org/wiki/Elite_%28video_game%29)
- The plane is referenced to you and you alone, so it shows you what's in front and behind and how far away it is. There were two lines drawn on the plane that showed your field of view, so you could tell what should be visible.

Blobs above and below the plane are connected to the plane by a stick, so you can tell immediately if something is a long distance from you.
Colour was used to indicate your target - we could use dark red/green/blue untargeted, bright for your target instead of changing blob size.

In an ideal world, I'd love something that showed relative position, orientation and ship class, but I suspect that you can't have all three without cluttering the display too much to be easily readable.

Comments? Suggestions?
Title: Re: Feature Request: ELITE style Radar
Post by: Nuke on August 15, 2009, 08:17:16 pm
as far as i know freespace has 3 styles of radar. the old style, the orb style and i believe it also has a 3rd kind of hemispheric radar which ive seen in screenshots but never bothered to determine how to implement.

you can also implement radars through scripting fairly easy.
Title: Re: Feature Request: ELITE style Radar
Post by: Galemp on August 15, 2009, 08:23:18 pm
You could always limit your radar range.
Title: Re: Feature Request: ELITE style Radar
Post by: Solatar on August 15, 2009, 11:01:02 pm
There was a script around somewhere that did nearly this. You pressed a button and it replaced your HUD with a bunch of dots with lines (showing how far they were above the plane your fighter was in) and next to those dots it showed the distance between you.
Title: Re: Feature Request: ELITE style Radar
Post by: Nuke on August 16, 2009, 05:15:00 am
you mean mr radar? that was just a crappy frustum based radar i made because i didnt feel like using trig at the time :D
though i ended up using trig anyway
Title: Re: Feature Request: ELITE style Radar
Post by: Tomo on August 16, 2009, 01:28:24 pm
There was a script around somewhere that did nearly this. You pressed a button and it replaced your HUD with a bunch of dots with lines (showing how far they were above the plane your fighter was in) and next to those dots it showed the distance between you.
That sounds promising.
Any ideas where it might be found (or what is was called/who made it)?
Title: Re: Feature Request: ELITE style Radar
Post by: chief1983 on August 17, 2009, 01:59:53 pm
The hemispheric one was, to my knowledge, only implemented by the Imperial Alliance team, which I believe is now defunct.  We do have that code, but it's quite ancient.  The radar code might still be decipherable.
Title: Re: Feature Request: ELITE style Radar
Post by: Aardwolf on August 17, 2009, 08:34:50 pm
Anyone got any screens/video of it?
Title: Re: Feature Request: ELITE style Radar
Post by: chief1983 on August 17, 2009, 10:41:53 pm
Anyone got any screens/video of it?

(http://www.lenvik.org/ia/media/images/screens/containershandk.jpg)
Title: Re: Feature Request: ELITE style Radar
Post by: Nuke on August 18, 2009, 07:51:38 am
im sure i could script a similar radar if i could figure out the trig needed. mr radar is a total mess right now, its convoluted and slow and ugly. i hope to replace it with a multi mode radar eventually. one where you could choose from a number of different types, ranging from the plannar elite style radar, hemispheric, frustum, ect. it would tie into missile locking somehow. the idea behind mr radar would be you could shrink your field of view to increase your radar range. the idea was to make it possible to shoot at ships at long range with high precision and also peirce through nebula fog.  my other idea was to write a function in lua which calls whatever function draws the radar, of course im not quite sure i fully understand the radar c code.
Title: Re: Feature Request: ELITE style Radar
Post by: Thaeris on August 18, 2009, 11:51:15 am
Now that I think of it, Laminar Research's SpaceCombat had the "stick-and-dot" radar. The plane at the bottom was a fixed-range set, which only went out to... I forget how many kilometers. I think it was about 40. That wasn't a lot, as I'd get up to 2,000m/s (or more) on an attack run. If we could design a system which was based on this, it might prove quite useful.

-Thaeris
Title: Re: Feature Request: ELITE style Radar
Post by: Solatar on August 18, 2009, 01:28:18 pm
http://www.hard-light.net/forums/index.php/topic,57750.0.html

It's not exactly what you're looking for, but I used to use it all the time. I'm not sure if it works with current SCP builds or not (I know there have been some changes in scripting).
Title: Re: Feature Request: ELITE style Radar
Post by: Thaeris on August 18, 2009, 01:40:24 pm
A map, eh? Reminds me of X-Wing! The map was critical, especially in missions where flights would pop in in differing locations. As soon as they'd jump in, hit the map (see their location) and off you go!

A FRED-like interface would be great for that. Just have a relative plane, different icons (similar to briefing icons) for flights, individual ships, etc. Then have a vector showing their flightpaths. The vector would, of course, show a symbolic line depicting speed and direction (you know, the definition of a vector?).

Speaking of over-arching analysis devices for missions, what of a mission recorder? X-Wing had one, which was quite nice. You could watch the mission from any perspective of the ship of your choosing. Perhaps then you could go to the tech room and watch the mission in the "cutscenes" menu. In which case, a "save," "export" (for .ogg/.avi would be needed), and "delete" button would be required.  :D

-Thaeris
Title: Re: Feature Request: ELITE style Radar
Post by: Sushi on August 18, 2009, 02:08:51 pm
A FRED-like interface would be great for that. Just have a relative plane, different icons (similar to briefing icons) for flights, individual ships, etc.

You mean something like this?
(http://www.freeallegiance.org/screenshots/CapitalShips/BelterCruiserTrain_SectorView.jpg)

From Allegiance, which has the exact feature you describe. And yes, it is very, very useful. :)
Title: Re: Feature Request: ELITE style Radar
Post by: Nuke on August 18, 2009, 03:21:10 pm
i think i know how to make a hemispheical radar, heres how you draw the blips:
Code: [Select]
--gets iff color
getiff = function(target)
local R,G,B
local name
if target:getBreedName() == "Ship" or target:getBreedName() == "Weapon" then
if target.Team:isValid() then
name = target.Team.Name
else
name = "Unknown"
end
elseif target:getBreedName() == "Asteroid" then
name = "Asteroid"
else
name = ""
end
if name == "Hostile" or name == "Traitor" then
R,G,B = 255,0,0
elseif name == "Friendly" then
R,G,B = 0,255,0
elseif name == "Unknown" then
R,G,B = 255,0,255
elseif name == "Neutral" then
R,G,B = 0,0,255
elseif name == "Asteroid" then
R,G,B = 255,255,255
else
R,G,B = 128,128,128
end
return R,G,B
end
--hemi-radar, takes scanning ship, xy coords of front hemisphere, xy coords of aft hemisphere, hemisphere radius
hradar = function(pship,x1,y1,x2,y2,r)
for i=1, #mn.Ships do
local tship = mn.Ships[i]
if tship:isValid() then
local tpos = pship.Orientation:rotateVector(tship.Position - pship.Position)
local tlen = tpos:getMagnitude()
local tx, ty = (tpos.x/tlen) * r, (tpos.y/tlen) * r
--place the blip on one hemisphere or the other
if tpos.z >= 0 then tx, ty = x1+tx, y1-ty else tx, ty = x2+tx, y2-ty end
--set colors
local r,g,b = getiff(tship)
local sel
--get selected target aura color
if pship.Target == tship then
local R,G,B = r+96,g+96,b+96
if R > 255 then R = 255 end
if G > 255 then G = 255 end
if B > 255 then B = 255 end
gr.setColor(R,G,B,128)
sel = true
end
--maybe draw selected target aura
if sel then gr.drawCircle(2,tx,ty) end
--draw blip
gr.setColor(r,g,b,255)
gr.drawCircle(1.5,tx,ty)
end
end
end
you just overlay that on top of some texture for a useful radar.
Title: Re: Feature Request: ELITE style Radar
Post by: Thaeris on August 19, 2009, 08:39:41 pm
Such a map would be wonderful for FS2, Sushi.

The unfortunate thing is that mission maps seem to be best for long missions which take place over long ranges. FreeSpace unfortunately does not fit that criteria as well as X-Wing did (where missions would often take longer than 20 minutes: remember that Star Destroyer jumping in 40km out?). Now, if we had more missions where considerations like patrolling about waypoints was a concern, the said feature would be exceedingly useful. With the presence of BSG and Star Wars mods in the pipes, though, the mission map would be invaluable.  :nod:

-Thaeris
Title: Re: Feature Request: ELITE style Radar
Post by: Aardwolf on August 19, 2009, 10:00:54 pm
That's also doable in FRED with a view option  :p
Title: Re: Feature Request: ELITE style Radar
Post by: Thaeris on August 19, 2009, 10:12:48 pm
 :wtf:

Sorry, I'm just not sure we're on the same page. The map suggestion was for an in-game/mission freature which would imaginably pause the sim and let the player have a look about the entire field of combat with the push of a button... a function key would be great for that purpose.

-Thaeris
Title: Re: Feature Request: ELITE style Radar
Post by: Nuke on August 19, 2009, 10:23:00 pm
ive been thinking about tac map in the context of bridge simulation. my idea would do a lot of 2d and 3d stuff. like an ortho projection of the fred plane with blips indicating locations and data for ships, and little ship iconds showing the type and orientation of the ships in reference to the plane. it wouldnt be a full screen thing but would be part of a bridge model. you could go up to the console in an fps sorta way to monitor the tactical situation. im prototyping a lot of the features that will be used in the bridge simulator as part of the cockpit demo, they will merely be scaled up to accommodate more aspects of capship command. such as being able to do different things from different stations. to a degree thats already possible, for example switching a turret camera to full screen lets you operate that turret.

im gonna do an elite style radar just for the hell of it. since i kind of wanted a multi-mode radar, or different style radars on different ships.
Title: Re: Feature Request: ELITE style Radar
Post by: Nuke on August 20, 2009, 01:58:53 am
oh and just incase you get lost
(http://i213.photobucket.com/albums/cc103/Emperor_of_Nihil/screen0017.jpg)
Title: Re: Feature Request: ELITE style Radar
Post by: Aardwolf on August 20, 2009, 07:55:31 pm
You need MOAR radar displays.

What is this, a rumrunner or a frickin' AWACS ship?
Title: Re: Feature Request: ELITE style Radar
Post by: Nuke on August 20, 2009, 10:43:28 pm
im in a satyr, im just in front of a rumrunner