GitHub Repos intermediate 3 min read May 8, 2026
Public Preview Sign in free for the full digest →

Chipmunk2D: A fast and lightweight 2D game physics library.

“The 2D physics library bundled in Cocos2D — used in hundreds of App Store titles — moved off GitHub in August 2025 over AI training objections; the GitHub repo is now a stale mirror that most new adopters will clone first.”

Chipmunk2D: A fast and lightweight 2D game physics library.
1 Views
0 Likes
0 Bookmarks
Source · github.com

“"I do not want to be a willing participant in this grand LLM experiment." — Scott Lembcke (slembcke), PROJECT_HAS_MOVED.md (github.com/slembcke/Chipmunk2D, verified 2026-05-08)”

You know that feeling when you are building a 2D game and your physics code turns into spaghetti — objects tunneling through walls at high speed, stacks of crates exploding on frame two, collision callbacks firing after you have already freed the body? Writing a stable impulse solver from scratch in C means either reverse-engineering Erin Catto's 2006 contact persistence paper or watching your simulation blow up at runtime in edge cases. Chipmunk2D gives you a battle-tested discrete-step solver with no build dependencies — no CMake dependency chain, no vendored SDL, just include and link.

2d-physicsgame-developmentcopen-sourcerigid-bodygame-enginemobile

Think of Chipmunk as a simulation loop that runs between your game frames. You create a space — the physics world — add bodies with mass and velocity, and attach shapes to them as hitboxes: circles, polygons, or line segments. Each frame you call cpSpaceStep(), and the library runs broad-phase collision detection using an axis-aligned bounding box tree to quickly discard object pairs that cannot possibly touch, then resolves remaining collisions with an iterative impulse solver. The key insight: Chipmunk reuses collision contacts from the previous frame rather than recalculating them from scratch each tick. That warm-starting trick is why a tower of 20 boxes stays stable with 10 solver passes instead of 100.

01
Zero external dependencies — link against the standard C library only, so adding Chipmunk is a one-line CMake change with no transitive dependency tracking or version conflicts to manage
02
Circle, convex polygon, and beveled line segment collision primitives with multiple shapes per rigid body — covers the hitbox needs of most 2D games without custom geometry code
03
Object sleeping — idle bodies drop out of the simulation loop entirely, so 1,000 stationary objects cost nearly nothing per frame and you get free performance headroom
04
cpHastySpace ARM NEON multithreaded solver — a drop-in replacement for cpSpace that activates SIMD vectorization on iOS and Android automatically with no code changes on your end
05
Autogeometry — traces pixel-art sprite outlines into polygonal collision shapes, removing the manual hitbox authoring step for pixel-style game art
06
Raycasting and shape overlap queries — lets you ask which objects a bullet passes through without running a full physics step, so you get instant hit detection without simulation overhead
07
Customizable collision callbacks with post-step deferred mutation — you control exactly what happens when two shapes touch and queue body modifications safely after the solver finishes
Who it’s for

If you are writing a 2D game in C, C++, Python via Pymunk, Go via jakecoffman/cp, or Objective-C and need physics without pulling in a full engine, Chipmunk2D fits your stack — especially on iOS and Android where cpHastySpace gives you free NEON acceleration. This is not the right pick if your game has fast projectiles through thin walls (no continuous collision detection means objects can tunnel) or if you need Box2D's data-oriented solver for thousands of simultaneously active rigid bodies.

Worth exploring

Yes, for most 2D game projects. Chipmunk has shipped in hundreds of commercial titles since its initial release, is MIT licensed with zero dependencies, and the API is stable — those are durable qualities for a library you integrate once and maintain infrequently. The flags to weigh: the last major version (7.0.3) was June 7, 2019 so feature development has stopped, and the Codeberg migration means the GitHub repo is no longer upstream. For any new project, evaluate Box2D v3 (actively developed, v3.1.1 released June 2025) alongside Chipmunk — Box2D now adds continuous collision detection and a data-oriented solver that Chipmunk never built.

Developer playbook
Tech stack, code snippet, sentiment, alternatives.
PM playbook
Adoption angles, user fit, positioning.
CEO playbook
Traction signals, ROI, build vs buy.
Deep-dive insight
Full long-form analysis, no fluff.
Easy mode
Core idea, fast — when you need the gist.
Pro mode
Technical nuance, edge cases, tradeoffs.
Read the full digest
Go beyond the preview

Deep-dive insight, Easy and Pro modes, plus action playbooks — the full breakdown is one tap away.

Underrated tools. Unfiltered takes.

Read the full digest in the Snaplyze app for deep-dive insight, Easy and Pro modes, and the playbooks you can actually use.

Install Snaplyze →