Hasty Briefsbeta

Bilingual

Celeste and TowerFall Physics

4 months ago
  • #physics-engine
  • #game-development
  • #platformer
  • Physics in TowerFall and Celeste are handled by two classes: Solids (collidable level geometry) and Actors (physics objects like players, arrows, etc.).
  • All colliders are axis-aligned bounding boxes (AABBs) with integer positions, widths, and heights.
  • Actors use MoveX and MoveY functions with collision delegates to handle movement and interactions without overlapping Solids.
  • Solids have a Move function that ensures they move regardless of other geometry, handling interactions with Actors via carrying or pushing.
  • Pushing takes priority over carrying; pushed Actors are moved to avoid overlaps, while carried Actors move with the Solid.
  • The Squish callback destroys Actors when they are squeezed between Solids, though games can override this behavior.
  • The system avoids overlaps by resolving interactions pixel by pixel, ensuring smooth and predictable physics.