Sensor maps

Sensor maps

Here is where ideas can be collected for the skirmish AI in development

Moderators: hoijui, Moderators

Post Reply
lamer
Posts: 153
Joined: 08 Mar 2014, 23:13

Sensor maps

Post 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?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Sensor maps

Post 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
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Sensor maps

Post by Forboding Angel »

Fwiw evo uses it very extensively and so did EE.
lamer
Posts: 153
Joined: 08 Mar 2014, 23:13

Re: Sensor maps

Post 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);
lamer
Posts: 153
Joined: 08 Mar 2014, 23:13

Re: Sensor maps

Post 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.
lamer
Posts: 153
Joined: 08 Mar 2014, 23:13

Re: Sensor maps

Post by lamer »

Logic in IsPosInRadar is not for native AI either (checks for jammers?). Ended up with additional sensor maps only.
PR
Post Reply

Return to “AI”