Page 1 of 1

Sensor maps

Posted: 09 Dec 2015, 00:23
by lamer
There is Map::GetLosMap, Map::GetRadarMap and Map::GetJammerMap in AI interface (both legacy and newOO).
But what about sonar, how can i GetSonarMap? In Zero-K underwater objects should be tested against SonarMap rather than RadarMap.
I also found few more maps that probably could be useful and i want to reveal them (what's seismic map?).

Are those maps were forgotten (because no one tried to make naval AI, etc.) or there is some trick/function i didn't found?

Re: Sensor maps

Posted: 09 Dec 2015, 04:08
by AF
Once SJ experimented with an alternative to radar, seismic sensors. They picked up unit movement, bigger units would give bigger blips, but stationary units would be unseen. It doesn't seem to be used a lot

Re: Sensor maps

Posted: 09 Dec 2015, 05:09
by Forboding Angel
Fwiw evo uses it very extensively and so did EE.

Re: Sensor maps

Posted: 12 Dec 2015, 21:56
by lamer
Added airLos, sonar, seismic, sonarJammer maps (locally so far).
And before pushing PR i also found

Code: Select all

int LuaSyncedRead::IsPosInLos(lua_State* L);
int LuaSyncedRead::IsPosInRadar(lua_State* L);
int LuaSyncedRead::IsPosInAirLos(lua_State* L);
// IsPosInJammer
Those probably would be also useful, because they have proper way to test if position is in los or radar (it accounts for sonar and everything).
And new for 101 spring (why not add them too?)

Code: Select all

int LuaSyncedRead::IsUnitInLos(lua_State* L);
int LuaSyncedRead::IsUnitInAirLos(lua_State* L);
int LuaSyncedRead::IsUnitInRadar(lua_State* L);
int LuaSyncedRead::IsUnitInJammer(lua_State* L);

Re: Sensor maps

Posted: 16 Dec 2015, 12:40
by lamer
Need help!
Will it be cheating to use

Code: Select all

int LuaSyncedRead::IsUnitInLos(lua_State* L);
int LuaSyncedRead::IsUnitInAirLos(lua_State* L);
int LuaSyncedRead::IsUnitInRadar(lua_State* L);
int LuaSyncedRead::IsUnitInJammer(lua_State* L);
for native AI? Seems they test exact position of unit (without wobble).

EDIT: On second thought IsUnitIn<sensor> probably useless for native AI: EVENT_ENEMY_ENTER_LOS, EVENT_ENEMY_LEAVE_LOS, EVENT_ENEMY_ENTER_RADAR, EVENT_ENEMY_LEAVE_RADAR can/should take care about status of unit.

Re: Sensor maps

Posted: 16 Dec 2015, 13:53
by lamer
Logic in IsPosInRadar is not for native AI either (checks for jammers?). Ended up with additional sensor maps only.
PR