Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: ChronoReverse on January 14, 2010, 02:14:07 am

Title: Rear and Forward 2D Radar
Post by: ChronoReverse on January 14, 2010, 02:14:07 am
I was bemoaning how it's hard to position a target directly at the rear using the 2D radar (and that the 3D radar has some usability problems where target icons behind you often cover up the ones in front) and decided to do something about it.

(http://img683.imageshack.us/img683/9838/doubleradar.png) (http://img683.imageshack.us/i/doubleradar.png/)

Basically, the 2D radar was shrunk down while a second identical radar, except facing backwards, was added.  This allows one to have the benefit of the rear view but still keep the ability to, with a glance at a single graphic, track objects quickly.  I decided to keep the standard 2D radar instead of using the Tie Fighter style radar I had originally intended to make when someone pointed out that they preferred not having to split their attention between two radars.

Is this something of interest to anyone else (and thus warranting polish)?
Title: Re: Rear and Forward 2D Radar
Post by: Black Wolf on January 14, 2010, 02:21:18 am
I'm sure FotG would be interested in having it at least as a launcher option.
Title: Re: Rear and Forward 2D Radar
Post by: Mongoose on January 14, 2010, 02:53:15 pm
I've never really had issues with the standard one-way radar myself, but it is a nifty feature. :)

(Booted to Modding, for great justice!)
Title: Re: Rear and Forward 2D Radar
Post by: Dragon on January 14, 2010, 03:19:34 pm
It seems interesting.
Title: Re: Rear and Forward 2D Radar
Post by: headdie on January 14, 2010, 04:24:19 pm
its one of those things where its down to the preference of the modder or player and something i would like to play with
Title: Re: Rear and Forward 2D Radar
Post by: Aardwolf on January 14, 2010, 04:25:26 pm
Booted to Modding, for great justice!

Shouldn't this be in the SCP board, since it's a coded feature? Or is it a Lua script (in which case it may belong in the scripting child board)?

The biggest benefit I can think of for this is when you have to evade shockwaves from big ships, and it is sometimes difficult to figure out which way to fly...
Title: Re: Rear and Forward 2D Radar
Post by: Mongoose on January 14, 2010, 06:37:05 pm
Booted to Modding, for great justice!

Shouldn't this be in the SCP board, since it's a coded feature? Or is it a Lua script (in which case it may belong in the scripting child board)?
No matter what its origin, it seemed more of a moddish-type thing than something that belonged in GenFS, so I sent it here.  Herra or Snail is free to move it elsewhere if they so wish. :p
Title: Re: Rear and Forward 2D Radar
Post by: ChronoReverse on January 14, 2010, 07:49:11 pm
@mongoose
Sorry, I had no idea where to put it.

@aardwolf
Yeah, it's a matter of orientation that has always bugged me.  It's easy to orient yourself against anything in the forward arc, but when it comes the behind you, it's a tricky business.  I'm wondering if the forward radar should be larger than the rear one since it's still the primary one.
Title: Re: Rear and Forward 2D Radar
Post by: Aardwolf on January 14, 2010, 09:41:33 pm
Maybe have a full forward-and-reverse radar, which is bigger, and then a small reverse-only radar?
Title: Re: Rear and Forward 2D Radar
Post by: Stormkeeper on January 14, 2010, 10:07:32 pm
How do you tell which is forward facing, and which is rear facing? Seasoned players might be able to tell, but new players might not.
Title: Re: Rear and Forward 2D Radar
Post by: Commander Zane on January 14, 2010, 10:31:10 pm
Different positioning, all of my attention is being drawn to the radar just floating overhead the other.
Title: Re: Rear and Forward 2D Radar
Post by: ChronoReverse on January 14, 2010, 10:59:49 pm
Right now the higher one (thus closer to your immediate view) is the forward one.  It'd be trivial to label them of course.  If the forward one was made larger, it'd also be more obvious.

Maybe have a full forward-and-reverse radar, which is bigger, and then a small reverse-only radar?
Yeah, this could work.  I'll whip it up tomorrow (since I'm playing with scripting right now).
Title: Re: Rear and Forward 2D Radar
Post by: Nuke on January 15, 2010, 02:37:42 am
i did something like that with lua
(http://i213.photobucket.com/albums/cc103/Emperor_of_Nihil/screen0017.jpg)
i called it a hemispheric radar, theres also an elite style radar as well as an orthographic radar on the rtt display. i also did a fisheye radar and a multitargeting scope but those arent shown yet.
Title: Re: Rear and Forward 2D Radar
Post by: ChronoReverse on January 15, 2010, 02:55:32 am
I didn't even know about the scripting until yesterday lol.  Are these scripts posted up somewhere?
Title: Re: Rear and Forward 2D Radar
Post by: chief1983 on January 15, 2010, 10:09:34 am
Code option would be nicer for FotG, especially one controllable via the custom hud table.  I know the XvT converts would be used to a hemispheric radar, and it'd be a cool touch of customization for us.
Title: Re: Rear and Forward 2D Radar
Post by: Nuke on January 15, 2010, 03:39:52 pm
I didn't even know about the scripting until yesterday lol.  Are these scripts posted up somewhere?

right now there being kept hostage on my hard drives by a raving lunatic who wont release them till they become self aware.
Title: Re: Rear and Forward 2D Radar
Post by: ChronoReverse on January 15, 2010, 04:01:49 pm
Scripting would be used a lot more if more of these type of cool stuff would be released =(

With scripting, it should be possible to do a "closest to reticule" target bracket system right?  It would be nice to have a temporary targeting bracket for that complete with lead indicator.
Title: Re: Rear and Forward 2D Radar
Post by: Nuke on January 15, 2010, 09:00:36 pm
i already did that.

and scripting would get used more if people used scripting.
Title: Re: Rear and Forward 2D Radar
Post by: ChronoReverse on January 15, 2010, 09:07:54 pm
I need a less cryptic response about where to get that script then :nod:
Title: Re: Rear and Forward 2D Radar
Post by: Aardwolf on January 16, 2010, 01:22:50 am
I need a less cryptic response about where to get that script then :nod:

You didn't get a response. It probably means it's unreleased... though I suppose it might be in a released version of Nukemod.
Title: Re: Rear and Forward 2D Radar
Post by: Nuke on January 16, 2010, 01:53:16 am
i dont work on making little pewny scripts that just do one thing, i work on epic scripts that do lots of things. and i might release it if i am ether elected world emperor (and thus have the power to send whoever complains about bugs to death camps), or finish it, whichever comes first.
Title: Re: Rear and Forward 2D Radar
Post by: Aardwolf on January 16, 2010, 03:51:41 pm
well is it finished yet?
Title: Re: Rear and Forward 2D Radar
Post by: Nuke on January 16, 2010, 04:14:57 pm
no
Title: Re: Rear and Forward 2D Radar
Post by: jr2 on January 16, 2010, 04:21:56 pm
/me has an idea:

slightly smaller Forward 2D radar - 3D orb radar - slightly smaller Rear 2D radar

... Yeah, I know.  :warp:
Title: Re: Rear and Forward 2D Radar
Post by: ChronoReverse on January 16, 2010, 04:24:07 pm
Not impossible but that's a lot of redundant information and a very small space.
Title: Re: Rear and Forward 2D Radar
Post by: jr2 on January 16, 2010, 04:31:52 pm
Well, maybe a toggle switch for forward 2D / rear 2D / forward and rear 2D / 3D orb?
Title: Re: Rear and Forward 2D Radar
Post by: Nuke on January 16, 2010, 07:06:50 pm
radars are actually very easy. heres some speudocode

/psedocode/
iterate through ships
determine if you want this on the radar
determine what color you want the blip to be and set it
vector subtract your position from the target's position (make your ship 0'0'0)
determine if you still want to do this. is it in range (pos:getMagnitude() < x)?
rotate the target's position vector by your orientation matrix (player.Orientation:rotateVector(target.Position)), this line (and the one above it) puts the object in your frame of reverence
determine if you still want to render this.  is in the scan cone? etc. (do this a lot, especially before big and potentially unnecessary calculations, it will make it faster)
\pseudocode\

now you decide how you want these dots to be displayed, the math here depends on what you want done. it may just involve some simple scaling and clipping for orthographic projections, or trig functions for fish eye or hemispheric modes. but regaurdless this is where the look of the radar is defined. for example, a hemispherical radar, i used something like x,y = (pos.x/pos:getMagnitude()) * scaler, (pos.y/pos:getMagnitude()) * scaler. basic knowledge of trig and vector math comes in handy here. once you determine where you want to draw a blip, and what you want to draw (can be a pixel, a circle, but i use a small icon myself).

Well, maybe a toggle switch for forward 2D / rear 2D / forward and rear 2D / 3D orb?

how you want different radars to be selectable is entirely arbitrary, do you want every mod to have the same set of radars to choose from, or do you want it so modders can say this mod (or this ship) uses this radar (or this ship uses this other radar). while it makes sense to set it as a global flag, it seems the feature of multiple radars would have a multitude of applications that a global flag would destroy. i myself would make it a hud_gauges.tbl thing. (of course my scripted gauges have their own implementation all together with their own table).