Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Wow, didn't know you could do that with bevy!


Bevy lets you create a custom render pipeline, so you just have to get the rendered image and send it to ratatui instead of a window. I handled that part in bevy_ratatui_render (https://github.com/cxreiff/bevy_ratatui_render) which just gives you a bevy Camera and a ratatui Widget that draws the latest frame.


I was wondering how did you manage to translate WGPU code into Ratatui code, but I guess there was no WGPU in the first place. Actually, it is kinda cool that you can switch renderers in Bevy, meaning you can take advantage of whatever API you may want.


The cool thing with Bevy is that every built-in feature is in fact a `plugin` and can be disabled or replaced with a custom implementation.

Tiny glade[1], the first commercial success of a Bevy game, use Bevy but with their own renderer (IIRC they also replace other parts of Bevy but I don't remember which).

[1]: https://store.steampowered.com/app/2198150/Tiny_Glade/


There is an interview with the Tiny Glade developer which contains a bit more about why Bevy and how it's being used:

> And when it comes to the engine and the tech, Anastasia started with Bevy because it was the easiest thing to jump into, and we're still using a modified version of Bevy to this day. Technically, at the base level we have the framework called the ECS, or Entity Component System, which is the way to define the game objects and how they work, basically the lifeblood of everything happening within the game. Initially, Anastasia's prototype was using Bevy for everything, including rendering, but eventually, our needs outscaled what Bevy could provide at the time, as the need for the project was to have prettier graphics and better procedural generation on the GPU.

https://80.lv/articles/exclusive-tiny-glade-developers-discu...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: