Sensor maps

Sensor maps

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

Moderators: hoijui, Moderators

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

Sensor maps

Post by lamer » 09 Dec 2015, 00:23

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?
0 x

User avatar
AF
AI Developer
Posts: 20669
Joined: 14 Sep 2004, 11:32

Re: Sensor maps

Post by AF » 09 Dec 2015, 04:08

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
0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14599
Joined: 17 Nov 2005, 02:43

Re: Sensor maps

Post by Forboding Angel » 09 Dec 2015, 05:09

Fwiw evo uses it very extensively and so did EE.
0 x

lamer
Posts: 146
Joined: 08 Mar 2014, 23:13

Re: Sensor maps

Post by lamer » 12 Dec 2015, 21:56

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);
0 x

lamer
Posts: 146
Joined: 08 Mar 2014, 23:13

Re: Sensor maps

Post by lamer » 16 Dec 2015, 12:40

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.
0 x

lamer
Posts: 146
Joined: 08 Mar 2014, 23:13

Re: Sensor maps

Post by lamer » 16 Dec 2015, 13:53

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

Post Reply

Return to “AI”