Skip to content

Physics Overview

Dill Pixel provides two physics plugins to suit different game development needs:

  • Snap Physics: A lightweight, performance-focused 2D physics system ideal for platformers and simple collision-based games
  • Matter Physics: A full-featured physics engine integration using Matter.js, suitable for complex physics simulations

Choosing a Physics Plugin

Snap Physics

Best for:

  • Platformers and endless runners
  • Games requiring basic collision detection
  • Mobile-first games where performance is critical
  • Simple projectile physics

Matter Physics

Best for:

  • Physics-based puzzle games
  • Complex body interactions and constraints
  • Realistic gravity and force simulations
  • Games requiring advanced physics features

Performance Considerations

  • Snap Physics is more performant for simple collision detection and basic physics needs, making it ideal for mobile games
  • Matter Physics provides more realistic physics but comes with additional overhead
  • Both plugins support debug visualization, which should be disabled in production

See the individual plugin documentation for detailed setup and usage instructions: