Box2D VS tigerbeetle

Compare Box2D vs tigerbeetle and see what are their differences.

Box2D

Box2D is a 2D physics engine for games (by erincatto)

tigerbeetle

A distributed financial accounting database designed for mission critical safety and performance. [Moved to: https://github.com/tigerbeetledb/tigerbeetle] (by coilhq)
Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
Box2D tigerbeetle
35 37
7,263 1,012
- -
0.0 9.5
about 1 month ago over 1 year ago
C++ Zig
MIT License Apache License 2.0
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

Box2D

Posts with mentions or reviews of Box2D. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-04-17.
  • Blaze: A High Performance C++ Math library
    7 projects | news.ycombinator.com | 17 Apr 2024
    For typical game physics engines... not that much. Math libraries like Eigen or Blaze use lots of template metaprogramming techniques under the hood that can help when you're doing large batched matrix multiplications (since it can remove temporary allocations at compile-time and can also fuse operations efficiently, as well as applying various SIMD optimizations), but it doesn't really help when you need lots of small operations (with mat3 / mat4 / vec3 / quat / etc.). Typical game physics engines tend to use iterative algorithms for their solvers (Gauss-Seidel, PBD, etc...) instead of batched "matrix"-oriented ones, so you'll get less benefits out of Eigen / Blaze compared to what you typically see in deep learning / scientific computing workloads.

    The codebases I've seen in many game physics engines seem to all roll their own math libraries for these stuff, or even just use SIMD (SSE / AVX) intrinsics directly. Examples: PhysX (https://github.com/NVIDIA-Omniverse/PhysX), Box2D (https://github.com/erincatto/box2d), Bullet (https://github.com/bulletphysics/bullet3)...

  • Jolt Physics raylib: trying 3D C++ Game Physics Engine
    1 project | dev.to | 10 Apr 2024
    Box2D: 2D engine used in Unity and also earlier versions of Godot. Open source.
  • Rust Game Physics Engines: PhysX, Rapier, XPBD & Others
    10 projects | dev.to | 3 Apr 2024
    Box2D GitHub repo: erincatto/box2d
  • Nebula is an open-source and free-to-use modern C++ game engine
    6 projects | news.ycombinator.com | 9 Jan 2024
  • Linear code is more readable
    3 projects | news.ycombinator.com | 14 Sep 2023
    Why is 600 lines too long? How are you able to make that judgment call without first knowing what the algorithm is even doing? People setting arbitrary limits like this is what leads to convoluted spaghetti, instead of just taking things on a case by case basis. Here’s a function from the Box2D code running a particularly complex algorithm for solving contact velocities https://github.com/erincatto/box2d/blob/411acc32eb6d4f2e96fc... .

    It’s 310 lines long. It reads very well, and it looks very maintainable. It has very clear comments explaining the reasoning behind the harder parts of the code. Would you reject this code because it’s pretty long? I wouldn’t.

    There is no such thing as too long or too short. There’s overengineered and there’s underengineered and there’s a sweet spot in the middle that has the perfect amount of engineering with the least amount of complexity (preferably no additional complexity than the original problem warranted). Sometimes, the problem at hand is inherently a large algorithm and requires many lines of code. Don’t split it up! It just makes it harder for future maintainers who now have to figure out if the additional functions are actually being used elsewhere or if they’re just there to make the code “pretty”.

  • How would you implement a simple collision system?
    1 project | /r/cpp_questions | 17 Jul 2023
    There is always the approach of looking at how an existing engine is implemented, such as box2d: https://github.com/erincatto/box2d
  • C++23: The Next C++ Standard
    8 projects | news.ycombinator.com | 11 Jul 2023
    TIL Box2D must not be serious code because it doesn't use copious amounts of explicit temporaries[0].

    And just for the record, I'm very glad Erin Catto decided to use operator overloading in his code. It made it much easier for me to read and understand what the code was doing as opposed to it being overly verbose and noisy.

    [0]: https://github.com/erincatto/box2d/blob/main/src/collision/b...

  • Make a game engine in C++
    4 projects | /r/learnprogramming | 10 Jul 2023
    For Physics Box2d can be used as a simple starting point.
  • Does anyone know any good open source project to optimize?
    8 projects | /r/cpp | 7 Jun 2023
    I suspect most C++ physics libraries like Box2D (https://github.com/erincatto/box2d) or Bullet3 (https://github.com/bulletphysics/bullet3) could really benefit a lot from SIMD.
  • what to start learning
    5 projects | /r/GraphicsProgramming | 28 Apr 2023
    for 2D physics have a look at Box2D it's amazing https://box2d.org/

tigerbeetle

Posts with mentions or reviews of tigerbeetle. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-08-10.
  • SQLite Helps You Do Acid
    3 projects | news.ycombinator.com | 10 Aug 2022
    Indeed!

    I was so glad to see you cite not only the Rebello paper but also Protocol-Aware Recovery for Consensus-Based Storage. When I read your first comment, I was about to reply to mention PAR, and then saw you had saved me the trouble!

    UW-Madison are truly the vanguard where consensus hits the disk.

    We implemented Protocol-Aware Recovery for TigerBeetle [1], and I did a talk recently at the Recurse Center diving into PAR, talking about the intersection of global consensus protocol and local storage engine. It's called Let's Remix Distributed Database Design! [2] and owes the big ideas to UW-Madison.

    [1] https://github.com/coilhq/tigerbeetle

    [2] https://www.youtube.com/watch?v=rNmZZLant9o

  • 20 years of payment processing problems
    3 projects | news.ycombinator.com | 18 Jul 2022
    > It sounds like payments might be part of the larger concept of declarative programming (DP)

    Yes, exactly! The idea with TigerBeetle's state machine [1] is to expose double-entry accounting as higher level financial primitives, so that developers can think in terms of declaring transfers from one account to another. The business logic behind the scenes is detailed, but the interfaces and data structures are simple.

    [1] https://github.com/coilhq/tigerbeetle/blob/main/src/state_ma...

    > Maybe TigerBeetle could be generalized to support any multi-step distributed process?

    That's part of the plan, that the distributed database framework of TigerBeetle can be used as a ”distributed Iron Man suit” to support any kind of state machine.

  • How Safe Is Zig?
    8 projects | news.ycombinator.com | 23 Jun 2022
    It's a pleasure. Let me know if you have any more questions about TigerBeetle. Our design doc is also here: https://github.com/coilhq/tigerbeetle/blob/main/docs/DESIGN....
  • TigerStyle – TigerBeetle's coding style guide
    1 project | news.ycombinator.com | 2 Jun 2022
  • Distributed Systems Shibboleths
    3 projects | news.ycombinator.com | 2 May 2022
    Surprisingly, some of the most powerful distributed systems algorithms or tools are actually deterministic. They're powerful because they can "load the dice" and so make the distributed system more intuitive for humans to reason about, more resilient to real world network faults, and do all this with more performance.

    For example, Barbara Liskov and James Cowling's deterministic view change [1], which isn't plagued by the latency issues of RAFT's randomized dueling leader problem. Viewstamped Replication Revisited's deterministic view change can react to a failed primary much quicker than RAFT (heartbeat timeouts don't require randomized "padding" as they do in RAFT), commence the leader election, and also ensure that the leader election succeeds without a split vote.

    Determinism makes all that possible.

    Deterministic testing [2][3] is also your best friend when it comes to testing distributed systems.

    [1] I did a talk on VSR, including the benefits of the view change — https://www.youtube.com/watch?v=Wii1LX_ltIs

    [2] FoundationDB are pioneers of deterministic testing — https://www.youtube.com/watch?v=OJb8A6h9jQQ

    [3] TigerBeetle's deterministic simulation tests — https://github.com/coilhq/tigerbeetle#simulation-tests

  • Lies we tell ourselves to keep using Golang
    8 projects | /r/fasterthanlime | 29 Apr 2022
    This is the chasm problem, where people don't use a technology because people aren't using that technology, thus the technology has difficulty gaining adoption. I did see that Zig does have it's own killer app and startup that's using Zig: TigerBeattle.
  • Ask HN: Codebases with great, easy to read code?
    35 projects | news.ycombinator.com | 21 Mar 2022
    Control flow statements should always be on their own lines, then it's easy to find all of them by visually scanning top-down, without needing to look all the way down each line.

    [1]: https://github.com/coilhq/tigerbeetle/blob/main/src/vsr/repl...

  • Database functions to wrap logic and SQL queries
    1 project | news.ycombinator.com | 28 Feb 2022
    > In hindsight, data logic should be in the database itself.

    This is the reason we are creating TigerBeetle [1] at Coil, as an open source distributed financial accounting database, with the double entry logic and financial invariants enforced through financial primitives within the database itself.

    This is all the more critical for financial data, because raw data consistency is not enough for financial transactions, you also need financial consistency, not to mention immutability.

    The performance of doing it this way is also easier. For example, around a million financial transactions per second on commodity hardware, with p100 latency around 10-20ms.

    [1] https://github.com/coilhq/tigerbeetle

  • Building Payment systems for the World at Hackathons
    2 projects | dev.to | 7 Feb 2022
    You probably already know this — because we’ve mentioned it a few times — but Coil champions and supports open-source projects and is privacy-first, by default. Over the years, Developer Relations at Coil has championed and sponsored teams that write Open Web Documentations and projects that empower open-source developers to get paid. Coil has also incubated many open-source projects like Tigerbeetle and Rafiki.
  • Durability and Redo Logging
    1 project | news.ycombinator.com | 26 Jan 2022
    [6] Partial logical sector reads/writes even when using O_DIRECT — https://github.com/coilhq/tigerbeetle/blob/main/src/storage....

What are some alternatives?

When comparing Box2D and tigerbeetle you can also consider the following projects:

Bullet - Bullet Physics SDK: real-time collision detection and multi-physics simulation for VR, games, visual effects, robotics, machine learning etc.

zig - General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.

Chipmunk - A fast and lightweight 2D game physics library.

raft - Golang implementation of the Raft consensus protocol

raylib - A simple and easy-to-use library to enjoy videogames programming

Co-dfns - High-performance, Reliable, and Parallel APL

LiquidFun - 2D physics engine for games

raft-grpc-example - Example code for how to get hashicorp/raft running with gRPC

PhysX - NVIDIA PhysX SDK

viewstamped-replication-made-famous - A $20k consensus challenge based on TigerBeetle's implementation of the pioneering Viewstamped Replication protocol. [Moved to: https://github.com/tigerbeetledb/viewstamped-replication-made-famous]

box2d-lite - A small 2D physics engine

LevelDB - LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values.