flags / Reactor-3

Post-apocalyptic action roguelike with a focus on inventory management and gun-based combat.
MIT License
71 stars 11 forks source link

ALife: Situational awareness #54

Closed flags closed 11 years ago

flags commented 11 years ago

The ALife should be able to calculate how much danger they are in at any given time.

A interesting solution would be representing this via dijkstra map, with the ALife calculating each position as follows:

DANGER = BASE_SCORE*(DISTANCE*DISTANCE_MOD)

...where DISTANCE_MOD = (WEAPON_ACCURACY_TO_POSITION/BASE_WEAPON_ACCURACY)

This gets even more complicated when LOS is introduced:

if not can_see(life,target)
    DANGER*=.80

Consider the following:

flags commented 11 years ago

Dijkstra maps are not fast enough.