Recent Changes - Search:

Main.SideBar (edit)

PmWiki

Radars

Proposal part II

General

There will be radars and radar jammers.

Radars will be able to operate in 2 modes: active and passive.
Active mode means that radar itself transmits a signal and then receives signals which have reflected off the objects.
Passive means that radar only "listens" to reflected signals without emitting signal itself.
That is, passive radar is like active radar with transmitter deactivated and only receiver working.
Basically with active radar you can detect more stuff (and units which are farther), but you'll also expose yourself because active radar can easily be detected while the passive cannot be.

Radar jammers make units in certain area impossible to detect for radars.
Probably it should be possible to also turn radar jammers off.

Questions

Should active radars be "heard" all over the map or only in a certain range?
When radar is active, it emits very strong signal which is received by all nearby radars. Thus active radars are very easy to detect. If we use realistic ranges, then an active radar would be detected by all other radars on the map, even on the maximum-size map.
I'm not sure it's good, so it might make sense to limit that range. The range should be quite big (maybe about 100-250 cells, or 2 times the average detection radius), but not infinite.

Should radars of different players affect each other?
If player A builds a passive radar and player B builds an active radar, should A's radar be able to pick up signals that came from B's radar and then reflected from units?
Probably not since it would mean that all your units close to even your own radar will be visible to enemy's radars.

Should radars react differently to moving and non-moving units?
In reality, radars usually only see moving units. In Boson it probably makes sense to show the non-moving units as well but maybe the moving ones should be "preferred"? That is, moving units would have stronger radar signature and would thus be visible from farther.

Should jamming be visible?
When radar jammer has been activated in an area that a radar would otherwise see, should the radar detect that it is being jammed or not?
I think it's a good idea and that's also how it works in reality. We could have a noise texture around the jammer's position

What exactly should passive radar be able to detect?
Of course it will be able to detect active radars, but what about other units? Maybe it would make sense to make it also detect other units but with much smaller range (e.g. with 3 smaller range)?

Old stuff

(this is now obsolete and in SVN already)

Introduction

Radars will scan the area around them and all the units which are visible to the radar will be shown on the minimap as small 'blips'.
However first we need to find the visible units...

Straightforward method

The easiest method, currently used in my code, first calculates the maxrange of the radar (all the visible units should be in this range) and then uses BosonCollisions::collisionsAtCells() to get a list of all units in the range. After that, we check for every unit if the unit is really visible by the radar and render the blip if it is.

Why isn't this in CVS yet??
Because it needs some more work. It will hit the CVS soon though.
Why isn't this work done in CVS? I mean that's what a VCS is for, isn't it? (I don't mean to force you to put it into CVS - do what you prefer. I just wonder why do most work outside CVS where you don't have backups and can't get comments. It's often better to release early, release often and then refactor)

Problems:

  • SLOW - ATM the BosonCollisions call can take about 5 milliseconds per radar (with a fast computer). The problem increases with bigger maps, bigger radar ranges, and more radars.
    This problem could be partially solved by using a more effective algorithm for collisionAtCells() (e.g. using quadtree), but the problem would still be there for big maps and many radars.

Minimap approach

The minimap currently in CVS updates itself only when units move. The new minimap (radar display) cannot use this method entirely as it doesn't use cells anymore and thus needs to re-render all blips every time it's updated, but it could take over the base idea: don't do calculations for passive (i.e. non-moving) units.
We could store a list of all blips every time the minimap is updated. We'd also have a separate dirty-units list. Whenever a unit moves, it's blip is removed from the blips list and it is added to dirty-units list. When the minimap is updated, we first render the blips in the blips list and then for every unit in dirty-units list, we check if the unit is visible for the radar. If it is, we add a corresponding blip to the list and render it.
Further optimization here would be to do a quick check when the unit is about to be added to dirty-units list: if the unit is surely not in range of any radar, we can throw it away and not add it to dirty-units list.

Edit - History - Print - Recent Changes - Search
Page last modified on June 26, 2006, at 19:42