koboredux icon indicating copy to clipboard operation
koboredux copied to clipboard

New enemy AI engine

Open olofson opened this issue 7 years ago • 0 comments

Implement the behaviors needed for new enemies, similar to those in XKobo, in a modular, parameterized form, that lends itself for configuration via the theme parser or similar. (See #158.)

General guidelines

  • One class only, so we can keep a pool of objects in a simple and efficient manner
  • Cover player, enemies, bullets, explosions etc, to avoid special cases
  • Hardwired states:
    • (Unused)
    • Alive
    • Exploding
  • Arbitrary internal states:
    • Multiple sets of parameters
    • Inheritance; define states as diffs from other states
  • Variables:
    • Position
    • Velocity
    • Health
  • Events:
    • Spawned, enemy seen, flock seen, enemy died, damage, variable changes, etc
    • Events can change state
    • Events can modify variables
  • Parameters/features (some of these are already in cs.[ch]):
    • Collision groups
      • Collision mask
      • Physics behavior
    • "Team" groups
      • Chase/evade behaviors
      • Flock behaviors

olofson avatar Mar 23 '17 12:03 olofson