flecs
bevy
flecs | bevy | |
---|---|---|
50 | 594 | |
6,936 | 38,976 | |
2.6% | 2.3% | |
9.7 | 10.0 | |
3 days ago | 5 days ago | |
C | Rust | |
GNU General Public License v3.0 or later | MIT OR Apache-2.0 |
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.
flecs
- Flecs – A fast entity component system (ECS) for C and C++
- Flecs is a fast and lightweight Entity Component System that lets you build game
-
ECS, Finally
I've also been enjoying building My First Game™ in Bevy using ECS. The community around Bevy really shines, but Flecs (https://github.com/SanderMertens/flecs) is arguably a more mature, open-source ECS implementation. You don't get to write in Rust, though, which makes it less cool in my book :)
I'm not very proud of the code I've written because I've found writing a game to be much more confusing than building websites + backends, but, as the author notes, it certainly feels more elegant than OOP or globals given the context.
I'm building for WASM and Bevy's parallelism isn't supported in that context (yet? https://github.com/bevyengine/bevy/issues/4078), so the performance wins are just so-so. Sharing a thread with UI rendering suuucks.
If anyone wants to browse some code or ask questions, feel free! https://github.com/MeoMix/symbiants
-
Databases are the endgame for data-oriented design
Flecs does just that: https://ajmmertens.medium.com/why-it-is-time-to-start-thinking-of-games-as-databases-e7971da33ac3
-
What's your way to create an ECS?
I'm trying to optimize my workflow as much as possible, and came across this thing called an ECS. After doing a little bit more digging I found some decent guides on how you would make one, I also found one premade called FLECS. FLECS is nice and all, but I was looking for something more simple that just has the bare bones of what I need and is also configurable. I haven't been able to really find anything like that, so I was wondering if anyone had an example of maybe their way of implementing an ECS. I know how to go about it, but I'm unsure of exactly what the code would look like.
-
Introducing Ecsact
Since we wanted a common game simulation that would be on both the server and the client we looked into a few libraries that would fit our ECS needs. It was decided we were going to write this common part of our game in C++, but rust was considered. C++ was a familiar language for us so naturally EnTT and flecs came up right away. I had used EnTT before, writing some small demo projects, so our choice was made based on familiarity. In order to integrate with Unity we created a small C interface to communicate between our simulation code and Unity’s C#. Here’s close to what it looked like. I removed some parts for brevity sake.
-
Prolog for future AI
Repository: https://github.com/SanderMertens/flecs
-
An in-game query engine heavily inspired by prolog
This is the project: https://github.com/SanderMertens/flecs (query engine implementation lives here: https://github.com/SanderMertens/flecs/tree/master/src/addons/rules)
-
What are the limits of blueprints?
There's also a performance question. While we can now use Blueprint nativization to convert Blueprints to C++ the result will be a fairly naive version, fast enough for most purposes but not if you're trying to push every bit of performance. This is where you're looking at making sure you're hitting things such as using the CPU cache as well as possible for an ECS system (Look at ENTT or Flecs if you want to see what they're about and why you'd want one), or a system needing to process massive amounts of data quickly such as the Voxel Plugin.
-
What's the hot tech stack these days?
If I knew C++ and I'd heard about it before I started my current project, I would have been tempted to use this https://github.com/SanderMertens/flecs which can be built to WASM. Of course you still need JavaScript in the front end to link to the WASM part. I've recently been using esbuild to bundle my front end code, which does a pretty similar job to webpack, but is a bit faster.
bevy
-
Retro Boy: simple Game Boy emulator written in Rust, can be played on the web
> I hear a few problems with the audio emulation, (mostly clicks that shouldn't be there)
Almost anything WASM+Audio seems to do that in browsers today, unless you're really really careful about what you're doing and leverage multiple threads. I think the issue is mostly around single-thread contexts, where it has to switch between playing audio and other things.
I hit the very same issue myself with Bevy not too long time ago, and tracking this issue which has some further links if you wanna go down a rabbit-hole: https://github.com/bevyengine/bevy/issues/4078
- The "No Clear Winner" Era of Federated Microblogging
-
Show HN: Rust Vector and Quaternion Lib
bevy_math also uses glam, re-exported in the prelude: https://github.com/bevyengine/bevy/blob/cc69fdd0c63ea79fda4f...
-
Exploring Rust: A Rubyist's Perspective
Since my project is built with Bevy, understanding its core concepts was very important. Bevy's entity-component-system (ECS) architecture makes game development modular and efficient, allowing for highly decoupled systems.
-
Three-nanite: Unreal Nanite in Three.js
Not a very impressive example yet, it's mainly there for our CI system[1] to ensure that no one accidentally breaks the meshlet feature, but there is an example you can run to get a basic idea of the feature.
You can download Bevy https://github.com/bevyengine/bevy, and run `cargo run --release --examples meshlet --features meshlet`. After it compiles you'll get prompted to download a bunny.meshlet_mesh file. Click the link to download and create and place it in the appropriate folder, and then run the example again.
There's also this video from the Bevy 0.14 release notes demonstrating it, but performance/quality has improved a _lot_ since then: https://bevyengine.org/news/bevy-0-14/many_bunnies.mp4
[1]: https://thebevyflock.github.io/bevy-example-runner
- Zig; what I think after months of using it
-
DeepSeek: X2 Speed for WASM with SIMD
Here, give it a shot - I'm at work so I can't try again right now, but last I did was use claude+context, chatGPT 4o with just chatting, Copilot in Neovim, and Aider w/ claude + uploading all the files as context.
I even went so far as to grab relevant examples from https://github.com/bevyengine/bevy/tree/latest/examples#exam... , adding relevant ones as I saw fit.
It took a long time to get anything that would compile, way longer than just reading + doing, and it was eventually wrong anyway. This is a recurring issue with Rust, and I'd love a workaround since I spend 60+h/week writing it. Probably a skill issue.
https://gist.github.com/jodavaho/8fb042fab33c1aaa95cd67144da...
- Drag and Drop Images into Bevy 0.15 on the web
-
The Color of Noise – The Witness (2014)
I was looking through the source code for Bevy's Screen-Space-Ambient-Occlusion (SSAO) implementation and noticed they are using blue noise as well:
https://github.com/bevyengine/bevy/blob/56d559102858d4ce8a5b...
That link takes you to this shadertoy:
https://www.shadertoy.com/view/3tB3z3
-
Bevy 0.15 released
Ah yeah pipeline compilation is a very non-trivial problem[1]. Unreal is also struggling with this a lot. I hear you that it's an issue.
The Bevy issue you want to follow is https://github.com/bevyengine/bevy/issues/10871.
[1]: https://therealmjp.github.io/posts/shader-permutations-part1 + https://therealmjp.github.io/posts/shader-permutations-part2
What are some alternatives?
entt - Gaming meets modern C++ - a fast and reliable entity component system (ECS) and much more
Amethyst - Data-oriented and data-driven game engine written in Rust
SDL - DEPRECATED: Official development moved to GitHub
piston - A modular game engine written in Rust
Boost - Super-project for modularized Boost
Godot - Godot Engine – Multi-platform 2D and 3D game engine