Skip to content
Isadora edited this page Jun 26, 2023 · 9 revisions

Murder logo

Welcome to Bang! This is an Entity Component System (or just ECS), a library to support whatever engine you're currently working on. You may notice that, as of today, this lets you break a lot of rules of ECS.

As I was making my engine and game with it, I realized that it's not because you're doing ECS that you have to 100% follow all the rules with it. The whole point is breaking the rules when needed, but keeping a data-driven approach throughout the game.

📝 What do I get from this?

  • Modular architecture
  • Refactoring is cheap
  • "Quarantine" bad parts of your code
  • Performance (depending of your needs and architecture)
  • Clear top view of your systems

🧠 So how do I use this library?

Basically, when you want to get performance: use ECS as much as you can. This may get bureaucratic and tricky. When you want to be creative: use state machines and custom draw components! This is where we break the "ECS" pattern, but it clearly works very well when you want to iterate fast.

What I end up doing, most of the time, is starting with a state machine and then moving on to a system in ECS. As I get more used to it, I started to realize that ECS is actually even easier to reason with.

As of today, this library let's you break a lot of rules that "classic" ECS would just yell at you. The whole point of this library is letting you experiment things in a lot of different ways, whatever you're most comfortable with. Do you like doing everything event based? We got you. Do you like doing everything super performative and clean? We got you. You just want state machines and forget that ECS was there? That's fine by me.