aliens

Author Topic: another idea - radar range on geoscape  (Read 109343 times)

Offline hellblade

  • Captain
  • ***
  • Posts: 87
    • View Profile
another idea - radar range on geoscape
« on: October 20, 2011, 07:46:23 am »
The lack of visuals to show radar coverage probably has bugged alot of you.  (One of my friends went as far as mapping out his game radar coverage on a real world globes, using ruler, compass, and radar range data,  to plan his 8 base locations.)

So I suggest something along these lines:
1) Add 3 circles centered on the mouse during "place your base" so we can see what it covers.  The 3 circles are small,large,hyper-decoder of course.
2) Add a toggle button on geoscape to show what current radar coverage is.

And IF anybody has the time to write the programming, then maybe make the coverage area colour/colour-shade coded to show probability of detection.

Volutar

  • Guest
Re: another idea - radar range on geoscape
« Reply #1 on: October 20, 2011, 09:10:26 am »
it's not that easy.
1. color shade/hueing is nearly impossible in 8bit mode (contour line sound more real).
2. detection work in lang/lat terms, so projected area (distance) is not really a circle (shrinked near pole).
3. there are lot of complicated maths for drawing any circles on a sphere (specially distorted), and it will eat noticable amout of CPU time.
4. this radar visualizing in "mouse hover" mode will be additional performance eater.

Though I tend to agree with need of something like that.

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: another idea - radar range on geoscape
« Reply #2 on: October 20, 2011, 01:17:33 pm »
3. there are lot of complicated maths for drawing any circles on a sphere (specially distorted), and it will eat noticable amout of CPU time.
nope, i could draw 32 circles for shadow on globe without big difference to current shading method.
trick is to compute very big table with hight of sphere (similar to that you want draw flat circle but you dont write color but hight of that sphere to table)
2. detection work in lang/lat terms, so projected area (distance) is not really a circle (shrinked near pole).
only this is problem in my approach, because i will get real circles

i think it could be new color scheme for this, you switch to radar mode and you see only shape of lands and radar ranges (black & green colors only used like in real radars displays)

Volutar

  • Guest
Re: another idea - radar range on geoscape
« Reply #3 on: October 20, 2011, 02:52:56 pm »
2D circles is not the case. Forget them. They will work only for locations at the center of the viewscreen. All others will look like inclined ellipses (probably partly hidden, if went hidden side of globe).

I've looked at xcom code, and found how they calculating detection. ShortRange=500, LongRange=750, Hyperwave=800, XCom Craft=200 (yeah it has its own detection range). Detection probability depends on ufo size and altitude and number of radars of same type (yeah number of radars actually affect on probability, as they say in ufo user manual - each radar makes full scan every 5 minutes, so increasing number of radars will increase detection capability of base). Units of distance are direct 3D distance between 3d coordinates (sqrt(x*x+y*y+z*z)). Earth diameter is 2048 units. So one hemisphere is covered by range of 1448. It's like, borderline of such radar is a intersection circle between earth globe and detection 3d __sphere__ of base/craft.

And by the way, UFOs are detected only every 30 minutes.
« Last Edit: October 20, 2011, 03:00:13 pm by Volutar »

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: another idea - radar range on geoscape
« Reply #4 on: October 20, 2011, 03:14:51 pm »
2D circles is not the case. Forget them. They will work only for locations at the center of the viewscreen. All others will look like inclined ellipses (probably partly hidden, if went hidden side of globe).

I've looked at xcom code, and found how they calculating detection. ShortRange=500, LongRange=750, Hyperwave=800, XCom Craft=200 (yeah it has its own detection range). Detection probability depends on ufo size and altitude and number of radars of same type (yeah number of radars actually affect on probability, as they say in ufo user manual - each radar makes full scan every 5 minutes, so increasing number of radars will increase detection capability of base). Units of distance are direct 3D distance between 3d coordinates (sqrt(x*x+y*y+z*z)). Earth diameter is 2048 units. So one hemisphere is covered by range of 1448. It's like, borderline of such radar is a intersection circle between earth globe and detection 3d __sphere__ of base/craft.

And by the way, UFOs are detected only every 30 minutes.
i will get 2d circles ON globe not on screen :>
https://openxcom.org/forum/index.php/topic,150.msg2168.html#msg2168 i can have something similar to this shadow.
and this work base on on intersection between two spheres (that are stored as 2d array of hight, in case of this shadow i use 32 different intersections). from that you said now i can do it without problems (i only need find some time to do it).

Offline kkmic

  • Commander
  • *****
  • Posts: 582
  • Undefined
    • View Profile
Re: another idea - radar range on geoscape
« Reply #5 on: October 20, 2011, 03:41:46 pm »
How about this:

Yankes will attempt to make a proof of concept build/video, and if it's feasible then it would be implemented in OpenXCom in the "UFO Extender" category as an optional feature?

:D
« Last Edit: October 20, 2011, 09:50:41 pm by kkmic »

Volutar

  • Guest
Re: another idea - radar range on geoscape
« Reply #6 on: October 20, 2011, 03:58:55 pm »
Yankes, what do you mean by "hight"? :)

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: another idea - radar range on geoscape
« Reply #7 on: October 20, 2011, 08:24:47 pm »
sorry, height (sh** i eat up letter again :/).


Volutar

  • Guest
Re: another idea - radar range on geoscape
« Reply #8 on: October 22, 2011, 12:13:39 am »
M-kay.
Radius of planet in game units is 1024 and diameter is 2048, with actual great circle length is 40009.88km, so radar ranges for different game entities are:
distance 200 (craft) = 1245.69km = 672.61nm (osg=600nm)
distance 500 (small) = 3141.01km = 1696.01nm (osg=1500nm)
distance 750 (large) = 4774.98km = 2578.29nm (osg=2250nm)
distance 800 (hyper) = 5110.91km = 2759.66nm (osg=2400nm)

https://www.ufopaedia.org/index.php?title=UFO_Detection
Differences between actual range numbers and observable (and listed in official strategy guide) are because of ufo always have some progress travelling undetected inside of radar range between 30min scans. But this isn't applied on UFO base detection (because they are static), and for slowly flying and ground UFOs.

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: another idea - radar range on geoscape
« Reply #9 on: November 08, 2011, 04:28:16 pm »
i made some progress on my globe shading and drawing circles on sphere :)
i see some limitation in that approach, when i try draw small circle i get some glitch and i dont get circular shapes.
« Last Edit: November 08, 2011, 04:32:15 pm by Yankes »

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: another idea - radar range on geoscape
« Reply #10 on: June 26, 2012, 11:00:24 am »
has anybody been looking into this some more? because I really liked the idea. it would be a nice way of making the geoscape more interesting.

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: another idea - radar range on geoscape
« Reply #11 on: July 01, 2012, 12:42:14 pm »
After my globe shading was added to master branch, 90% things need to do it are in game now.
Only problem is some free time to do it :)

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: another idea - radar range on geoscape
« Reply #12 on: July 01, 2012, 12:53:15 pm »
nice! except for the free time part. why does RL always have to get in the way of the important stuff?  ::)

hmmm... another thing just crosses my mind... do you think it would be possible to add UFO flight path "traces" that fade over time?

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: another idea - radar range on geoscape
« Reply #13 on: July 01, 2012, 02:05:50 pm »
I dont see any easy way to do it. Only solution that could work is to store somewhere previous position of craft, but this will require many changes to do it.

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: another idea - radar range on geoscape
« Reply #14 on: July 01, 2012, 02:12:53 pm »
too bad :( I thought there might be an easy way.