Yet another n-body simulation (Bevy, egui, webassembly)

60 points mosquit0

Over the weekend I played around with Bevy. It is the first time when I used a game framework for anything. I read a lot about ECS and I found it a very interesting concept - even outside gaming.

The result of this is yet another n-body simulator. Demo: https://pjankiewicz.github.io/nbody/. Code: https://github.com/pjankiewicz/nbody.

I'm amazed by Bevy. It feels so well organized and clean. Adding keyboard/mouse controls was just a matter of finding the right plugin. Egui looks and works very well too - it is not a complicated interface - just a bunch of buttons and sliders, but still it was quite smooth sailing.