Crowdedlight / Crows-Electronic-Warfare

Arma 3 Mod that enables electronic warfare features such as Radio/Drone jamming and spectrum signal tracking
https://crowdedlight.github.io/Crows-Electronic-Warfare/
Other
17 stars 6 forks source link

Add sweep spectrum signal to radio jammers that traverse entire frequency span as indicator of jammer #83

Closed Crowdedlight closed 2 months ago

Crowdedlight commented 2 months ago

Note to self. Implemented handling to support jammer spectrum signals for both drone and radio jammer. Will sweep the entire spectrum of the type, and thus show a sweep in jammer frequency, and a sweep in entire radio comms frequency span if both is enabled.

However activating that causes following issues:

  1. due to the big increase in frequency span going from 7 to 359, even at incrementSpeed of 50, it still "felt too slow". Although might be fine.
  2. Multiple signals on same object makes the zeus text be on top of each other and be impossible to read. Ideally you would want them spaced apart, or aggregated so its a single line showing array of "signal types" too.
Crowdedlight commented 2 months ago
  1. would likely make most sense to change from using array to hashmap. As then adding new beacons on same objects would allow to just add it to the netID key of the object. Thus making it possible to offset each beacon on an object.

Right now the draw code for the text is kept simple for performance and just draws on each object it is given. However, it does not know if the object has already had another signal drawn.

Alternatively when adding a signal to an object, I could increase "number of signals" on said object as an object variable with broadcast. Then this code would only need to read the count to know if offset is needed. However it still doesn't know if it's the first or later attempts at drawing, and thus what offset to apply...

hacky way could be in the loop to draw I cache in a hashmap each object and how many times it has drawn. It would cost something to create the hashmap though. Even if inserts and lookups are closer to O(1).... hmm.