Erin Catto's Avatar

Erin Catto

@erincatto.bsky.social

I created Box2D. I enjoy all kinds of programming, but specialize in physics and animation. I work in Unreal for my day job (like everyone else). C/C++ and whatever Claude spits out for me. https://box2d.org/

680 Followers  |  195 Following  |  40 Posts  |  Joined: 24.09.2024
Posts Following

Posts by Erin Catto (@erincatto.bsky.social)

Unreal has simple and complex collision. But sometimes a piece of collision is both. I'm now calling this "simplex" collision.

29.01.2026 22:00 — 👍 9    🔁 1    💬 1    📌 0

Nice post!

I'm tempted to try Claude Code. One use of LLMs that seems appealing is using it for studying unfamiliar code. Then it really is not writing any code. I'm not sure if Claude Code would be beneficial for this.

10.01.2026 07:32 — 👍 1    🔁 1    💬 2    📌 0
Post image

They removed programming from the GDC. I thought games are software.

18.12.2025 19:22 — 👍 37    🔁 2    💬 3    📌 1

You can have AI walking, running, sitting, climbing, etc. They can do anything out of view.

15.10.2025 03:41 — 👍 1    🔁 0    💬 1    📌 0

Pre-rolling is good for character screens in the UI. For in game cloth this could lead to frame spikes, so my favorite solution is to simulate cloth at a lower rate off-screen.

14.10.2025 22:24 — 👍 3    🔁 0    💬 1    📌 0
Video thumbnail

When your graphics programmer tells you to stop simulating off-screen cloth, show them this video.

13.10.2025 21:19 — 👍 39    🔁 8    💬 3    📌 0

We use this in our CI. We have some tests that run our game and test various game play systems. Catches a lot of bugs before code gets merged.

11.10.2025 01:08 — 👍 1    🔁 0    💬 1    📌 0

Very cool! Have you considered using voxels? Lots of procedural generation options with those.

05.10.2025 19:48 — 👍 2    🔁 0    💬 1    📌 0
Video thumbnail

I'm an #IndieDev building a custom engine for my medieval fantasy survival game.

Some things I've done so far:
Simulation with client / server networking
Basic DX12 renderer
Asset pipeline
Character movement and animation
#ProcGen world creation
Basic UI
Basic Audio
Basic Health / Combat

05.10.2025 00:07 — 👍 290    🔁 13    💬 14    📌 2

Box2D version 3 has a new API written in C to make it easier to wrap. For the revision I also decided to write the internals in C to see if I liked it. It worked out well.

02.10.2025 04:03 — 👍 1    🔁 0    💬 0    📌 0

A couple barriers to C development are lack of a fast sorting library and a fast hash set and map. I've found these two libraries to be excellent at providing those. They are macro based, but I think the trade-off is worth it. Both work with C99.
github.com/svpv/qsort
github.com/JacksonAllan...

01.10.2025 16:24 — 👍 20    🔁 2    💬 3    📌 0
Post image

Pinched wrists on ragdolls are caused by twist bone poses living in the animation data. Twist bones are procedural and computed based on the pose of animated bones, so they should computed as a post process at runtime to fix this. See www.youtube.com/watch?v=Jkv0... by @bobbyanguelov.bsky.social

17.09.2025 17:03 — 👍 5    🔁 1    💬 0    📌 0

Silksong is using Unity? So using Box2D?

04.09.2025 17:21 — 👍 5    🔁 0    💬 0    📌 0
AI Cat Learning to Run
YouTube video by Pezzza's Work AI Cat Learning to Run

I love physics based walking simulations. I'm also pleased the author was successful using Box2D (v3.1?) www.youtube.com/watch?v=aBp-...

30.08.2025 20:29 — 👍 10    🔁 0    💬 0    📌 0

I revoked your ban. Please make sure your discord account is secure.

23.08.2025 17:02 — 👍 1    🔁 0    💬 0    📌 0

I tried this many years ago. I didn't like it. Lots of wasteful code subtracting the origin to make stuff work.
Want:
point = 0.5 * point1 + 0.5 * point2
Have:
point = 0.5 * (point1 - zero) + 0.5 * (point2 - zero) + zero

13.07.2025 05:27 — 👍 8    🔁 0    💬 3    📌 0

Casey presents some optimizations that seem intuitive and they work correctly for determining separation. However, when computing distance and closest points there are some cases which should not be skipped.

11.07.2025 15:09 — 👍 9    🔁 3    💬 0    📌 0
Implementing GJK - 2006
YouTube video by Casey Muratori Implementing GJK - 2006

This video is great for teaching the basics of GJK. However, the approach is flawed for computing distance and only works for determining separation true/false. Unfortunately the author has disabled comments and people keep using this and ending up with broken code. www.youtube.com/watch?v=Qupq...

11.07.2025 15:03 — 👍 20    🔁 8    💬 2    📌 0
Box2D 3.1 Version 3.0 was released about 8 months ago. It was a huge update and it needed some refinement. Version 3.1 addresses most of the bugs and build problems. It also introduces some new features and ref...

Box2D version 3.1 is released!
Blog post: box2d.org/posts/2025/0...
Release notes: github.com/erincatto/bo...
Documentation: box2d.org/documentation/

20.04.2025 16:47 — 👍 23    🔁 5    💬 2    📌 0
Gate Lift Physics with High Mass Ratio
YouTube video by Erin Catto Gate Lift Physics with High Mass Ratio

Better quality here: www.youtube.com/watch?v=aiFu...

06.04.2025 18:07 — 👍 1    🔁 0    💬 0    📌 0
Video thumbnail

Conventional wisdom is that you need a complex and expensive direct solver to handle high mass ratios and long chains.

Box2D has an iterative SoftStep solver that uses sub-stepping and soft constraints to handle high mass ratios and long chains.

06.04.2025 17:46 — 👍 29    🔁 0    💬 2    📌 0

Also recommend this for hot reloading code in VS. It works quit well these days and great for UI work.

add_compile_options("$<$<CONFIG:Debug>:/ZI>")
add_link_options("$<$<CONFIG:Debug>:/INCREMENTAL>")

29.03.2025 23:44 — 👍 1    🔁 0    💬 0    📌 0

tip: if you work with the generated sln you can edit the cmake files in the sln and hit f5/f7 and it will regenerate the solution in place

29.03.2025 23:43 — 👍 2    🔁 0    💬 1    📌 0

I use this to avoid bringing in stuff for samples if someone is just using my library.
`if(PROJECT_IS_TOP_LEVEL)`

29.03.2025 23:39 — 👍 0    🔁 0    💬 0    📌 0

The nice thing about FetchContent is users can pin to a specific version of a library easily using a tag or git commit hash.

28.03.2025 23:29 — 👍 0    🔁 0    💬 1    📌 0
Preview
GitHub - erincatto/box2d-raylib: Shows how to integrate Box2D with raylib Shows how to integrate Box2D with raylib. Contribute to erincatto/box2d-raylib development by creating an account on GitHub.

I recommend cmake these days. I don't like it either but it gets the job done and I can point users at all the cmake info out there. I made an example app with raylib and box2d using FetchContent. github.com/erincatto/bo...

28.03.2025 23:27 — 👍 4    🔁 0    💬 1    📌 0

Nice! Do you have large island threading?

18.02.2025 18:28 — 👍 1    🔁 0    💬 1    📌 0

Tagging @officialgdc.bsky.social

13.02.2025 22:02 — 👍 0    🔁 0    💬 0    📌 0
Preview
Optimizing Continuous Physics in Box2D | 2025 Schedule | Game Developers Conference (GDC) Attend 750 sessions for game designers, programmers, artists, producers, audio, business, and marketing professionals over 5 days at GDC.

I’ll be speaking about Box2D optimizations at the #GDC2025. I’ll be diving into the details of implementing fast continuous physics. This presentation has a new format I’ve developed recently. I’m really excited to share it!
schedule.gdconf.com/session/opti...

13.02.2025 18:12 — 👍 29    🔁 5    💬 2    📌 0
Launch ramp
YouTube video by Erin Catto Launch ramp

Tangent speed is a new Box2D surface property that lets you easily make conveyor belts or launch ramps like this. youtu.be/WUxqUSk79nE

26.01.2025 23:59 — 👍 13    🔁 1    💬 0    📌 0