Search Unity

Generating threat and movement map

Discussion in 'Editor & General Support' started by Niizuki, Jan 27, 2020.

  1. Niizuki

    Niizuki

    Joined:
    Feb 17, 2016
    Posts:
    2
    Hello,

    i am trying to create an AI for a strategy, which input will be a generated "map". This map will contain all the information necessary to make a decision, but to make things easy, i wanted to generate this map using specialized sub-maps. These sub-maps could be for example:
    • if the terrain is walkable (basically a simple nav mesh).
    • if there is danger present on map (which should be generated based on position of enemies in scene)
    • if there are friendly units, to which the unit is trying to stick close by
    • if there is a objective a unit is trying to get to (path player move order for example, possibly way point generated by path finding. This type of map can be specific for a single unit for example, but to keep things compatible i want to use the same approach here also)
    • etc, possibly many more as needed
    Some of those maps will be static, some of them are supposed to be dynamically generated every update.
    By using all relevant maps for a unit, evaluation of surrounding will be created, and used for movement / planning.
    Then, when a unit will be trying to move around the map, it will move (steer) based on this map, and will move in direction of best value.

    I wish to proceed in this way because i want to
    a] separate AI in distinct chunks so it is more manageable, and every AI chunk only solves single issue,
    b] the result of those AI will be available for all units, so the "thinking" will be done the least amount of times needed​

    I tried google this topic, but nothing came up (to be exact, a lot non related things came up, but none were very useful).
    Can anyone help, or point me in the right direction please?

    Thank you

    PS: this is not supposed to be a flow field attempt
     
  2. frosted

    frosted

    Joined:
    Jan 17, 2014
    Posts:
    4,044