โ† All examples

godot components

Grid influence map for tactical AI

Stamp influence with distance falloff onto a grid, spread it around walls with decay and momentum, combine maps (friend minus foe) and query the strongest or weakest cell near a point.

What this component contains

  • ATTRIBUTION.md
  • LICENSE
  • README.md
  • baltor_test.gd
  • component.json
  • influence_map.gd
  • inspect_gdscript.py
  • run_tests.gd
  • test_package.py
  • tests/test_influence_map.gd
  • verification/native.json

How it works

Class
BaltorInfluenceMap, extends RefCounted
Methods
get_width() -> int; get_height() -> int; has_cell(cell: Vector2i) -> bool; set_blocked(cell: Vector2i, blocked: bool) -> bool; is_blocked(cell: Vector2i) -> bool; get_value(cell: Vector2i) -> float; set_value(cell: Vector2i, value: float) -> bool; clear() -> void; and 7 more
Placement
res://baltor/godot_components/influence_map/

Recorded checks

godot 4.7.2.stable.official.ed1daf0bf

  • godot_parse_check_only
  • godot_gdscript_tests
  • godot_tests_reject_gutted_component
  • godot_editor_import
  • godot_contract_reflection
  • godot_readme_usage_compiles

Limits to consider

Uniform grid in one layer per map; propagation is O(cells x iterations) in GDScript, so large maps should update over several frames or at a coarse resolution. Diagonal spread is blocked when either adjacent straight cell is a wall. Verified with Godot 4.7.2 headless; written against the Godot 4.3 API.