2

I'm currently trying to create a game engine in rust. I have a rust Game module that generate a framebuffer of pixels every frame. I then display it directly to the screen in the case of the game.

However, I also want to have a game editor interface, so I have another rust project that uses the Game as an external module. The goal of the editor is to display the framebuffer to the screen, with an external interface to modify the game states.

For the editor, I could use tools such as Qt, ImGui, ... but I wanted to use a web-based interface for easier UI design, so I chose to use Tauri. The problem that I face is that to display the game current frame in Tauri (using React), I need to pass the Framebuffer from the Game module (and so the server) to the client.

To do that, I'm currently using WebSockets to pass data as a binary array of pixels from the server to the client. The problem is that this method is too slow and so I don't have enough framerate. Do you know a better way or maybe module do achieve that (still based on web-like interfaces) ?

xam4lor
  • 64
  • 6

0 Answers0