Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Haxe Game Development
  3. echo

echo

MITHaxe4.2.9

A simple 2D physics library for Haxe with a focus on easy integration into any game engine or framework.

Visit WebsiteGitHubGitHub
153 stars27 forks0 contributors

What is echo?

Echo is a 2D physics library written in Haxe that provides robust collision detection and physics simulation with a straightforward API. It is designed for easy integration into various Haxe-based engines and frameworks like Heaps, OpenFL, and Kha, requiring only an update loop to function. The library solves the problem of adding performant and flexible physics to Haxe projects without being tightly coupled to a specific engine.

Target Audience

Haxe developers building 2D games or simulations who need a physics engine that works across multiple Haxe frameworks like Heaps, OpenFL, Kha, HaxeFlixel, and HaxePunk. It is also suitable for developers who prioritize a simple API and easy integration into existing codebases.

Value Proposition

Developers choose Echo for its engine-agnostic design, allowing seamless use with various Haxe math libraries and game engines via compiler flags. Its straightforward API, built-in features like physics state history with undo/redo, and extensible debug drawing provide a balance of performance, flexibility, and ease of use compared to more rigid alternatives.

Overview

Simple Physics Library written in Haxe

Use Cases

Best For

  • Adding 2D physics to Haxe games using engines like Heaps, OpenFL, or Kha without engine-specific dependencies
  • Implementing collision detection with accurate SAT-powered algorithms for shapes like rectangles, circles, and convex polygons
  • Creating physics simulations that require undo/redo functionality for state management
  • Optimizing performance in dense 2D scenes using a quadtree for broadphase collision querying
  • Developing custom integrations where physics bodies need to sync with external objects via on_move and on_rotate callbacks
  • Building projects that benefit from extendable debug drawing for visualizing physics bodies and collisions

Not Ideal For

  • Projects requiring 3D physics simulation or advanced 3D collisions
  • Teams needing immediate support for concave polygons or physics constraints (both are on the 'Later' roadmap)
  • Developers working outside the Haxe ecosystem or with game engines not supported via compiler flags
  • Applications where minimizing file size is critical and the performance trade-off from reducing inlined functions is unacceptable

Pros & Cons

Pros

Engine-Agnostic Flexibility

Integrates seamlessly with multiple Haxe frameworks like Heaps, OpenFL, and Kha via compiler flags, avoiding tight coupling and allowing reuse across projects.

Accurate Collision Detection

Uses Separating Axis Theorem (SAT) for reliable collision detection between rectangles, circles, and convex polygons, ensuring precise physics interactions.

Built-in State History

Features physics state management with undo/redo functionality, a rare inclusion that simplifies debugging and state reverts in simulations.

Performance Optimization

Implements a quadtree for broadphase collision querying, optimizing performance in dense scenes by reducing unnecessary checks.

Easy Code Integration

Provides on_move and on_rotate callbacks and a build macro for adding custom fields to bodies, streamlining synchronization with game entities without boilerplate.

Cons

Limited Shape Support

Only supports convex polygons currently, with concave polygons deferred to the roadmap, restricting collision scenarios for complex shapes.

Haxe-Exclusive Dependency

Tied exclusively to the Haxe ecosystem, making it unsuitable for projects using other languages or engines without Haxe bindings, reducing cross-platform appeal.

Configuration Overhead

Requires specific compiler flags and setup for different math libraries (e.g., hxmath, vector-math), which can be cumbersome and error-prone for newcomers.

Performance-Size Trade-off

The compiler flag to reduce inlined functions sacrifices performance for smaller file size, forcing a compromise that may not suit all use cases.

Frequently Asked Questions

Quick Stats

Stars153
Forks27
Contributors0
Open Issues8
Last commit2 months ago
CreatedSince 2018

Tags

#quadtree#haxe#physics#gamedev#collision-detection#heaps#openfl#game-development#haxelib#2d-physics#physics-engine#game-physics

Built With

H
Haxe

Links & Resources

Website

Included in

Haxe Game Development413
Auto-fetched 19 hours ago

Related Projects

haxebullethaxebullet

Bullet 3D Physics for Haxe

Stars96
Forks21
Last commit3 years ago
nape-haxe4nape-haxe4

Haxe Physics Engine (Haxe 4 compatible fork)

Stars52
Forks7
Last commit6 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub