hecs | sandbox | |
---|---|---|
12 | 9 | |
894 | 297 | |
- | - | |
7.2 | 0.0 | |
about 1 month ago | about 1 year ago | |
Rust | Rust | |
Apache License 2.0 | GNU Affero General Public License v3.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.
hecs
-
Does it still make sense to roll your own ECS?
For Rust, I really like Bevy's, but it gets too much in the way. I'd probably use macroquad instead with something like hecs (I tried macroquad with Bevy ECS and didn't go well).
-
Why ECS pattern is popular in Rust?
The question arises from seeing a plethora of projects using ECS: hecs , Bevy , specs, legion
-
Learning How To Rewind Time - Save & Load
My current design has struct Core that is basically "everything you need to save in a savefile", it has a hecs ECS (which needs a bit of boilerplate the hecs docs show you how to write to serialize it), and a bunch of simpler gamestate stuff like the discovered map positions, the current player etc. Everything is tree-like and serializes into a text file. Entity handles from hecs serve as "pseudo-pointers" that can represent cycle-like structures without running into endless cycles.
-
After working on our Godot + Rust game fulltime for one year it is now up on Steam
Out of the other Rust engines we've tried I think Macroquad was the most interesting option, and even though I've only made a few small projects in it worked extremely well and was what I'd expect from a game framework. While working in Bevy I felt like it was "writing fun Rust", but it wasn't really making a game. Macroquad on the other hand got immediately out of the way, and using it together with hecs was a painless experience where the whole time I felt like I was working on "the game" rather than "building systems that are invisible to the player".
-
BITGUN Demo is now live on Steam - a game made in Rust and Godot by a two person fulltime indie dev team over the past 9 months
The last crate worth mentioning is probably hecs for ECS, which we don't really use as heavily as some ECS fans would assume, but it made working around some problems between GDScript and Rust easier by storing things in ECS, passing around handles and querying ECS instead. Initially we did this with a global object and lots of state (which we still use for some things), but as the number of "things" grew it became easier to put it into ECS.
-
A 2D Pixel Physics Simulator with Cellular Automata written in Rust
I use the awesome Vulkano for rendering and computation, and Rapier for simple physics. Contour is used for the initial shapes, but rapier forms the physics colliders from it. Hecs is used as well. And you might recognize Egui as gui :). I gotta say, I'm starting to be pretty happy with the rust ecosystem overall.
-
What is the plain Vec architecture in the hecs documentation?
In the hecs documentation there is a section, Why Not ECS?. In it, the author states, "If your game will have few types of entities, consider a simpler architecture such as storing each type of entity in a separate plain Vec."
-
Showcasing my game: The Process. Built with Rust and Godot!
Usually, what I do is creating large, robust components in Rust. In my game, most of the logic lives inside the Factory node, which inside holds a full ECS (currently using https://github.com/Ralith/hecs) as well as other associated resources. This node takes care of holding the state and simulating all the machines in the factory and their interactions.
-
Tiles as entities for common states and effects? (ECS related)
Generally, spatially-indexable data gets special treatment in games. (See Why not ECS for example, from the hecs ECS library.)
-
I'm trying to follow the RLTK tutorial and feel like it is too much at a time, please help me solve some questions
That impl basically says that Leftwalker is a System (or implements a System interface, to use a different parlance). Why exactly do Systems need lifetime is something better asked of the authors of the ECS library the tutorial uses. (personally I use hecs https://github.com/Ralith/hecs instead because I find it easier to use, no lifetime in sight :p)
sandbox
- Terra Firma, a playable erosion simulation (Free, Works on Proton)
-
A 2D Pixel Physics Simulator with Cellular Automata written in Rust
I've made a similar game: https://github.com/JMS55/sandbox, and it looks like we've had a lot of the same ideas :)
-
Open source projects that need help at beginner/intermediate level
If you're interested in game development, you may enjoy playing around with Sandbox. It's a game I created where you place sand, water, acid, fire, etc and watch them interact.
-
WebGPU computations performance in comparison to WebGL
> WebGPU is years away to become usable
As a counterpoint, I've been using WebGPU (through wgpu-rs) for the past 1.5 years. It's been a pleasure to use. For instance, here's the CPU-side code for a glow post-process shader using 4 render passes https://github.com/JMS55/sandbox/blob/master/src/glow_post_p....
-
The Similarities between an ECS and a rendergraph
I've considered implementing Sandbox using wgpu compute sharers (all the rendering is already done with wgpu). The reason I didn't is because I couldn't figure out how to make particles update in parallel - how to handle conflicts between two particles wanting to move into the same position, updating a particle that's supposed to be destroyed, etc. I'd love to get this working however. My last attempt was a the "multithread" branch where I tried to use rayon as a means of prototyping the game using parallel update logic.
-
Any interest in a Games From Scratch club?
Unrelated to a club, but you might enjoy looking at a game I built with Rust + WebGPU https://github.com/JMS55/sandbox.
-
I tried making a Gnome install with flatpaks apps exclusively
Counterpoint: https://flathub.org/apps/details/com.github.jms55.Sandbox
-
Is there anyone looking for GSOC student for a Rust project ? (or just a contributor for a project ?)
Not a GSOC project, but my game Sandbox is open to contributions! https://github.com/JMS55/sandbox
-
Im moving a big array around too much
Overflowing the stack: Use a Vec, or Box<[T; N]> (boxed array). A boxed array is a heap allocated array, where the box part just points to some data on the heap, so it's cheap to move around. Both are pretty much equivalent, boxed array is maybe slightly more faster/correct. Note that if you use a boxed array, due to some missing compiler optimizations, you'll probably just get a stack overflow anyways, as the compiler will first store the array on the stack, and then copy it to the heap. This can be solved with some unsafe code, such as in https://github.com/JMS55/sandbox/blob/master/src/heap_array.rs.
What are some alternatives?
shipyard - Entity Component System focused on usability and flexibility.
sandspiel - Creative cellular automata browser game
gdnative - Rust bindings for Godot 3
meta - Meta-crates of the RustCrypto project
ecs - LeoECS is a fast Entity Component System (ECS) Framework powered by C# with optional integration to Unity
meshweaver - 3D rendering engine in Rust and WebGPU
ecs - Elastic Common Schema
cargo-auditable - Make production Rust binaries auditable
dungeon-bevy - Rust programming -> random generated Dungeon with Bevy engine
image - Encoding and decoding images in Rust
vulkano - Safe and rich Rust wrapper around the Vulkan API