aliens

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

Offline pmprog

  • Commander
  • *****
  • Posts: 647
  • Contributor
    • View Profile
    • Polymath Programming
Re: another idea - radar range on geoscape
« Reply #15 on: July 06, 2012, 07:00:59 pm »
I like the idea of the radar coverage. Even if it's just a single circle at the edge of the coverage.

The flight trails sound quite good too. Might be possible if you ditch the "fading", and just retain the last (n) long/lat locations, and instead of drawing the square indicator, just draw a single pixel. This will give you a "snake" like trail. If you use the game gradients, you could always just select it to a darker colour. Not quite fading, but should look pretty good

Volutar

  • Guest
Re: another idea - radar range on geoscape
« Reply #16 on: July 07, 2012, 09:50:39 am »
8 bit is not enough for all geoscape fancy radar circles over shading.

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: another idea - radar range on geoscape
« Reply #17 on: July 07, 2012, 09:55:03 am »
why not? I'm sure there is a nice green that could be used to draw a simple circle outline. it doesn't need to be shaded at all, since it's more of an overlay.

Volutar

  • Guest
Re: another idea - radar range on geoscape
« Reply #18 on: July 07, 2012, 10:01:56 am »
Sure, if you have infinite CPU speed, to calculate "hovered" and multiple sphere-projected circles, and don't mind of ugly aliased lines.

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: another idea - radar range on geoscape
« Reply #19 on: July 07, 2012, 11:01:06 am »
ah, now I see your point
« Last Edit: July 07, 2012, 04:55:50 pm by moriarty »

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: another idea - radar range on geoscape
« Reply #20 on: July 07, 2012, 11:01:17 am »
a few thoughts on radar coverage:

looking at the code (although I'm not a programmer), I guess you could just re-use the country-border part of "Globe::drawDetail()" to draw the static radar circles around the bases. wouldn't that work?

as for drawing radar coverage of aircraft... I don't know. :)

there's another idea that comes to my mind: similar to the battlescape "fog-of-war", you could toggle the geoscape between two views: the standard view with shadow indicating the time of day, and the "tactical" view where "shadow" would indicate "no radar coverage" and all radars (including aircraft) would be considered "light sources" - although I guess that would be quite heavy on CPU load, right? multiple light sources? if the shading part was given to the GPU, you could even combine the two with radar being a light source of a different color.
« Last Edit: July 07, 2012, 04:56:00 pm by moriarty »

Offline Yankes

  • Commander
  • *****
  • Posts: 3194
    • View Profile
Re: another idea - radar range on geoscape
« Reply #21 on: July 07, 2012, 01:18:04 pm »
Volutar only problem with radar circles is that game use circles on 2d space not 3d (possible Im wrong here, I didnt check that :>).

Small hack, I changed couple of lines in my globe shading, and I have alpha version of radar circle :)
If I use simplest solution I could draw 8 independent radars ranges and have around 40 FPS left.

Offline luke83

  • Commander
  • *****
  • Posts: 1558
    • View Profile
    • openxcommods
Re: another idea - radar range on geoscape
« Reply #22 on: July 07, 2012, 01:23:18 pm »
Looks good to me :D

Volutar

  • Guest
Re: another idea - radar range on geoscape
« Reply #23 on: July 07, 2012, 01:26:55 pm »
40fps for 320x200, and what about 640x400? Maximum 10fps. And where is day/night shade? And how to distinct one radar from another and from terminator line?
And where is screenshot for 8 different radars + day/night? I bet you don't even imagine how ugly it will be looking.
All I see is simple day/night shading with perverted size formulas.
There will be real mess with all these circles, if you try to go such way with 8bpp.
It will look much better if using hue+lighting shift, which is possible only for opengl.

8bpp radar ranges could be anyhow feasible only by drawing sectors of ellipses (as fake sphere sections). Though in this case ugly aliasing is unavoidable.
« Last Edit: July 07, 2012, 01:45:33 pm by Volutar »

Offline Yankes

  • Commander
  • *****
  • Posts: 3194
    • View Profile
Re: another idea - radar range on geoscape
« Reply #24 on: July 07, 2012, 01:54:53 pm »
game is always in 320x200 in a sake of my algorithm, second now I run in 640x400 aka 40FPS in 640x400, in 1280x800 will probably take around 20FPS.
third I used only 20% of my CPU to draw it (I used new "slow" version of game :D).

And about look. This is terminator line, it would be hard for it, dont look like this :)
I need create new function that will be 100% dedicated for drawing radars, it would have some tweaks to work faster and look completely different.
Ad as moriarty points out in another topic this will be new globe "mode" with different graphic set.

And about of aliasing, in my vision of this you will see only sum of radar coverage not independents radars (you can toggle them). This will made possible to use monochrome coloring of this and more smooth look.
« Last Edit: July 07, 2012, 01:56:27 pm by Yankes »

Volutar

  • Guest
Re: another idea - radar range on geoscape
« Reply #25 on: July 07, 2012, 02:13:04 pm »
640x400 have 4 times more pixels than 320x200. It doesn't matter how large scaled SDL window is, native SDL resolution only matter.

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: another idea - radar range on geoscape
« Reply #26 on: July 07, 2012, 02:13:49 pm »
Volutar, I think you are right that in order to combine radar ranges and day/night shading, openGL would be the only feasible solution. But what Yankes is trying to achieve now is something different: A way to look at the geoscape globe where you can actually see your radar coverage. It would be a different globe drawing style that you can toggle somewhere, which shows you the radar circles instead of the day/night shading. It's probably the best we can do for now, and I think it would be nice (and sometimes, really helpful).

Maybe this could be something that would automatically toggle when you are placing a new base: you could immediately see where you should put it in order to get the best land mass radar coverage. That would make sense, wouldn't it? I distinctly remember cutting paper circles and shifting them around on a plastic globe in my room to determine the optimal base placement :) back in the days...

« Last Edit: July 07, 2012, 04:54:45 pm by moriarty »

Volutar

  • Guest
Re: another idea - radar range on geoscape
« Reply #27 on: July 07, 2012, 02:29:11 pm »
Toggling between day/night and radar cover.. seems to be plausible. Though you need to have a distinction between currently selected base and combined others, that would require 3 levels.
And BTW, currently OXC doesn't have such thing as "selected base" in globe view, only in base view.

Offline Yankes

  • Commander
  • *****
  • Posts: 3194
    • View Profile
Re: another idea - radar range on geoscape
« Reply #28 on: July 07, 2012, 02:41:18 pm »
moved form "High-Res Graphics"
640x400 have 4 times more pixels than 320x200. It doesn't matter how large scaled SDL window is, native SDL resolution only matter.
Ok I get what you mean then. Right, when I increase basic resolution to 640x400 I need 4 times more CPU time to draw this, but still this will take around 30FPS on my CPU (100% usage).  This is all in case of simplest solution that is drawing it 8 times independently for every radar and every frame. But as radars dont move I need redraw them only one time per "view", this mean I can archive even 100 FPS @ 640x400 when I dont rotate globe.

Offline Yankes

  • Commander
  • *****
  • Posts: 3194
    • View Profile
Re: another idea - radar range on geoscape
« Reply #29 on: July 07, 2012, 02:43:52 pm »
Volutar I moved with discussion to
(we should really move this discussion to that other thread, since this one used to be about High-Res Graphics.)