Skip to content

Layer-based collision #472

@cxong

Description

@cxong

Instead of the somewhat-specific mask-based collision currently used (see https://github.com/cxong/cdogs-sdl/blob/master/src/cdogs/tile.h#L93-L94), refactor the collision system to use collision layers. The code becomes less coupled and allows us to do bullet-bullet collisions; one suggestion was to have mines shootable, another idea is to have gas clouds repel each other.

  • Introduce layers for: map objects, bullets, actors; actors on different teams go on different layers
  • Refactor actor/ally collision system to use layers
  • Move collision code from object/bullet/actor files into collision module

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions