Skip to content

Terrain areas with movement effects (e.g. swamp zones) #306

@saebyn

Description

@saebyn

Overview

Add terrain zones to scenarios that affect the movement speed of entities passing through them. Examples include swampy areas that slow both zombies and survivors, rubble that impedes movement, or roads that provide a speed boost.

Design

  • A new Component_TerrainEffect (or Component_MovementZone) using an Area3D to detect entities entering/leaving the zone
  • Applies a configurable speed multiplier to movement_speed on affected entities
  • Works with both enemies (base movement_speed on enemy.gd) and survivors (panic_move_speed on Component_PanicBehavior)
  • Zones are static parts of a scenario (not player-placeable, at least initially)
  • Multiple effect types possible: slow (swamp/mud), speed boost (road), etc. — the existing Component_PassiveDamage is a precedent for area-based effects

Visual Feedback

  • Ground decal, particle effect, or material overlay to clearly communicate the zone to the player
  • Consider minimap representation

Technical Notes

  • Terrain zones do not need to be navigation obstacles — purely Area3D-based triggers
  • The Component_Sprint already modifies movement_speed directly; the terrain effect should stack/interact cleanly (e.g., save and restore base speed, or use a multiplier stack)
  • Needs to handle entities that are already inside the zone when the scene loads

Future Possibilities

  • Damage-over-time zones (fire, acid) — could integrate with Component_PassiveDamage
  • Player-placeable terrain modifier obstacles
  • Zone types defined as config resources (Resource_TerrainZone) for data-driven design

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions