|
|
|
|
|
by Carbonhell
1423 days ago
|
|
I wrote a thesis for my bachelor's regarding the development of an agent-based simulation framework in Rust where I managed the visualization side. The project takes inspiration from other frameworks such as MASON (in particular for the architecture), NetLogo, Agent.jl and others. I initially developed the visualization subsystem with Amethyst, after my thesis Amethyst was discontinued and, since I was already following Bevy since it went public and it looked like it was gaining a lot of momentum, I refactored our framework to switch to Bevy. Our project is open source: https://github.com/krABMaga/krABMaga . Being my first approach to Rust and my first serious greenfield project, I think there are a lot of parts which can be improved, but I was able to get by with my extremely limited knowledge of both Rust and Bevy and obtain decent results. The things I loved the most of Bevy was the low amount of boilerplate code needed, the WASM+WebGL support which allowed me to easily let guests run simulations from our github.io site (https://krabmaga.github.io/) at near native (sequential) performance and, just like the whole Rust ecosystem, the friendliness of the community. Even though I bothered quite a bit on the Discord server since the documentation wasn't the clearest for me back when I started (Bevy 0.5), both the team members and users always led me a hand. I also think the ECS approach is extremely useful for our usecase, by defining agents as entities with the Agent component, along with a system which acts as an event loop by executing a simulation step and triggering the agents' behaviour rules.
I also noticed the Bevy team might be interested in the simulation field (https://github.com/bevyengine/bevy/discussions/1678), I am sure more projects of this kind would be hugely appreciated! |
|