API Reference ExCollision v#1.1.0
View SourceModules
Library for server-side collisions, physics world simulation, tilemap pathfinding, and Tiled TMX parsing.
Axis-Aligned Bounding Box. Used for collisions and bodies in the world.
Implements ExCollision.Protocols.Collidable protocol.
Two-dimensional vector. Implements Inspect and String.Chars protocols.
A* pathfinding over tilemap.
Uses ExCollision.Protocols.TileSource for walkability.
Coordinates are tile indices (column, row) or {x, y} in tiles.
Protocol for objects participating in collision checks. Requires returning AABB for intersection.
Protocol for tile grid sources (TMX layer, world tilemap). Provides tile GID by coordinates and walkability checks.
Base TMX layer type (tile layer or object group).
Implements ExCollision.Protocols.TMXLayer for uniform access.
Tiled TMX map structure.
Static object on TMX map (rectangle, polygon, polyline). Used for collisions and markup from objectgroup.
TMX object layer (rectangles, polygons, etc.).
Parser for Tiled TMX files (XML).
Supports tile layers (CSV/base64), objectgroup, tilesets, and <properties> on map, tileset, layer, objectgroup, and object.
TMX tile layer (tile grid with data).
TileLayer delegate/wrapper for TileSource protocol.
Allows using TMX layer for pathfinding and walkability checks.
Options: :solid_gids — list of GIDs treated as walls (default: any non-zero is wall).
TMX tileset.
Builds collision world from TMX map: adds static AABBs from tile layer
and objectgroup. Provides unified interface via Collidable protocol for objects.
Collision world: static and dynamic bodies (AABB).
Supports collision checks and simulation (step with collision resolution).
Implements Enumerable over bodies.
Dynamic body in the collision world (AABB + metadata).
Implements the Collidable protocol.