← Back to context

Comment by a1o

13 hours ago

Have you tried the latest Box2D (it started as the experimental Box2c)? It’s pretty good afaict. It may not be what you want specifically in your 2D game, as often people prefer more arcade-like mechanics than the physics it tries to deliver.

I have been using an in-house/handrolled physics engine for the last few years so not sure if something has changed, but being able to modify the physics engine for arcade or other non-realistic style games was a big let down over time as well. Basically optimizing your game for feel was quite hard with Box2D in general.

For a long time there wasn't deformers in Box2D (not sure if it's in there now), I hacked by own but I was a dumb 17yo and it was a horrid mess back in the day. Maybe AI could do better than the old me, but I gave up pretty quickly after not getting good results.

So basically lack of support for non-rigid bodies and lack of easy customisability made it not age well for someone like me.

But I know people who have had performance issues with it when building large maps/worlds as well so there are other issues.

Again all of these could have been fixed if they paid more attention to it, more dev time, but it was free so I couldn't really ask for more as a broke student.

And best part was you could run it on any hardware, I remember cooking up a small 2d demo on a rpi back in the day. Fun times.

  • ok, so you haven’t tried box2c, there are some posts about it in the blog

    https://box2d.org/posts/2025/04/box2d-3.1/

    It became the current box2d implementation, now after version 3.0, it was entirely rewritten in C, it works differently.

    • I just fired it up, couldn't find anything related to soft body or deformers, neither does there seem to be anything regarding common issues around 2d platformer features character mover is sort of moving in that direction does seem to provide better controls over how I would setup slide/jump and stuff, but still seems like not a great choice for a 2d game that I would like to build.

      The biggest issue with overly generalized 2d physics systems is ideally they should be built as patch works and provide escape hatches as the default, since in most 2d games you don't want real world physics.

      Angry birds and early 2010 games were an exception when real world esque physics was the well interesting thing. Example Angry Birds, and Cut The Rope.

      The above blog even seems to suggest that soft constraints were added recently which is well surprising.

      I just feel like Box2D is very lacking albeit less now.

      Let me give you an example imagine you want box2d to allow applying weird forces to player most of the time, but you also don't want to allow the player to clip through at certain movements and speeds to avoid weird cases where your character hits a wall and loses all momentum because that's how the physics should work, or it forces some rotational momentum which you have disabled...

      Again in a lot of these character controllers you always end up with custom physics setups either way, and this is where I feel like box2d was especially lacking they seem to have worked on it with character mover, but it seems just very late.

      Again I have used a lot of it in the past for making shitty flash style games, and it has been great but I honestly don't think there is a great use for it as it stands today in the projects I like to work on.

      Ofc it's also largely because I find writing my own physics engine to be easier than picking up a library, and I would probably copy some of the code verbatim if needed for collision optimizations and stuff, but Box2D just feels a tad behind the times.

      Again I am not a big time dev, and I am certain since Godot ships Box2D there must be a lot of users of it, but I just don't care enough at this point.